Commit e087cba1 authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch 'add-tests-for-vxlan-with-ipv6-underlay'

Amit Cohen says:

====================
Add tests for VxLAN with IPv6 underlay

mlxsw driver lately added support for VxLAN with IPv6 underlay.
This set adds the relevant tests for IPv6, most of them are same to
IPv4 tests with the required changes.

Patch set overview:
Patch #1 relaxes requirements for offloading TC filters that
match on 802.1q fields. The following selftests make use of these
newly-relaxed filters.
Patch #2 adds preparation as part of selftests API, which will be used
later.
Patches #3-#4 add tests for VxLAN with bridge aware and unaware.
Patche #5 cleans unused function.
Patches #6-#7 add tests for VxLAN symmetric and asymmetric.
Patch #8 adds test for Q-in-VNI.
====================

Link: https://lore.kernel.org/r/20211221144949.2527545-1-amcohen@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 5de24da1 bf0a8b9b
...@@ -508,7 +508,8 @@ static int mlxsw_sp_flower_parse(struct mlxsw_sp *mlxsw_sp, ...@@ -508,7 +508,8 @@ static int mlxsw_sp_flower_parse(struct mlxsw_sp *mlxsw_sp,
struct flow_match_vlan match; struct flow_match_vlan match;
flow_rule_match_vlan(rule, &match); flow_rule_match_vlan(rule, &match);
if (mlxsw_sp_flow_block_is_egress_bound(block)) { if (mlxsw_sp_flow_block_is_egress_bound(block) &&
match.mask->vlan_id) {
NL_SET_ERR_MSG_MOD(f->common.extack, "vlan_id key is not supported on egress"); NL_SET_ERR_MSG_MOD(f->common.extack, "vlan_id key is not supported on egress");
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
......
...@@ -20,6 +20,7 @@ NETIF_TYPE=${NETIF_TYPE:=veth} ...@@ -20,6 +20,7 @@ NETIF_TYPE=${NETIF_TYPE:=veth}
NETIF_CREATE=${NETIF_CREATE:=yes} NETIF_CREATE=${NETIF_CREATE:=yes}
MCD=${MCD:=smcrouted} MCD=${MCD:=smcrouted}
MC_CLI=${MC_CLI:=smcroutectl} MC_CLI=${MC_CLI:=smcroutectl}
PING_COUNT=${PING_COUNT:=10}
PING_TIMEOUT=${PING_TIMEOUT:=5} PING_TIMEOUT=${PING_TIMEOUT:=5}
WAIT_TIMEOUT=${WAIT_TIMEOUT:=20} WAIT_TIMEOUT=${WAIT_TIMEOUT:=20}
INTERFACE_TIMEOUT=${INTERFACE_TIMEOUT:=600} INTERFACE_TIMEOUT=${INTERFACE_TIMEOUT:=600}
...@@ -1111,7 +1112,8 @@ ping_do() ...@@ -1111,7 +1112,8 @@ ping_do()
vrf_name=$(master_name_get $if_name) vrf_name=$(master_name_get $if_name)
ip vrf exec $vrf_name \ ip vrf exec $vrf_name \
$PING $args $dip -c 10 -i 0.1 -w $PING_TIMEOUT &> /dev/null $PING $args $dip -c $PING_COUNT -i 0.1 \
-w $PING_TIMEOUT &> /dev/null
} }
ping_test() ping_test()
...@@ -1132,7 +1134,8 @@ ping6_do() ...@@ -1132,7 +1134,8 @@ ping6_do()
vrf_name=$(master_name_get $if_name) vrf_name=$(master_name_get $if_name)
ip vrf exec $vrf_name \ ip vrf exec $vrf_name \
$PING6 $args $dip -c 10 -i 0.1 -w $PING_TIMEOUT &> /dev/null $PING6 $args $dip -c $PING_COUNT -i 0.1 \
-w $PING_TIMEOUT &> /dev/null
} }
ping6_test() ping6_test()
......
This diff is collapsed.
This diff is collapsed.
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# A wrapper to run VXLAN tests with an unusual port number.
VXPORT=8472
ALL_TESTS="
ping_ipv4
ping_ipv6
"
source vxlan_bridge_1d_ipv6.sh
...@@ -680,26 +680,6 @@ test_pvid() ...@@ -680,26 +680,6 @@ test_pvid()
log_test "VXLAN: flood after vlan re-add" log_test "VXLAN: flood after vlan re-add"
} }
vxlan_ping_test()
{
local ping_dev=$1; shift
local ping_dip=$1; shift
local ping_args=$1; shift
local capture_dev=$1; shift
local capture_dir=$1; shift
local capture_pref=$1; shift
local expect=$1; shift
local t0=$(tc_rule_stats_get $capture_dev $capture_pref $capture_dir)
ping_do $ping_dev $ping_dip "$ping_args"
local t1=$(tc_rule_stats_get $capture_dev $capture_pref $capture_dir)
local delta=$((t1 - t0))
# Tolerate a couple stray extra packets.
((expect <= delta && delta <= expect + 2))
check_err $? "$capture_dev: Expected to capture $expect packets, got $delta."
}
__test_learning() __test_learning()
{ {
local -a expects=(0 0 0 0 0) local -a expects=(0 0 0 0 0)
......
This diff is collapsed.
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# A wrapper to run VXLAN tests with an unusual port number.
VXPORT=8472
ALL_TESTS="
ping_ipv4
ping_ipv6
"
source vxlan_bridge_1q_ipv6.sh
This diff is collapsed.
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