ice: Improve logs for max ntuple errors
Subsystems (3)
PATCH 1/1 ice: Improve logs for max ntuple errors
Supported number of ntuple filters affect also maximum location value that can be provided to ethtool command. Update error message to provide info about max supported value.
Fix double spaces in the error messages.
--- drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c +8 -5
@@ -668,7 +668,7 @@ ice_fdir_set_hw_fltr_rule(struct ice_pf *pf, struct ice_flow_seg_info *seg,* then return error. */ if (hw->fdir_fltr_cnt[flow]) { -dev_err (dev,"Failed to add filter. Flow director filters on each port must have the same input set.\n" ); +dev_err (dev,"Failed to add filter. Flow director filters on each port must have the same input set.\n" );return -EINVAL ; }
@@ -770,7 +770,7 @@ ice_fdir_set_hw_fltr_rule(struct ice_pf *pf, struct ice_flow_seg_info *seg,ice_flow_rem_entry (hw,ICE_BLK_FD , entry1_h); err_prof:ice_flow_rem_prof (hw,ICE_BLK_FD , prof_id); -dev_err (dev,"Failed to add filter. Flow director filters on each port must have the same input set.\n" ); +dev_err (dev,"Failed to add filter. Flow director filters on each port must have the same input set.\n" );return err; }
@@ -1853,6 +1853,7 @@ int ice_add_fdir_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd)struct ice_pf *pf;struct ice_hw *hw;int fltrs_needed; +u32 max_location;u16 tunnel_port;int ret;
@@ -1884,8 +1885,10 @@ int ice_add_fdir_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd)if (ret)return ret; -if (fsp->location >=ice_get_fdir_cnt_all (hw)) { -dev_err (dev,"Failed to add filter. The maximum number of flow director filters has been reached.\n" ); + max_location =ice_get_fdir_cnt_all (hw); +if (fsp->location >= max_location) { +dev_err (dev,"Failed to add filter. The number of ntuple filters or provided location exceed max %d.\n" , + max_location);return -ENOSPC ; }
@@ -1893,7 +1896,7 @@ int ice_add_fdir_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd) fltrs_needed =ice_get_open_tunnel_port (hw, &tunnel_port,TNL_ALL ) ?2 :1 ;if (!ice_fdir_find_fltr_by_idx (hw, fsp->location) &&ice_fdir_num_avail_fltr (hw, pf->vsi[vsi->idx]) < fltrs_needed) { -dev_err (dev,"Failed to add filter. The maximum number of flow director filters has been reached.\n" ); +dev_err (dev,"Failed to add filter. The maximum number of flow director filters has been reached.\n" );return -ENOSPC ; }
Signature · 1 line
2.41.0
Quoted 8 lines · Pawel Kaminski
Supported number of ntuple filters affect also maximum location value that can be provided to ethtool command. Update error message to provide info about max supported value.
Fix double spaces in the error messages.
Reviewed-by Jesse Brandeburg <[email protected]>Signed-off-by Pawel Kaminski <[email protected]>
...
Quoted 11 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Pawel Kaminski
Sent: Tuesday, November 21, 2023 7:02 AM
To: [email protected]
Cc: [email protected]; Kaminski, Pawel <[email protected]>; Brandeburg, Jesse <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-next v1] ice: Improve logs for max ntuple errorsSupported number of ntuple filters affect also maximum location value that can be provided to ethtool command. Update error message to provide info about max supported value.
Quoted 8 lines
Fix double spaces in the error messages.
Reviewed-by Jesse Brandeburg <[email protected]>Signed-off-by Pawel Kaminski <[email protected]>--- drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)