Commit c29e012e authored by Ido Schimmel's avatar Ido Schimmel Committed by David S. Miller

selftests: forwarding: Fix layer 2 miss test syntax

The test currently specifies "l2_miss" as "true" / "false", but the
version that eventually landed in iproute2 uses "1" / "0" [1]. Align the
test accordingly.

[1] https://lore.kernel.org/netdev/20230607153550.3829340-1-idosch@nvidia.com/

Fixes: 8c33266a ("selftests: forwarding: Add layer 2 miss test cases")
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7d4e87e9
...@@ -78,11 +78,11 @@ test_l2_miss_unicast() ...@@ -78,11 +78,11 @@ test_l2_miss_unicast()
# Unknown unicast. # Unknown unicast.
tc filter add dev $swp2 egress protocol ipv4 handle 101 pref 1 \ tc filter add dev $swp2 egress protocol ipv4 handle 101 pref 1 \
flower indev $swp1 l2_miss true dst_mac $dmac src_ip $sip \ flower indev $swp1 l2_miss 1 dst_mac $dmac src_ip $sip \
dst_ip $dip action pass dst_ip $dip action pass
# Known unicast. # Known unicast.
tc filter add dev $swp2 egress protocol ipv4 handle 102 pref 1 \ tc filter add dev $swp2 egress protocol ipv4 handle 102 pref 1 \
flower indev $swp1 l2_miss false dst_mac $dmac src_ip $sip \ flower indev $swp1 l2_miss 0 dst_mac $dmac src_ip $sip \
dst_ip $dip action pass dst_ip $dip action pass
# Before adding FDB entry. # Before adding FDB entry.
...@@ -134,11 +134,11 @@ test_l2_miss_multicast_common() ...@@ -134,11 +134,11 @@ test_l2_miss_multicast_common()
# Unregistered multicast. # Unregistered multicast.
tc filter add dev $swp2 egress protocol $proto handle 101 pref 1 \ tc filter add dev $swp2 egress protocol $proto handle 101 pref 1 \
flower indev $swp1 l2_miss true src_ip $sip dst_ip $dip \ flower indev $swp1 l2_miss 1 src_ip $sip dst_ip $dip \
action pass action pass
# Registered multicast. # Registered multicast.
tc filter add dev $swp2 egress protocol $proto handle 102 pref 1 \ tc filter add dev $swp2 egress protocol $proto handle 102 pref 1 \
flower indev $swp1 l2_miss false src_ip $sip dst_ip $dip \ flower indev $swp1 l2_miss 0 src_ip $sip dst_ip $dip \
action pass action pass
# Before adding MDB entry. # Before adding MDB entry.
...@@ -245,7 +245,7 @@ test_l2_miss_ll_multicast_common() ...@@ -245,7 +245,7 @@ test_l2_miss_ll_multicast_common()
RET=0 RET=0
tc filter add dev $swp2 egress protocol $proto handle 101 pref 1 \ tc filter add dev $swp2 egress protocol $proto handle 101 pref 1 \
flower indev $swp1 l2_miss true dst_mac $dmac src_ip $sip \ flower indev $swp1 l2_miss 1 dst_mac $dmac src_ip $sip \
dst_ip $dip action pass dst_ip $dip action pass
$MZ $mode $h1 -a own -b $dmac -t ip -A $sip -B $dip -c 1 -p 100 -q $MZ $mode $h1 -a own -b $dmac -t ip -A $sip -B $dip -c 1 -p 100 -q
...@@ -296,10 +296,10 @@ test_l2_miss_broadcast() ...@@ -296,10 +296,10 @@ test_l2_miss_broadcast()
RET=0 RET=0
tc filter add dev $swp2 egress protocol all handle 101 pref 1 \ tc filter add dev $swp2 egress protocol all handle 101 pref 1 \
flower l2_miss true dst_mac $dmac src_mac $smac \ flower l2_miss 1 dst_mac $dmac src_mac $smac \
action pass action pass
tc filter add dev $swp2 egress protocol all handle 102 pref 1 \ tc filter add dev $swp2 egress protocol all handle 102 pref 1 \
flower l2_miss false dst_mac $dmac src_mac $smac \ flower l2_miss 0 dst_mac $dmac src_mac $smac \
action pass action pass
$MZ $h1 -a $smac -b $dmac -c 1 -p 100 -q $MZ $h1 -a $smac -b $dmac -c 1 -p 100 -q
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment