NUM_NETIFS=0
 source $lib_dir/lib.sh
 source $lib_dir/devlink_lib.sh
-source qos_lib.sh
 
 swp=$NETIF_NO_CABLE
 
        tc qdisc delete dev $swp root
 }
 
-bail_on_lldpad
+bail_on_lldpad "configure DCB" "configure Qdiscs"
 
 trap cleanup EXIT
 setup_wait
 
        echo $ir $er
        return $ret
 }
-
-bail_on_lldpad()
-{
-       if systemctl is-active --quiet lldpad; then
-
-               cat >/dev/stderr <<-EOF
-               WARNING: lldpad is running
-
-                       lldpad will likely configure DCB, and this test will
-                       configure Qdiscs. mlxsw does not support both at the
-                       same time, one of them is arbitrarily going to overwrite
-                       the other. That will cause spurious failures (or,
-                       unlikely, passes) of this test.
-               EOF
-
-               if [[ -z $ALLOW_LLDPAD ]]; then
-                       cat >/dev/stderr <<-EOF
-
-                               If you want to run the test anyway, please set
-                               an environment variable ALLOW_LLDPAD to a
-                               non-empty string.
-                       EOF
-                       exit 1
-               else
-                       return
-               fi
-       fi
-}
 
 NUM_NETIFS=6
 source $lib_dir/lib.sh
 source $lib_dir/devlink_lib.sh
-source qos_lib.sh
 
 _1KB=1000
 _100KB=$((100 * _1KB))
        log_test "PFC"
 }
 
-bail_on_lldpad
+bail_on_lldpad "configure DCB" "configure Qdiscs"
 
 trap cleanup EXIT
 setup_prepare
 
 lib_dir=$(dirname $0)/../../../net/forwarding
 source $lib_dir/sch_ets_core.sh
 source $lib_dir/devlink_lib.sh
-source qos_lib.sh
 
 ALL_TESTS="
        ping_ipv4
        done
 }
 
-bail_on_lldpad
+bail_on_lldpad "configure DCB" "configure Qdiscs"
 ets_run
 
 source $lib_dir/lib.sh
 source $lib_dir/devlink_lib.sh
 source mlxsw_lib.sh
-source qos_lib.sh
 
 ipaddr()
 {
 
        uninstall_qdisc
 }
 
-bail_on_lldpad
+bail_on_lldpad "configure DCB" "configure Qdiscs"
 
 trap cleanup EXIT
 setup_prepare
 
        uninstall_qdisc
 }
 
-bail_on_lldpad
+bail_on_lldpad "configure DCB" "configure Qdiscs"
 
 trap cleanup EXIT
 setup_prepare
 
 #!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 
-source qos_lib.sh
-
 sch_tbf_pre_hook()
 {
-       bail_on_lldpad
+       bail_on_lldpad "configure DCB" "configure Qdiscs"
 }
 
 lib_dir=$(dirname $0)/../../../net/forwarding
 
 #!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 
-source qos_lib.sh
-
 sch_tbf_pre_hook()
 {
-       bail_on_lldpad
+       bail_on_lldpad "configure DCB" "configure Qdiscs"
 }
 
 lib_dir=$(dirname $0)/../../../net/forwarding
 
 #!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 
-source qos_lib.sh
-
 sch_tbf_pre_hook()
 {
-       bail_on_lldpad
+       bail_on_lldpad "configure DCB" "configure Qdiscs"
 }
 
 lib_dir=$(dirname $0)/../../../net/forwarding
 
 
        payload_template_expand_checksum "$hbh$icmpv6" $checksum
 }
+
+bail_on_lldpad()
+{
+       local reason1="$1"; shift
+       local reason2="$1"; shift
+
+       if systemctl is-active --quiet lldpad; then
+
+               cat >/dev/stderr <<-EOF
+               WARNING: lldpad is running
+
+                       lldpad will likely $reason1, and this test will
+                       $reason2. Both are not supported at the same time,
+                       one of them is arbitrarily going to overwrite the
+                       other. That will cause spurious failures (or, unlikely,
+                       passes) of this test.
+               EOF
+
+               if [[ -z $ALLOW_LLDPAD ]]; then
+                       cat >/dev/stderr <<-EOF
+
+                               If you want to run the test anyway, please set
+                               an environment variable ALLOW_LLDPAD to a
+                               non-empty string.
+                       EOF
+                       exit 1
+               else
+                       return
+               fi
+       fi
+}