diff options
author | Ido Schimmel <idosch@mellanox.com> | 2018-02-28 12:25:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-28 12:25:47 -0500 |
commit | 3d578d879517a97f4af867e6a8a021baf15e5101 (patch) | |
tree | 82d66e064279c32078e13c0fb659b7d87d0db165 /tools/testing/selftests/net/forwarding/lib.sh | |
parent | selftests: forwarding: Create test topology for multipath routing (diff) | |
download | linux-dev-3d578d879517a97f4af867e6a8a021baf15e5101.tar.xz linux-dev-3d578d879517a97f4af867e6a8a021baf15e5101.zip |
selftests: forwarding: Test IPv4 weighted nexthops
Use different weights for the multipath route configured on the first
router and check that the different flows generated by the first host
are distributed according to the provided weights.
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/net/forwarding/lib.sh')
-rw-r--r-- | tools/testing/selftests/net/forwarding/lib.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 962153b7181b..6866f4a4bc4e 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -113,6 +113,13 @@ log_test() return 0 } +log_info() +{ + local msg=$1 + + echo "INFO: $msg" +} + setup_wait() { for i in $(eval echo {1..$NUM_NETIFS}); do @@ -256,6 +263,13 @@ master_name_get() ip -j link show dev $if_name | jq -r '.[]["master"]' } +link_stats_tx_packets_get() +{ + local if_name=$1 + + ip -j -s link show dev $if_name | jq '.[]["stats64"]["tx"]["packets"]' +} + bridge_ageing_time_get() { local bridge=$1 |