Skip to content

Commit

Permalink
selftests: mlxsw: Test FDB offload indication
Browse files Browse the repository at this point in the history
Test that externally learned FDB entries added from user space are
marked as offloaded.

Signed-off-by: Ido Schimmel <[email protected]>
Reviewed-by: Petr Machata <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
idosch authored and davem330 committed Jan 18, 2019
1 parent 64254a2 commit 7215927
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tools/testing/selftests/drivers/net/mlxsw/rtnetlink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ ALL_TESTS="
lag_unlink_slaves_test
lag_dev_deletion_test
vlan_interface_uppers_test
bridge_extern_learn_test
devlink_reload_test
"
NUM_NETIFS=2
Expand Down Expand Up @@ -541,6 +542,25 @@ vlan_interface_uppers_test()
ip link del dev br0
}

bridge_extern_learn_test()
{
# Test that externally learned entries added from user space are
# marked as offloaded
RET=0

ip link add name br0 type bridge
ip link set dev $swp1 master br0

bridge fdb add de:ad:be:ef:13:37 dev $swp1 master extern_learn

bridge fdb show brport $swp1 | grep de:ad:be:ef:13:37 | grep -q offload
check_err $? "fdb entry not marked as offloaded when should"

log_test "externally learned fdb entry"

ip link del dev br0
}

devlink_reload_test()
{
# Test that after executing all the above configuration tests, a
Expand Down

0 comments on commit 7215927

Please sign in to comment.