mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
selftests: mlxsw: router_bridge_lag: Add a new selftest
Add a selftest to verify enslavement to a LAG with upper after fresh devlink reload. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Danielle Ratson <danieller@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/373a7754daa4dac32759a45095f47b08a2a869c8.1691498735.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
a76ca8afd4
commit
aae5bb8d18
1 changed files with 50 additions and 0 deletions
50
tools/testing/selftests/drivers/net/mlxsw/router_bridge_lag.sh
Executable file
50
tools/testing/selftests/drivers/net/mlxsw/router_bridge_lag.sh
Executable file
|
@ -0,0 +1,50 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
# Test enslavement to LAG with a clean slate.
|
||||||
|
# See $lib_dir/router_bridge_lag.sh for further details.
|
||||||
|
|
||||||
|
ALL_TESTS="
|
||||||
|
config_devlink_reload
|
||||||
|
config_enslave_h1
|
||||||
|
config_enslave_h2
|
||||||
|
config_enslave_h3
|
||||||
|
config_enslave_h4
|
||||||
|
config_enslave_swp1
|
||||||
|
config_enslave_swp2
|
||||||
|
config_enslave_swp3
|
||||||
|
config_enslave_swp4
|
||||||
|
config_wait
|
||||||
|
ping_ipv4
|
||||||
|
ping_ipv6
|
||||||
|
"
|
||||||
|
|
||||||
|
config_devlink_reload()
|
||||||
|
{
|
||||||
|
log_info "Devlink reload"
|
||||||
|
devlink_reload
|
||||||
|
}
|
||||||
|
|
||||||
|
config_enslave_h1()
|
||||||
|
{
|
||||||
|
config_enslave $h1 lag1
|
||||||
|
}
|
||||||
|
|
||||||
|
config_enslave_h2()
|
||||||
|
{
|
||||||
|
config_enslave $h2 lag4
|
||||||
|
}
|
||||||
|
|
||||||
|
config_enslave_h3()
|
||||||
|
{
|
||||||
|
config_enslave $h3 lag4
|
||||||
|
}
|
||||||
|
|
||||||
|
config_enslave_h4()
|
||||||
|
{
|
||||||
|
config_enslave $h4 lag1
|
||||||
|
}
|
||||||
|
|
||||||
|
lib_dir=$(dirname $0)/../../../net/forwarding
|
||||||
|
EXTRA_SOURCE="source $lib_dir/devlink_lib.sh"
|
||||||
|
source $lib_dir/router_bridge_lag.sh
|
Loading…
Reference in a new issue