Skip to content

Commit dda7f4f

Browse files
pmachatadavem330
authored andcommitted
selftests: mlxsw: Increase the tolerance of backlog buildup
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>
1 parent 059b18e commit dda7f4f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,8 @@ do_red_test()
507507
check_err $? "backlog $backlog / $limit Got $pct% marked packets, expected == 0."
508508
local diff=$((limit - backlog))
509509
pct=$((100 * diff / limit))
510-
((0 <= pct && pct <= 5))
511-
check_err $? "backlog $backlog / $limit expected <= 5% distance"
510+
((0 <= pct && pct <= 10))
511+
check_err $? "backlog $backlog / $limit expected <= 10% distance"
512512
log_test "TC $((vlan - 10)): RED backlog > limit"
513513

514514
stop_traffic

0 commit comments

Comments
 (0)