Skip to content

Commit

Permalink
selftests: forwarding: ethtool_mm: Skip when MAC Merge is not supported
Browse files Browse the repository at this point in the history
commit 23fb886 upstream.

MAC Merge cannot be tested with veth pairs, resulting in failures:

 # ./ethtool_mm.sh
 [...]
 TEST: Manual configuration with verification: swp1 to swp2          [FAIL]
         Verification did not succeed

Fix by skipping the test when the interfaces do not support MAC Merge.

Fixes: e699138 ("selftests: forwarding: add a test for MAC Merge layer")
Reported-by: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>
Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@alu.unizg.hr/
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://lore.kernel.org/r/20230808141503.4060661-11-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
idosch authored and gregkh committed Aug 16, 2023
1 parent 5025e43 commit df96d95
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions tools/testing/selftests/net/forwarding/ethtool_mm.sh
Expand Up @@ -258,11 +258,6 @@ h2_destroy()

setup_prepare()
{
check_ethtool_mm_support
check_tc_fp_support
require_command lldptool
bail_on_lldpad "autoconfigure the MAC Merge layer" "configure it manually"

h1=${NETIFS[p1]}
h2=${NETIFS[p2]}

Expand All @@ -278,6 +273,19 @@ cleanup()
h1_destroy
}

check_ethtool_mm_support
check_tc_fp_support
require_command lldptool
bail_on_lldpad "autoconfigure the MAC Merge layer" "configure it manually"

for netif in ${NETIFS[@]}; do
ethtool --show-mm $netif 2>&1 &> /dev/null
if [[ $? -ne 0 ]]; then
echo "SKIP: $netif does not support MAC Merge"
exit $ksft_skip
fi
done

trap cleanup EXIT

setup_prepare
Expand Down

0 comments on commit df96d95

Please sign in to comment.