]> www.infradead.org Git - users/hch/blktests.git/commitdiff
common/multipath-over-rdma: skip NO-CARRIER NIC when start_soft_rdma
authorYi Zhang <yi.zhang@redhat.com>
Thu, 30 Jun 2022 09:56:25 +0000 (17:56 +0800)
committerShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Fri, 1 Jul 2022 11:21:13 +0000 (20:21 +0900)
The rxe/siw driver will be bind to NO-CARRIER interface which lead
nvmeof-mp/001 failed.
For example, nvmeof-mp/001 with two NICs, if will output
count_devices(): 1 <> 2 when the second NIC has NO-CARRIER

Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
common/multipath-over-rdma

index 8edcf3921a7f5873dafdbf25196df1d4c686b7da..8ab3da1a36c16a86aa9e3fcd45828af14754fb4c 100644 (file)
@@ -409,6 +409,7 @@ start_soft_rdma() {
                                [ -e "$i" ] || continue
                                [ "$i" = "lo" ] && continue
                                [ "$(<"$i/addr_len")" = 6 ] || continue
+                               [ "$(<"$i/carrier")" = 1 ] || continue
                                has_soft_rdma "$i" && continue
                                rdma link add "${i}_$type" type $type netdev "$i" ||
                                echo "Failed to bind the $type driver to $i"