aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
diff options
context:
space:
mode:
authorGravatar Jacob Keller <jacob.e.keller@intel.com> 2024-02-16 14:06:35 -0800
committerGravatar Tony Nguyen <anthony.l.nguyen@intel.com> 2024-03-04 10:22:18 -0800
commita21605993dd5dfd15edfa7f06705ede17b519026 (patch)
tree15d02dfb935d43f0d9b7c7fa73ba5fd79bf28603 /drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
parentMerge branch 'mptcp-userspace-pm' (diff)
downloadlinux-a21605993dd5dfd15edfa7f06705ede17b519026.tar.gz
linux-a21605993dd5dfd15edfa7f06705ede17b519026.tar.bz2
linux-a21605993dd5dfd15edfa7f06705ede17b519026.zip
ice: pass VSI pointer into ice_vc_isvalid_q_id
The ice_vc_isvalid_q_id() function takes a VSI index and a queue ID. It looks up the VSI from its index, and then validates that the queue number is valid for that VSI. The VSI ID passed is typically a VSI index from the VF. This VSI number is validated by the PF to ensure that it matches the VSI associated with the VF already. In every flow where ice_vc_isvalid_q_id() is called, the PF driver already has a pointer to the VSI associated with the VF. This pointer is obtained using ice_get_vf_vsi(), rather than looking up the VSI using the index sent by the VF. Since we already know which VSI to operate on, we can modify ice_vc_isvalid_q_id() to take a VSI pointer instead of a VSI index. Pass the VSI we found from ice_get_vf_vsi() instead of re-doing the lookup. This removes some unnecessary computation and scanning of the VSI list. It also removes the last place where the driver directly used the VSI number from the VF. This will pave the way for refactoring to communicate relative VSI numbers to the VF instead of absolute numbers from the PF space. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Tested-by: Rafal Romanowski <rafal.romanowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c')
0 files changed, 0 insertions, 0 deletions