diff mbox series

[blktests] common/multipath-over-rdma: skip NO-CARRIER NIC when start_soft_rdma

Message ID 20220630095625.2705173-1-yi.zhang@redhat.com (mailing list archive)
State New, archived
Headers show
Series [blktests] common/multipath-over-rdma: skip NO-CARRIER NIC when start_soft_rdma | expand

Commit Message

Yi Zhang June 30, 2022, 9:56 a.m. UTC
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>
---
 common/multipath-over-rdma | 1 +
 1 file changed, 1 insertion(+)

Comments

Bart Van Assche June 30, 2022, 3:43 p.m. UTC | #1
On 6/30/22 02:56, Yi Zhang wrote:
> 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

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Shinichiro Kawasaki July 1, 2022, 1:46 p.m. UTC | #2
On Jun 30, 2022 / 17:56, Yi Zhang wrote:
> 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>

Thanks, applied.
diff mbox series

Patch

diff --git a/common/multipath-over-rdma b/common/multipath-over-rdma
index 8edcf39..8ab3da1 100644
--- a/common/multipath-over-rdma
+++ b/common/multipath-over-rdma
@@ -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"