diff options
| author | Ahmed Zaki <[email protected]> | 2024-06-14 13:18:42 +0000 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2024-07-23 22:26:41 +0000 |
| commit | 6ebbe97a488179f5dc85f2f1e0c89b486e99ee97 (patch) | |
| tree | b2af4165ff72155aea1fcc54717c30a5543f1767 /drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c | |
| parent | net: bonding: correctly annotate RCU in bond_should_notify_peers() (diff) | |
| download | kernel-6ebbe97a488179f5dc85f2f1e0c89b486e99ee97.tar.gz kernel-6ebbe97a488179f5dc85f2f1e0c89b486e99ee97.zip | |
ice: Add a per-VF limit on number of FDIR filters
While the iavf driver adds a s/w limit (128) on the number of FDIR
filters that the VF can request, a malicious VF driver can request more
than that and exhaust the resources for other VFs.
Add a similar limit in ice.
CC: [email protected]
Fixes: 1f7ea1cd6a37 ("ice: Enable FDIR Configure for AVF")
Reviewed-by: Przemek Kitszel <[email protected]>
Suggested-by: Sridhar Samudrala <[email protected]>
Signed-off-by: Ahmed Zaki <[email protected]>
Reviewed-by: Wojciech Drewek <[email protected]>
Tested-by: Rafal Romanowski <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c')
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c b/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c index e3cab8e98f52..5412eff8ef23 100644 --- a/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c +++ b/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c @@ -534,7 +534,7 @@ ice_parse_rx_flow_user_data(struct ethtool_rx_flow_spec *fsp, * * Returns the number of available flow director filters to this VSI */ -static int ice_fdir_num_avail_fltr(struct ice_hw *hw, struct ice_vsi *vsi) +int ice_fdir_num_avail_fltr(struct ice_hw *hw, struct ice_vsi *vsi) { u16 vsi_num = ice_get_hw_vsi_num(hw, vsi->idx); u16 num_guar; |
