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 0/4] ice: use relative VSI index for VFs VSIs
Date: Fri, 16 Feb 2024 14:06:34 -0800 [thread overview]
Message-ID: <20240216220638.2558451-1-jacob.e.keller@intel.com> (raw)
The ice driver currently communicates firmware VSI numbers to its virtual
functions over virtchnl. For E800 series hardware, the VF driver has no
direct use of the VSI number.
Some older legacy hardware could use the actual VSI number when
communicating directly to firmware via the AdminQ. The E800 hardware does
not allow this, and all communication happens over mailbox to the PF. The
VFs do not have a direct access to the firmware. Additionally, none of the
registers exposed to the VF depend on the VSI number.
Further, the PF is able to lookup the VSI for the VF without using the
number provided by the VF over virtchnl. Thus, there is no reason that the
number provided to the VF must actually be a real VSI number, nor does it
need to be distinct across multiple VFs.
This series modifies the ice driver to send a relative VSI number to the VF
instead of sending the firmware values. This simplifies the interface with
the VF, as the PF can simply validate this relative number. Currently, only
a single VSI is provided to each VF. Thus, a simple static value of 1 is
used. We can easily extend this to use a proper relative index if we enable
multiple VSIs for a VF in the future.
First, a couple of patches cleanup a few places in the code which still use
the VF VSI IDs. Then, the VSI ID logic over virtchnl is changed to use the
static values. Finally, the vf->lan_vsi_num field is no longer used and only
set, so we can simplify the driver further by removing this entirely.
This eliminates a path for leaking information about the PF state to the VF,
and simplifies the PF driver logic. Several of the removed code flows
required an iterated scan over the VSI list to locate the VSI with the
reported VSI number.
Finally, this has significant value for a future series implementing VF live
migration. Now that the PF always passes relative VSI indexes, migration
will no longer need to worry about migrating the absolute VSI numbers sent
previously, which will simplify both the migration process as well as
continued handling of a migrated VF after a migration event completes.
Jacob Keller (4):
ice: pass VSI pointer into ice_vc_isvalid_q_id
ice: remove unnecessary duplicate checks for VF VSI ID
ice: use relative VSI index for VFs instead of PF VSI number
ice: remove vf->lan_vsi_num field
drivers/net/ethernet/intel/ice/ice_sriov.c | 1 -
drivers/net/ethernet/intel/ice/ice_vf_lib.c | 10 +-----
drivers/net/ethernet/intel/ice/ice_vf_lib.h | 5 ---
drivers/net/ethernet/intel/ice/ice_virtchnl.c | 31 +++++++------------
drivers/net/ethernet/intel/ice/ice_virtchnl.h | 9 ++++++
.../ethernet/intel/ice/ice_virtchnl_fdir.c | 3 --
6 files changed, 22 insertions(+), 37 deletions(-)
base-commit: 6cffde791c4f1c276fdfcf068554c3c77de35f40
--
2.41.0
next 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 Jacob Keller [this message]
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 ` [Intel-wired-lan] [PATCH iwl-next 2/4] ice: remove unnecessary duplicate checks for VF VSI ID Jacob Keller
2024-03-01 15:20 ` 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-1-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