Lines Matching full:rate

144 	devlink trap policer set $DEVLINK_DEV policer 1 rate 0 &> /dev/null
145 check_fail $? "Policer rate was changed to rate lower than limit"
147 rate 2000000001 &> /dev/null
148 check_fail $? "Policer rate was changed to rate higher than limit"
150 devlink trap policer set $DEVLINK_DEV policer 1 rate 1
151 check_err $? "Failed to set policer rate to minimum"
152 devlink trap policer set $DEVLINK_DEV policer 1 rate 2000000000
153 check_err $? "Failed to set policer rate to maximum"
155 log_test "Trap policer rate limits"
205 local rate pct drop_rate
210 devlink trap policer set $DEVLINK_DEV policer $id rate 1000 burst 512
213 # Send packets at highest possible rate and make sure they are dropped
214 # by the policer. Make sure measured received rate is about 1000 pps
215 log_info "=== Tx rate: Highest, Policer rate: 1000 pps ==="
219 sleep 5 # Take measurements when rate is stable
221 rate=$(trap_rate_get)
222 pct=$((100 * (rate - 1000) / 1000))
224 …check_err $? "Expected rate 1000 pps, got $rate pps, which is $pct% off. Required accuracy is +-10…
225 log_info "Expected rate 1000 pps, measured rate $rate pps"
229 check_err $? "Expected non-zero policer drop rate, got 0"
230 log_info "Measured policer drop rate of $drop_rate pps"
234 # Send packets at a rate of 1000 pps and make sure they are not dropped
236 log_info "=== Tx rate: 1000 pps, Policer rate: 1000 pps ==="
240 sleep 5 # Take measurements when rate is stable
244 check_err $? "Expected zero policer drop rate, got a drop rate of $drop_rate pps"
245 log_info "Measured policer drop rate of $drop_rate pps"
249 # Unbind the policer and send packets at highest possible rate. Make
251 # received rate is higher than 1000 pps
252 log_info "=== Tx rate: Highest, Policer rate: No policer ==="
258 rate=$(trap_rate_get)
259 (( rate > 1000 ))
260 check_err $? "Expected rate higher than 1000 pps, got $rate pps"
261 log_info "Measured rate $rate pps"
265 check_err $? "Expected zero policer drop rate, got a drop rate of $drop_rate pps"
266 log_info "Measured policer drop rate of $drop_rate pps"
270 log_test "Trap policer rate"
278 log_info "Running rate test for policer 1"
281 log_info "Running rate test for policer $((last_policer / 2))"
284 log_info "Running rate test for policer $last_policer"
295 devlink trap policer set $DEVLINK_DEV policer $id rate 1000 burst 512