Lines Matching +full:burst +full:- +full:read

2 # SPDX-License-Identifier: GPL-2.0
4 # This test is for checking devlink-trap functionality. It makes use of
40 if [ ! -d "$NETDEVSIM_PATH" ]; then
45 if [ -d "${NETDEVSIM_PATH}/devices/netdevsim${DEV_ADDR}" ]; then
54 if [ $((state & 1)) -ne 0 ]; then
65 test $(devlink_traps_num_get) -ne 0
80 # The action of non-drop traps cannot be changed.
137 check_fail $? "Did not get an error for non-existing trap"
139 log_test "Non-existing trap"
154 check_fail $? "Did not get an error for non-existing trap action"
156 log_test "Non-existing trap action"
182 devlink -s trap show $DEVLINK_DEV trap $trap_name &> /dev/null
183 check_fail $? "Managed to read trap (hard dropped) statistics when should not"
185 devlink -s trap show $DEVLINK_DEV trap $trap_name &> /dev/null
186 check_err $? "Did not manage to read trap (hard dropped) statistics when should"
192 check_fail $? "Stats of non-drop trap $trap_name idle when should not"
258 check_fail $? "Did not get an error for non-existing trap group"
260 log_test "Non-existing trap group"
294 if [ $(devlink_trap_policers_num_get) -eq 0 ]; then
299 check_fail $? "Did not get an error for setting a non-existing policer"
301 check_fail $? "Did not get an error for getting a non-existing policer"
303 devlink trap policer set $DEVLINK_DEV policer 1 rate 2000 burst 16
305 if [ $(devlink_trap_policer_rate_get 1) -ne 2000 ]; then
308 if [ $(devlink_trap_policer_burst_get 1) -ne 16 ]; then
309 check_err 1 "Policer burst size was not changed"
316 devlink trap policer set $DEVLINK_DEV policer 1 burst 2 &> /dev/null
317 check_fail $? "Policer burst size was changed to burst size lower than limit"
319 check_fail $? "Policer burst size was changed to burst size higher than limit"
324 if [ $(devlink_trap_policer_rate_get 1) -ne 2000 ]; then
327 if [ $(devlink_trap_policer_burst_get 1) -ne 16 ]; then
328 check_err 1 "Policer burst size was changed to an invalid value"
334 if [ ! $packets_t1 -gt $packets_t0 ]; then
339 devlink -s trap policer show $DEVLINK_DEV policer 1 &> /dev/null
340 check_fail $? "Managed to read policer drop counter when should not"
342 devlink -s trap policer show $DEVLINK_DEV policer 1 &> /dev/null
343 check_err $? "Did not manage to read policer drop counter when should"
352 devlink -j -p trap group show $DEVLINK_DEV group $group_name \
353 | jq -e '.[][][]["policer"]' &> /dev/null
362 if [ $(devlink_trap_group_policer_get "l2_drops") -ne 1 ]; then
368 check_fail $? "Did not get an error for binding a non-existing policer"
369 if [ $(devlink_trap_group_policer_get "l2_drops") -ne 1 ]; then
411 # in-flight.
438 # in-flight.
483 if [ ! -d "${NETDEVSIM_PATH}/devices/${DEV}" ]; then
490 if [ ! -d "${NETDEVSIM_PATH}/devices/${DEV}/net/" ]; then