From: Jacob Keller <jacob.e.keller@intel.com>
To: Anthony Nguyen <anthony.l.nguyen@intel.com>,
Intel Wired LAN <intel-wired-lan@lists.osuosl.org>
Cc: Jacob Keller <jacob.e.keller@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>
Subject: [Intel-wired-lan] [PATCH iwl-next 2/4] ice: remove unnecessary duplicate checks for VF VSI ID
Date: Fri, 16 Feb 2024 14:06:36 -0800 [thread overview]
Message-ID: <20240216220638.2558451-3-jacob.e.keller@intel.com> (raw)
In-Reply-To: <20240216220638.2558451-1-jacob.e.keller@intel.com>
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 <jacob.e.keller@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
---
drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
index f001553e1a1a..8e4ff3af86c6 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
@@ -94,9 +94,6 @@ ice_vc_fdir_param_check(struct ice_vf *vf, u16 vsi_id)
if (!(vf->driver_caps & VIRTCHNL_VF_OFFLOAD_FDIR_PF))
return -EINVAL;
- if (vsi_id != vf->lan_vsi_num)
- return -EINVAL;
-
if (!ice_vc_isvalid_vsi_id(vf, vsi_id))
return -EINVAL;
--
2.41.0
next prev parent reply other threads:[~2024-02-16 22:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-16 22:06 [Intel-wired-lan] [PATCH iwl-next 0/4] ice: use relative VSI index for VFs VSIs Jacob Keller
2024-02-16 22:06 ` [Intel-wired-lan] [PATCH iwl-next 1/4] ice: pass VSI pointer into ice_vc_isvalid_q_id Jacob Keller
2024-03-01 15:19 ` Romanowski, Rafal
2024-02-16 22:06 ` Jacob Keller [this message]
2024-03-01 15:20 ` [Intel-wired-lan] [PATCH iwl-next 2/4] ice: remove unnecessary duplicate checks for VF VSI ID Romanowski, Rafal
2024-02-16 22:06 ` [Intel-wired-lan] [PATCH iwl-next 3/4] ice: use relative VSI index for VFs instead of PF VSI number Jacob Keller
2024-03-01 15:21 ` Romanowski, Rafal
2024-02-16 22:06 ` [Intel-wired-lan] [PATCH iwl-next 4/4] ice: remove vf->lan_vsi_num field Jacob Keller
2024-03-01 15:21 ` Romanowski, Rafal
2024-03-01 15:25 ` [Intel-wired-lan] [PATCH iwl-next 0/4] ice: use relative VSI index for VFs VSIs Romanowski, Rafal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240216220638.2558451-3-jacob.e.keller@intel.com \
--to=jacob.e.keller@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=przemyslaw.kitszel@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox