mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
selftests: mlxsw: Test neighbour offload indication
Test that neighbour entries are marked as offloaded. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
caf345a18b
commit
3321cff3c5
1 changed files with 26 additions and 0 deletions
|
@ -26,6 +26,7 @@ ALL_TESTS="
|
|||
lag_dev_deletion_test
|
||||
vlan_interface_uppers_test
|
||||
bridge_extern_learn_test
|
||||
neigh_offload_test
|
||||
devlink_reload_test
|
||||
"
|
||||
NUM_NETIFS=2
|
||||
|
@ -561,6 +562,31 @@ bridge_extern_learn_test()
|
|||
ip link del dev br0
|
||||
}
|
||||
|
||||
neigh_offload_test()
|
||||
{
|
||||
# Test that IPv4 and IPv6 neighbour entries are marked as offloaded
|
||||
RET=0
|
||||
|
||||
ip -4 address add 192.0.2.1/24 dev $swp1
|
||||
ip -6 address add 2001:db8:1::1/64 dev $swp1
|
||||
|
||||
ip -4 neigh add 192.0.2.2 lladdr de:ad:be:ef:13:37 nud perm dev $swp1
|
||||
ip -6 neigh add 2001:db8:1::2 lladdr de:ad:be:ef:13:37 nud perm \
|
||||
dev $swp1
|
||||
|
||||
ip -4 neigh show dev $swp1 | grep 192.0.2.2 | grep -q offload
|
||||
check_err $? "ipv4 neigh entry not marked as offloaded when should"
|
||||
ip -6 neigh show dev $swp1 | grep 2001:db8:1::2 | grep -q offload
|
||||
check_err $? "ipv6 neigh entry not marked as offloaded when should"
|
||||
|
||||
log_test "neighbour offload indication"
|
||||
|
||||
ip -6 neigh del 2001:db8:1::2 dev $swp1
|
||||
ip -4 neigh del 192.0.2.2 dev $swp1
|
||||
ip -6 address del 2001:db8:1::1/64 dev $swp1
|
||||
ip -4 address del 192.0.2.1/24 dev $swp1
|
||||
}
|
||||
|
||||
devlink_reload_test()
|
||||
{
|
||||
# Test that after executing all the above configuration tests, a
|
||||
|
|
Loading…
Reference in a new issue