From 08d60145f6601c899eadfcf76214b6ec1852f995 Mon Sep 17 00:00:00 2001 From: Mikhael Goikhman Date: Sun, 13 Aug 2023 17:04:08 +0300 Subject: [PATCH] tsbin/mlnx_bf_configure: Fix cases when "devlink eswitch set mode" returns BUSY Signed-off-by: Mikhael Goikhman --- tsbin/mlnx_bf_configure | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tsbin/mlnx_bf_configure b/tsbin/mlnx_bf_configure index 7bdbc77..533b715 100755 --- a/tsbin/mlnx_bf_configure +++ b/tsbin/mlnx_bf_configure @@ -185,6 +185,11 @@ IPSEC_FULL_OFFLOAD=${IPSEC_FULL_OFFLOAD:-"no"} LAG_HASH_MODE=${LAG_HASH_MODE:-"yes"} ENABLE_ESWITCH_MULTIPORT=${ENABLE_ESWITCH_MULTIPORT:-"no"} +# Delete ovs bridges and tc ingress rules if any, +# otherwise "devlink dev eswitch set .. mode" may return BUSY forever +ovs-vsctl list-br 2>/dev/null | xargs -r -L 1 ovs-vsctl del-br +for i in `ls -1 /sys/class/net/`; do tc filter del dev $i ingress &>/dev/null; done + num_of_devs=0 for dev in `lspci -nD -d 15b3: | grep 'a2d[26c]' | cut -d ' ' -f 1` do