diff options
author | David S. Miller <davem@davemloft.net> | 2020-01-02 15:40:14 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-02 15:40:14 -0800 |
commit | f5e5d27248ffbb8bc86706efa4717eb41c114718 (patch) | |
tree | c337153cb6d0cf836bd5d74e57f21373d7974b14 /tools/testing/selftests/net/forwarding/lib.sh | |
parent | Merge branch 'page_pool-NUMA-node-handling-fixes' (diff) | |
parent | selftests: mlxsw: Add a self-test for port-default priority (diff) | |
download | linux-dev-f5e5d27248ffbb8bc86706efa4717eb41c114718.tar.xz linux-dev-f5e5d27248ffbb8bc86706efa4717eb41c114718.zip |
Merge branch 'mlxsw-Allow-setting-default-port-priority'
Ido Schimmel says:
====================
mlxsw: Allow setting default port priority
Petr says:
When LLDP APP TLV selector 1 (EtherType) is used with PID of 0, the
corresponding entry specifies "default application priority [...] when
application priority is not otherwise specified."
mlxsw currently supports this type of APP entry, but uses it only as a
fallback for unspecified DSCP rules. However non-IP traffic is prioritized
according to port-default priority, not according to the DSCP-to-prio
tables, and thus it's currently not possible to prioritize such traffic
correctly.
This patchset extends the use of the abovementioned APP entry to also set
default port priority (in patches #1 and #2) and then (in patch #3) adds a
selftest.
====================
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 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index a0b09bb6995e..8dc5fac98cbc 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -225,6 +225,29 @@ log_info() echo "INFO: $msg" } +busywait() +{ + local timeout=$1; shift + + local start_time="$(date -u +%s%3N)" + while true + do + local out + out=$("$@") + local ret=$? + if ((!ret)); then + echo -n "$out" + return 0 + fi + + local current_time="$(date -u +%s%3N)" + if ((current_time - start_time > timeout)); then + echo -n "$out" + return 1 + fi + done +} + setup_wait_dev() { local dev=$1; shift |