diff options
| author | Przemyslaw Patynowski <[email protected]> | 2022-06-13 22:41:23 +0000 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2022-07-29 15:45:31 +0000 |
| commit | ec60d54cb9a3d43a02c5612a03093c18233e6601 (patch) | |
| tree | 9dba52b9bea25f427328ef329dca5446ac19c7e9 /drivers/net/ethernet/intel/ice/ice_main.c | |
| parent | Merge branch 'netdevsim-fib-route-delete-leak' (diff) | |
| download | kernel-ec60d54cb9a3d43a02c5612a03093c18233e6601.tar.gz kernel-ec60d54cb9a3d43a02c5612a03093c18233e6601.zip | |
iavf: Fix max_rate limiting
Fix max_rate option in TC, check for proper quanta boundaries.
Check for minimum value provided and if it fits expected 50Mbps
quanta.
Without this patch, iavf could send settings for max_rate limiting
that would be accepted from by PF even the max_rate option is less
than expected 50Mbps quanta. It results in no rate limiting
on traffic as rate limiting will be floored to 0.
Example:
tc qdisc add dev $vf root mqprio num_tc 3 map 0 2 1 queues \
2@0 2@2 2@4 hw 1 mode channel shaper bw_rlimit \
max_rate 50Mbps 500Mbps 500Mbps
Should limit TC0 to circa 50 Mbps
tc qdisc add dev $vf root mqprio num_tc 3 map 0 2 1 queues \
2@0 2@2 2@4 hw 1 mode channel shaper bw_rlimit \
max_rate 0Mbps 100Kbit 500Mbps
Should return error
Fixes: d5b33d024496 ("i40evf: add ndo_setup_tc callback to i40evf")
Signed-off-by: Przemyslaw Patynowski <[email protected]>
Signed-off-by: Jun Zhang <[email protected]>
Tested-by: Bharathi Sreenivas <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_main.c')
0 files changed, 0 insertions, 0 deletions
