mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 12:14:01 +08:00
selftests: mlxsw: Increase burst size for burst test
The current combination of rate and burst size does not adhere to Spectrum-{2,3} limitation which states that the minimum burst size should be 40% of the rate. Increase the burst size in order to honor above mentioned limitation and avoid intermittent failures of this test case on Spectrum-{2,3}. Remove the first sub-test case as the variation in number of received packets is simply too large to reliably test it. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8e0d8ce4fc
commit
b36cca02dc
@ -288,35 +288,12 @@ __burst_test()
|
||||
|
||||
RET=0
|
||||
|
||||
devlink trap policer set $DEVLINK_DEV policer $id rate 1000 burst 32
|
||||
devlink trap policer set $DEVLINK_DEV policer $id rate 1000 burst 512
|
||||
devlink trap group set $DEVLINK_DEV group l3_drops policer $id
|
||||
|
||||
# Send a burst of 64 packets and make sure that about 32 are received
|
||||
# and the rest are dropped by the policer
|
||||
log_info "=== Tx burst size: 64, Policer burst size: 32 pps ==="
|
||||
|
||||
t0_rx=$(devlink_trap_rx_packets_get blackhole_route)
|
||||
t0_drop=$(devlink_trap_policer_rx_dropped_get $id)
|
||||
|
||||
start_traffic $h1 192.0.2.1 198.51.100.100 $rp1_mac -c 64
|
||||
|
||||
t1_rx=$(devlink_trap_rx_packets_get blackhole_route)
|
||||
t1_drop=$(devlink_trap_policer_rx_dropped_get $id)
|
||||
|
||||
rx=$((t1_rx - t0_rx))
|
||||
pct=$((100 * (rx - 32) / 32))
|
||||
((-20 <= pct && pct <= 20))
|
||||
check_err $? "Expected burst size of 32 packets, got $rx packets, which is $pct% off. Required accuracy is +-20%"
|
||||
log_info "Expected burst size of 32 packets, measured burst size of $rx packets"
|
||||
|
||||
drop=$((t1_drop - t0_drop))
|
||||
(( drop > 0 ))
|
||||
check_err $? "Expected non-zero policer drops, got 0"
|
||||
log_info "Measured policer drops of $drop packets"
|
||||
|
||||
# Send a burst of 16 packets and make sure that 16 are received
|
||||
# and that none are dropped by the policer
|
||||
log_info "=== Tx burst size: 16, Policer burst size: 32 pps ==="
|
||||
log_info "=== Tx burst size: 16, Policer burst size: 512 ==="
|
||||
|
||||
t0_rx=$(devlink_trap_rx_packets_get blackhole_route)
|
||||
t0_drop=$(devlink_trap_policer_rx_dropped_get $id)
|
||||
|
Loading…
Reference in New Issue
Block a user