Skip to content

Commit 33a93da

Browse files
jacob-kellergregkh
authored andcommitted
ice: remove unnecessary duplicate checks for VF VSI ID
commit 363f689 upstream. The ice_vc_fdir_param_check() function validates that the VSI ID of the virtchnl flow director command matches the VSI number of the VF. This is already checked by the call to ice_vc_isvalid_vsi_id() immediately following this. This check is unnecessary since ice_vc_isvalid_vsi_id() already confirms this by checking that the VSI ID can locate the VSI associated with the VF structure. Furthermore, a following change is going to refactor the ice driver to report VSI IDs using a relative index for each VF instead of reporting the PF VSI number. This additional check would break that logic since it enforces that the VSI ID matches the VSI number. Since this check duplicates the logic in ice_vc_isvalid_vsi_id() and gets in the way of refactoring that logic, remove it. Signed-off-by: Jacob Keller <[email protected]> Reviewed-by: Przemek Kitszel <[email protected]> Tested-by: Rafal Romanowski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent eb21b4e commit 33a93da

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ ice_vc_fdir_param_check(struct ice_vf *vf, u16 vsi_id)
9494
if (!(vf->driver_caps & VIRTCHNL_VF_OFFLOAD_FDIR_PF))
9595
return -EINVAL;
9696

97-
if (vsi_id != vf->lan_vsi_num)
98-
return -EINVAL;
99-
10097
if (!ice_vc_isvalid_vsi_id(vf, vsi_id))
10198
return -EINVAL;
10299

0 commit comments

Comments
 (0)