[PATCH v4 7/7] nvme: support rdma transport type

Sagi Grimberg sagi at grimberg.me
Fri Aug 14 16:45:18 EDT 2020


>>> @@ -124,6 +134,11 @@ _setup_nvmet() {
>>>           modprobe nvmet-${nvme_trtype}
>>>       fi
>>>       modprobe nvme-${nvme_trtype}
>>> +    if [[ "${nvme_trtype}" == "rdma" ]]; then
>>> +        start_soft_rdma
>>> +        rdma_intfs=$(rdma_network_interfaces)
>>> +        def_traddr=$(get_ipv4_addr ${rdma_intfs[0]})
> The first rdma_intfs here maybe have DOWN state, which doesn't have an 
> addr[1], I found similar check code here[2]
> [1]
> # echo $rdma_intfs
> rdma_intfs:eno1
> eno2
> eno3
> eno4
> eno49
> eno50
> # [root at hpe-dl380gen9-01 blktests]# ip a s
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
> group default qlen 1000
>      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>      inet 127.0.0.1/8 scope host lo
>         valid_lft forever preferred_lft forever
>      inet6 ::1/128 scope host
>         valid_lft forever preferred_lft forever
> 2: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state 
> DOWN group default qlen 1000
>      link/ether 3c:a8:2a:21:7d:a4 brd ff:ff:ff:ff:ff:ff
> 3: eno49: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP 
> group default qlen 1000
>      link/ether 8c:dc:d4:1e:7a:78 brd ff:ff:ff:ff:ff:ff
>      inet 10.16.203.27/24 brd 10.16.203.255 scope global dynamic 
> noprefixroute eno49
>         valid_lft 84814sec preferred_lft 84814sec
>      inet6 2620:52:0:10cb:8edc:d4ff:fe1e:7a78/64 scope global dynamic 
> noprefixroute
>         valid_lft 2591978sec preferred_lft 604778sec
>      inet6 fe80::8edc:d4ff:fe1e:7a78/64 scope link noprefixroute
>         valid_lft forever preferred_lft forever
> [2]
> # grep -rin rdma_network_ tests/nvmeof-mp/
> tests/nvmeof-mp/rc:93:        for i in $(rdma_network_interfaces); do
> tests/nvmeof-mp/rc:235:        ) && for i in $(rdma_network_interfaces); do

This is annoying, I wish it would just work on the lo interface but it
doesn't for some reason...



More information about the Linux-nvme mailing list