mbox series

[iwl-next,v2,0/2] ice: minor cleanups for VF IRQ logic

Message ID 20240322214445.1653263-1-jacob.e.keller@intel.com
Headers show
Series ice: minor cleanups for VF IRQ logic | expand

Message

Jacob Keller March 22, 2024, 9:44 p.m. UTC
While working on implementing Scalable IOV support for the ice driver, I
found a few minor gotchas in the VF logic where the existing code is not
ready to handle Scalable VFs.

First, the recent support to allow programming the VF MSI-X count
initialized some values in ice_sriov.c in the for loop for creating VFs
using the sriov_numvfs interface. We will need to initialize these values
for Scalable VFs as well, and this should belong in
ice_initialize_vf_entry().

Second, when programming the VF IRQs in response to virtchnl commands, the
current virtchnl logic hardcodes the assumption that hardware IRQ indexes
are VF relative. This is true for Single Root IOV, but is not true for
Scalable IOV where the interrupts come from the PF space. Cleanup the logic
to look up the IRQ index from the q_vector, making this flow more agnostic
of the VF functionality type in the future.

Neither of these changes is critical for current SR-IOV support, but they do
prepare the way for Scalable IOV VF support. I'd rather have these cleanups
already taken care now instead of carrying them until the Scalable IOV code
is submitted.

Changes since v1:
* 2nd patch implementation is replaced to work properly within the newer
  dynamic MSI-X logic.

Jacob Keller (2):
  ice: set vf->num_msix in ice_initialize_vf_entry()
  ice: store VF relative MSI-X index in q_vector->vf_reg_idx

 drivers/net/ethernet/intel/ice/ice.h          |  3 ++-
 drivers/net/ethernet/intel/ice/ice_base.c     |  3 ++-
 drivers/net/ethernet/intel/ice/ice_sriov.c    | 12 ++++--------
 drivers/net/ethernet/intel/ice/ice_sriov.h    |  5 ++---
 drivers/net/ethernet/intel/ice/ice_vf_lib.c   |  5 ++++-
 drivers/net/ethernet/intel/ice/ice_virtchnl.c | 14 +++++++-------
 6 files changed, 21 insertions(+), 21 deletions(-)


base-commit: 237bb5f7f7f55ec5f773469a974c61a49c298625
prerequisite-patch-id: 3108bcb752993e56fb77c40c95ff495617203de7
prerequisite-patch-id: 8d0c4c9f22c20ccc76d0d7c075b13656aebc6876
prerequisite-patch-id: b1c978f45ccc98cdc40691607fb3c7f48a2d6bd8
prerequisite-patch-id: 7a209537e2a3985c83519ece236a5930a44fd5aa
prerequisite-patch-id: 66c079154bccc094464f56e16f85aa7d65e62aee
prerequisite-patch-id: d5bfb63d33a893c1b6c32f9b1ba535227cecbcef
prerequisite-patch-id: e208622d0074fe4a41c4601d617c7d745082bb82
prerequisite-patch-id: 706680e41a8b021c83090d51ee26e2451f8b3c8c
prerequisite-patch-id: be7f2dd5c7394129c14fceceb37c4b376d08e020
prerequisite-patch-id: 7dd3d0ff34215af649193eb215ef600ad1d3fe7e
prerequisite-patch-id: 56d8c16f6a325ab74a292ea6fc4be121d889165b
prerequisite-patch-id: 8a987b80ebc894e111078a8f3225d6944315e26f
prerequisite-patch-id: 4f37c6c392729994848492e7fda119ce48edc640
prerequisite-patch-id: fb8e3da01887ace6338d279f8b6642f381727c95
prerequisite-patch-id: 7425c65e59d4d97471b0ab83efe31b7bb72c0d96
prerequisite-patch-id: 8bf9b377f8d76f31e9e129c59607f701748a2d9c
prerequisite-patch-id: 7c561eabcdf219b485b50610bd7d3fbefec3d350
prerequisite-patch-id: c506ba95953b408baf21bf316bc573d3044159df
prerequisite-patch-id: baedb1109f1876e33a1c1e25ab35e153524d3592
prerequisite-patch-id: 933d4cc454c20f9a500d2739ec7425a54a2b663c
prerequisite-patch-id: 37c718cc700133d247b004af426942286c1eb756
prerequisite-patch-id: dd8b259bffa17b01c49c6f66fade2e9efd127a40
prerequisite-patch-id: 15c8b6e7a6497ee0fbca15be219f36c4b1399554
prerequisite-patch-id: 10a1c757f63adcdf97609b540bed0cbc9af97aca
prerequisite-patch-id: ae758bd4a436211480b79ea81abdbb1763d7610a
prerequisite-patch-id: 8180848cee44e1a0f6d7f91380595b7e51006aa9
prerequisite-patch-id: 19988c670ee03827979155873f69401534f38a3c
prerequisite-patch-id: 2be3091f90b8e0f40b11218cd6d49ab2188fec1a