Skip to content

Commit

Permalink
selftests: mlxsw: Increase the tolerance of backlog buildup
Browse files Browse the repository at this point in the history
The intention behind this test is to make sure that qdisc limit is
correctly projected to the HW. However, first, due to rounding in the
qdisc, and then in the driver, the number cannot actually be accurate. And
second, the approach to testing this is to oversubscribe the port with
traffic generated on the same switch. The actual backlog size therefore
fluctuates.

In practice, this test proved to be noisier than the rest, and spuriously
fails every now and then. Increase the tolerance to 10 % to avoid these
issues.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Acked-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
pmachata authored and davem330 committed Apr 23, 2021
1 parent 059b18e commit dda7f4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,8 @@ do_red_test()
check_err $? "backlog $backlog / $limit Got $pct% marked packets, expected == 0."
local diff=$((limit - backlog))
pct=$((100 * diff / limit))
((0 <= pct && pct <= 5))
check_err $? "backlog $backlog / $limit expected <= 5% distance"
((0 <= pct && pct <= 10))
check_err $? "backlog $backlog / $limit expected <= 10% distance"
log_test "TC $((vlan - 10)): RED backlog > limit"

stop_traffic
Expand Down

0 comments on commit dda7f4f

Please sign in to comment.