[Intel-wired-lan] [PATCH net v3] iavf: Fix max_rate limiting

Tony Nguyen anthony.l.nguyen at intel.com
Fri Jun 10 17:30:00 UTC 2022



On 6/9/2022 2:43 PM, Jun Zhang wrote:
> From: Przemyslaw Patynowski <przemyslawx.patynowski at intel.com>
> 
> 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 at 0 2 at 2 2 at 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 at 0 2 at 2 2 at 4 hw 1 mode channel shaper bw_rlimit \
> max_rate 0Mbps 100Kbit 500Mbps
> 
> Should return error
> 
> Fixes: d5b33d0 ("i40evf: add ndo_setup_tc callback to i40evf")

The fixes tag should be 12 chars [1].

Commit: b181df353c12 ("iavf: Fix max_rate limiting")
	Fixes tag: Fixes: d5b33d0 ("i40evf: add ndo_setup_tc callback to i40evf")
	Has these problem(s):
		- SHA1 should be at least 12 digits long
		  Can be fixed by setting core.abbrev to 12 (or more) or (for git v2.11
		  or later) just making sure it is not set (or set to "auto").


> Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski at intel.com>
> Signed-off-by: Jun Zhang <xuejun.zhang at intel.com>

[1] 
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-changes


More information about the Intel-wired-lan mailing list