]> Git Repo - linux.git/commit
rtnetlink: verify rate parameters for calls to ndo_set_vf_rate
authorBin Chen <[email protected]>
Wed, 11 May 2022 11:39:31 +0000 (13:39 +0200)
committerPaolo Abeni <[email protected]>
Thu, 12 May 2022 11:03:08 +0000 (13:03 +0200)
commita14857c27a505bc7ebcef6311424274b2f42f846
treebb80fe7970e1fece0b6e97f978caebbc3e9a3d15
parent982c97eede13f3cb98c471c1b8fc5a12686ef85c
rtnetlink: verify rate parameters for calls to ndo_set_vf_rate

When calling ndo_set_vf_rate() the max_tx_rate parameter may be zero,
in which case the setting is cleared, or it must be greater or equal to
min_tx_rate.

Enforce this requirement on all calls to ndo_set_vf_rate via a wrapper
which also only calls ndo_set_vf_rate() if defined by the driver.

Based on work by Jakub Kicinski <[email protected]>

Signed-off-by: Bin Chen <[email protected]>
Signed-off-by: Baowen Zheng <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>
net/core/rtnetlink.c
This page took 0.053173 seconds and 4 git commands to generate.