ice: minor cleanups for VF IRQ logic
Subsystems (2)
v2 cover ice: minor cleanups for VF IRQ logic
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
Signature · 1 line
2.44.0.53.g0f9d4d28b7e6
PATCH v2 1/2 ice: set vf->num_msix in ice_initialize_vf_entry()
Commit fe1c5ca2fe76 ("ice: implement num_msix field per VF") updated the driver to allow for per-VF MSI-X configuration. The initial defaults were set in ice_create_vf_entries(). This logic is better placed in ice_initialize_vf_entry(). Indeed, that function already sets vf->num_vf_qs, as well as initializes the allow list via calling ice_vc_set_default_allowlist().
Move this logic into ice_initialize_vf_entry(). This makes the code clear, and ensures that these VF fields will be initialized properly for both SR-IOV VFs and the upcoming Scalable IOV VFs.
--- drivers/net/ethernet/intel/ice/ice_sriov.c | 5 ----- drivers/net/ethernet/intel/ice/ice_vf_lib.c | 5 ++++- 2 files changed, 4 insertions(+), 6 deletions(-)
drivers/net/ethernet/intel/ice/ice_sriov.c +0 -5
@@ -831,11 +831,6 @@ static int ice_create_vf_entries(struct ice_pf *pf, u16 num_vfs)pci_dev_get (vfdev); -/* set default number of MSI-X */ - vf->num_msix = pf->vfs.num_msix_per; - vf->num_vf_qs = pf->vfs.num_qps_per; -ice_vc_set_default_allowlist (vf); -hash_add_rcu (vfs->table, &vf->entry, vf_id); }
drivers/net/ethernet/intel/ice/ice_vf_lib.c +4 -1
@@ -992,10 +992,13 @@ void ice_initialize_vf_entry(struct ice_vf *vf)/* assign default capabilities */ vf->spoofchk = true; - vf->num_vf_qs = vfs->num_qps_per;ice_vc_set_default_allowlist (vf);ice_virtchnl_set_dflt_ops (vf); +/* set default number of MSI-X */ + vf->num_msix = vfs->num_msix_per; + vf->num_vf_qs = vfs->num_qps_per; +/* ctrl_vsi_idx will be set to a valid value only when iAVF * creates its first fdir rule. */
Signature · 1 line
2.44.0.53.g0f9d4d28b7e6
Re: [Intel-wired-lan] [PATCH iwl-next v2 1/2] ice: set vf->num_msix in ice_initialize_vf_entry()
Quoted 68 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Jacob Keller
Sent: Friday, March 22, 2024 10:45 PM
To: Intel Wired LAN <[email protected]>
Cc: Keller, Jacob E <[email protected]>; Nguyen, Anthony L <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-next v2 1/2] ice: setvf->num_msixinice_initialize_vf_entry()Commit
fe1c5ca2fe76("ice: implementnum_msixfield per VF") updated the driver to allow for per-VF MSI-X configuration. The initial defaults were set inice_create_vf_entries(). This logic is better placed inice_initialize_vf_entry(). Indeed, that function already setsvf->num_vf_qs, as well as initializes the allow list via callingice_vc_set_default_allowlist().Move this logic into
ice_initialize_vf_entry(). This makes the code clear, and ensures that these VF fields will be initialized properly for both SR-IOV VFs and the upcoming Scalable IOV VFs.Signed-off-by Jacob Keller <[email protected]>Reviewed-by Jesse Brandeburg <[email protected]>--- drivers/net/ethernet/intel/ice/ice_sriov.c | 5 ----- drivers/net/ethernet/intel/ice/ice_vf_lib.c | 5 ++++- 2 files changed, 4 insertions(+), 6 deletions(-)drivers/net/ethernet/intel/ice/ice_sriov.c +0
-5@@ -831,11 +831,6 @@ static int ice_create_vf_entries(struct ice_pf *pf, u16 num_vfs)pci_dev_get (vfdev ); -/* set default number of MSI-X */ - vf->num_msix = pf->vfs.num_msix_per; - vf->num_vf_qs = pf->vfs.num_qps_per; -ice_vc_set_default_allowlist (vf); -hash_add_rcu (vfs->table, &vf->entry, vf_id); }drivers/net/ethernet/intel/ice/ice_vf_lib.c +4
-2@@ -992,10 +992,13 @@ void ice_initialize_vf_entry(struct ice_vf *vf)/* assign default capabilities */ vf->spoofchk = true; - vf->num_vf_qs = vfs->num_qps_per;ice_vc_set_default_allowlist (vf);ice_virtchnl_set_dflt_ops (vf); +/* set default number of MSI-X */ + vf->num_msix = vfs->num_msix_per; + vf->num_vf_qs = vfs->num_qps_per; +/* ctrl_vsi_idx will be set to a valid value only when iAVF * creates its first fdir rule. */ --
Quoted 1 line
2.44.0.53.g0f9d4d28b7e6
PATCH v2 2/2 ice: store VF relative MSI-X index in q_vector->vf_reg_idx
In reply to Jacob KellerThe ice physical function driver needs to configure the association of queues and interrupts on behalf of its virtual functions. This is done over virtchnl by the VF sending messages during its initialization phase. These messages contain a vector_id which the VF wants to associate with a given queue. This ID is relative to the VF space, where 0 indicates the control IRQ for non-queue interrupts.
When programming the mapping, the PF driver currently passes this vector_id directly to the low level functions for programming. This works for SR-IOV, because the hardware uses the VF-based indexing for interrupts.
This won't work for Scalable IOV, which uses PF-based indexing for programming its VSIs. To handle this, the driver needs to be able to look up the proper index to use for programming. For typical IRQs, this would be the q_vector->reg_idx field.
The q_vector->reg_idx can't be set to a VF relative value, because it is used when the PF needs to control the interrupt, such as when triggering a software interrupt on stopping the Tx queue. Thus, introduce a new q_vector->vf_reg_idx which can store the VF relative index for registers which expect this.
Use this in ice_cfg_interrupt to look up the VF index from the q_vector. This allows removing the vector ID parameter of ice_cfg_interrupt. Also notice that this function returns an int, but then is cast to the virtchnl error enumeration, virtchnl_status_code. Update the return type to indicate it does not return an integer error code. We can't use normal error codes here because the return values are passed across the virtchnl interface.
This will allow the future Scalable IOV VFs to correctly look up the index needed for programming the VF queues without breaking SR-IOV.
---
I found a bug during further testing in the v1 case because the irq.index field is used to determine if the IRQ vector was actually allocated. I then investigated if q_vector->reg_idx was necessary or if it could be replaced. It turns out that it is used during the shutdown path for the Tx queues as part of the stop queue procedure. Thus, I opted to replace the functionality by using a separate vf_reg_idx field that fits in a 2-byte gap in the current q_vector structure.
Changes since v2:
* introduce new vf_reg_idx instead of (ab)using msi_map index field
* Keep ice_calc_vf_reg_idx and use it to assign both the PF-relative register index as well as the VF index needed for virtchnl
* Assign vf_reg_idx to the same as reg_idx for all non-ICE_VSI_VF VSIs.
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 | 7 ++++--- drivers/net/ethernet/intel/ice/ice_sriov.h | 5 ++--- drivers/net/ethernet/intel/ice/ice_virtchnl.c | 14 +++++++------- 5 files changed, 17 insertions(+), 15 deletions(-)
drivers/net/ethernet/intel/ice/ice.h +2 -1
@@ -459,7 +459,7 @@ struct ice_q_vector {struct ice_vsi *vsi;u16 v_idx;/* index in the vsi->q_vector array. */ -u16 reg_idx; +u16 reg_idx;/* PF relative register index */ u8 num_ring_rx;/* total number of Rx rings in vector */ u8 num_ring_tx;/* total number of Tx rings in vector */ u8 wb_on_itr:1; /* if true, WB on ITR is enabled */
@@ -481,6 +481,7 @@ struct ice_q_vector {char name[ICE_INT_NAME_STR_LEN ];u16 total_events;/* net_dim(): number of interrupts processed */ +u16 vf_reg_idx;/* VF relative register index */ struct msi_map irq; }____cacheline_internodealigned_in_smp ;
drivers/net/ethernet/intel/ice/ice_base.c +2 -1
@@ -121,7 +121,7 @@ static int ice_vsi_alloc_q_vector(struct ice_vsi *vsi, u16 v_idx) q_vector->irq.index = -ENOENT ;if (vsi->type ==ICE_VSI_VF ) { - q_vector->reg_idx =ice_calc_vf_reg_idx (vsi->vf, q_vector); +ice_calc_vf_reg_idx (vsi->vf, q_vector); goto out; }else if (vsi->type ==ICE_VSI_CTRL && vsi->vf) {struct ice_vsi *ctrl_vsi =ice_get_vf_ctrl_vsi (pf, vsi);
@@ -145,6 +145,7 @@ static int ice_vsi_alloc_q_vector(struct ice_vsi *vsi, u16 v_idx) skip_alloc: q_vector->reg_idx = q_vector->irq.index; + q_vector->vf_reg_idx = q_vector->irq.index;/* only set affinity_mask if the CPU is online */ if (cpu_online (v_idx))
drivers/net/ethernet/intel/ice/ice_sriov.c +4 -3
@@ -360,13 +360,14 @@ static void ice_ena_vf_mappings(struct ice_vf *vf)* @vf: VF to calculate the register index for * @q_vector: a q_vector associated to the VF */ -int ice_calc_vf_reg_idx (struct ice_vf *vf,struct ice_q_vector *q_vector) +void ice_calc_vf_reg_idx (struct ice_vf *vf,struct ice_q_vector *q_vector) {if (!vf || !q_vector) -return -EINVAL ; +return ;/* always add one to account for the OICR being the first MSIX */ -return vf->first_vector_idx + q_vector->v_idx +1 ; + q_vector->vf_reg_idx = q_vector->v_idx +ICE_NONQ_VECS_VF ; + q_vector->reg_idx = vf->first_vector_idx + q_vector->vf_reg_idx; }/**
drivers/net/ethernet/intel/ice/ice_sriov.h +2 -3
@@ -49,7 +49,7 @@ int ice_set_vf_link_state(struct net_device *netdev, int vf_id, int link_state);int ice_set_vf_spoofchk (struct net_device *netdev,int vf_id,bool ena); -int ice_calc_vf_reg_idx (struct ice_vf *vf,struct ice_q_vector *q_vector); +void ice_calc_vf_reg_idx (struct ice_vf *vf,struct ice_q_vector *q_vector); int ice_get_vf_stats(struct net_device *netdev, int vf_id,
@@ -130,11 +130,10 @@ ice_set_vf_bw(struct net_device __always_unused *netdev,return -EOPNOTSUPP ; } -static inline int +static inline void ice_calc_vf_reg_idx (struct ice_vf __always_unused *vf,struct ice_q_vector __always_unused *q_vector) { -return 0 ; } static inline int
drivers/net/ethernet/intel/ice/ice_virtchnl.c +7 -7
@@ -1505,13 +1505,12 @@ static int ice_vc_dis_qs_msg(struct ice_vf *vf, u8 *msg)* ice_cfg_interrupt * @vf: pointer to the VF info * @vsi: the VSI being configured -* @vector_id: vector ID * @map: vector map for mapping vectors to queues * @q_vector: structure for interrupt vector * configure the IRQ to queue map */ -static int -ice_cfg_interrupt (struct ice_vf *vf,struct ice_vsi *vsi,u16 vector_id, +static enum virtchnl_status_code +ice_cfg_interrupt (struct ice_vf *vf,struct ice_vsi *vsi,struct virtchnl_vector_map *map,struct ice_q_vector *q_vector) {
@@ -1531,7 +1530,8 @@ ice_cfg_interrupt(struct ice_vf *vf, struct ice_vsi *vsi, u16 vector_id, q_vector->num_ring_rx++; q_vector->rx.itr_idx = map->rxitr_idx; vsi->rx_rings[vsi_q_id]->q_vector = q_vector; -ice_cfg_rxq_interrupt (vsi, vsi_q_id, vector_id, +ice_cfg_rxq_interrupt (vsi, vsi_q_id, + q_vector->vf_reg_idx, q_vector->rx.itr_idx); }
@@ -1545,7 +1545,8 @@ ice_cfg_interrupt(struct ice_vf *vf, struct ice_vsi *vsi, u16 vector_id, q_vector->num_ring_tx++; q_vector->tx.itr_idx = map->txitr_idx; vsi->tx_rings[vsi_q_id]->q_vector = q_vector; -ice_cfg_txq_interrupt (vsi, vsi_q_id, vector_id, +ice_cfg_txq_interrupt (vsi, vsi_q_id, + q_vector->vf_reg_idx, q_vector->tx.itr_idx); }
@@ -1619,8 +1620,7 @@ static int ice_vc_cfg_irq_map_msg(struct ice_vf *vf, u8 *msg) }/* lookout for the invalid queue index */ - v_ret = (enum virtchnl_status_code ) -ice_cfg_interrupt (vf, vsi, vector_id, map, q_vector); + v_ret =ice_cfg_interrupt (vf, vsi, map, q_vector);if (v_ret) goto error_param; }
Signature · 1 line
2.44.0.53.g0f9d4d28b7e6
Re: [Intel-wired-lan] [PATCH iwl-next v2 2/2] ice: store VF relative MSI-X index in q_vector->vf_reg_idx
Quoted 220 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Jacob Keller
Sent: Friday, March 22, 2024 10:45 PM
To: Intel Wired LAN <[email protected]>
Cc: Keller, Jacob E <[email protected]>; Nguyen, Anthony L <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-next v2 2/2] ice: store VF relative MSI-X index inq_vector->vf_reg_idxThe ice physical function driver needs to configure the association of queues and interrupts on behalf of its virtual functions. This is done over virtchnl by the VF sending messages during its initialization phase. These messages contain a
vector_idwhich the VF wants to associate with a given queue. This ID is relative to the VF space, where 0 indicates the control IRQ for non-queue interrupts.When programming the mapping, the PF driver currently passes this
vector_iddirectly to the low level functions for programming. This works for SR-IOV, because the hardware uses the VF-based indexing for interrupts.This won't work for Scalable IOV, which uses PF-based indexing for programming its VSIs. To handle this, the driver needs to be able to look up the proper index to use for programming. For typical IRQs, this would be the
q_vector->reg_idxfield.The
q_vector->reg_idxcan't be set to a VF relative value, because it is used when the PF needs to control the interrupt, such as when triggering a software interrupt on stopping the Tx queue. Thus, introduce a new q_vector-Quoted 1 line
vf_reg_idxwhich can store the VF relative index for registers which expectthis.
Use this in
ice_cfg_interruptto look up the VF index from theq_vector. This allows removing the vector ID parameter ofice_cfg_interrupt. Also notice that this function returns an int, but then is cast to the virtchnl error enumeration,virtchnl_status_code. Update the return type to indicate it does not return an integer error code. We can't use normal error codes here because the return values are passed across the virtchnl interface.This will allow the future Scalable IOV VFs to correctly look up the index needed for programming the VF queues without breaking SR-IOV.
Signed-off-by Jacob Keller <[email protected]>---
I found a bug during further testing in the v1 case because the irq.index field is used to determine if the IRQ vector was actually allocated. I then investigated ifq_vector->reg_idxwas necessary or if it could be replaced.
It turns out that it is used during the shutdown path for the Tx queues as part of the stop queue procedure. Thus, I opted to replace the functionality by using a separatevf_reg_idxfield that fits in a 2-byte gap in the currentq_vectorstructure.Changes since v2:
* introduce newvf_reg_idxinstead of (ab)usingmsi_mapindex field
* Keepice_calc_vf_reg_idxand use it to assign both the PF-relative register index as well as the VF index needed for virtchnl
* Assignvf_reg_idxto the same asreg_idxfor all non-ICE_VSI_VF VSIs.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 | 7 ++++--- drivers/net/ethernet/intel/ice/ice_sriov.h | 5 ++--- drivers/net/ethernet/intel/ice/ice_virtchnl.c | 14 +++++++------- 5 files changed, 17 insertions(+), 15 deletions(-)drivers/net/ethernet/intel/ice/ice.h +1
-1@@ -459,7 +459,7 @@ struct ice_q_vector {struct ice_vsi *vsi;u16 v_idx;/* index in the vsi->q_vector array. */ -u16 reg_idx; +u16 reg_idx;/* PF relative register index */ u8 num_ring_rx;/* total number of Rx rings in vector */
u8num_ring_tx; /* total number of Tx rings in
vector */
u8 wb_on_itr:1; /* if true, WB on ITR is
enabled */drivers/net/ethernet/intel/ice/ice.h +1
-0@@ -481,6 +481,7 @@ struct ice_q_vector {char name[ICE_INT_NAME_STR_LEN ];u16 total_events;/* net_dim(): number of interrupts processed */ +u16 vf_reg_idx;/* VF relative register index */ struct msi_map irq; }____cacheline_internodealigned_in_smp ;drivers/net/ethernet/intel/ice/ice_base.c +1
-1@@ -121,7 +121,7 @@ static int ice_vsi_alloc_q_vector(struct ice_vsi *vsi, u16 v_idx) q_vector->irq.index = -ENOENT;if (vsi->type ==ICE_VSI_VF ) { - q_vector->reg_idx =ice_calc_vf_reg_idx (vsi->vf, q_vector); +ice_calc_vf_reg_idx (vsi->vf, q_vector); goto out; }else if (vsi->type ==ICE_VSI_CTRL && vsi->vf) {drivers/net/ethernet/intel/ice/ice_base.c +2
-0struct ice_vsi *ctrl_vsi = ice_get_vf_ctrl_vsi(pf, vsi); @@ -145,6 +145,7 @@ static int ice_vsi_alloc_q_vector(struct ice_vsi *vsi, u16 v_idx) skip_alloc: q_vector->reg_idx = q_vector->irq.index; + q_vector->vf_reg_idx = q_vector->irq.index;/* only set affinity_mask if the CPU is online */ if (cpu_online (v_idx))drivers/net/ethernet/intel/ice/ice_sriov.c +5
-3@@ -360,13 +360,14 @@ static void ice_ena_vf_mappings(struct ice_vf *vf)* @vf: VF to calculate the register index for * @q_vector: a q_vector associated to the VF */ -int ice_calc_vf_reg_idx (struct ice_vf *vf,struct ice_q_vector *q_vector) +void ice_calc_vf_reg_idx (struct ice_vf *vf,struct ice_q_vector +*q_vector) {if (!vf || !q_vector) -return -EINVAL ; +return ;/* always add one to account for the OICR being the first MSIX */ -return vf->first_vector_idx + q_vector->v_idx +1 ; + q_vector->vf_reg_idx = q_vector->v_idx +ICE_NONQ_VECS_VF ; + q_vector->reg_idx = vf->first_vector_idx + q_vector->vf_reg_idx; }/** drivers/net/ethernet/intel/ice/ice_sriov.h +2
-1@@ -49,7 +49,7 @@ int ice_set_vf_link_state(struct net_device *netdev, int vf_id, int link_state);int ice_set_vf_spoofchk (struct net_device *netdev,int vf_id,bool ena); -int ice_calc_vf_reg_idx (struct ice_vf *vf,struct ice_q_vector *q_vector); +void ice_calc_vf_reg_idx (struct ice_vf *vf,struct ice_q_vector +*q_vector); int ice_get_vf_stats(struct net_device *netdev, int vf_id, @@ -130,11 +130,10@@ ice_set_vf_bw(struct
net_device__always_unused*netdev,drivers/net/ethernet/intel/ice/ice_sriov.h +1
-2return -EOPNOTSUPP ; } -static inline int +static inline void ice_calc_vf_reg_idx (struct ice_vf __always_unused *vf,struct ice_q_vector __always_unused *q_vector) { -return 0 ; } static inline intdrivers/net/ethernet/intel/ice/ice_virtchnl.c +2
-3@@ -1505,13 +1505,12 @@ static int ice_vc_dis_qs_msg(struct ice_vf *vf, u8*msg) * ice_cfg_interrupt * @vf: pointer to the VF info * @vsi: the VSI being configured -* @vector_id: vector ID * @map: vector map for mapping vectors to queues * @q_vector: structure for interrupt vector * configure the IRQ to queue map */ -static int -ice_cfg_interrupt (struct ice_vf *vf,struct ice_vsi *vsi,u16 vector_id, +static enum virtchnl_status_code +ice_cfg_interrupt (struct ice_vf *vf,struct ice_vsi *vsi,struct virtchnl_vector_map *map,struct ice_q_vector *q_vector){
drivers/net/ethernet/intel/ice/ice_virtchnl.c +5
-4@@ -1531,7 +1530,8 @@ ice_cfg_interrupt(struct ice_vf *vf, struct ice_vsi *vsi, u16 vector_id, q_vector->num_ring_rx++; q_vector->rx.itr_idx = map->rxitr_idx; vsi->rx_rings[vsi_q_id]->q_vector = q_vector; -ice_cfg_rxq_interrupt (vsi, vsi_q_id, vector_id, +ice_cfg_rxq_interrupt (vsi, vsi_q_id, + q_vector->vf_reg_idx, q_vector->rx.itr_idx); }@@ -1545,7 +1545,8 @@ ice_cfg_interrupt(struct ice_vf *vf, struct ice_vsi *vsi, u16 vector_id, q_vector->num_ring_tx++; q_vector->tx.itr_idx = map->txitr_idx; vsi->tx_rings[vsi_q_id]->q_vector = q_vector; -ice_cfg_txq_interrupt (vsi, vsi_q_id, vector_id, +ice_cfg_txq_interrupt (vsi, vsi_q_id, + q_vector->vf_reg_idx, q_vector->tx.itr_idx); }@@ -1619,8 +1620,7 @@ static int ice_vc_cfg_irq_map_msg(struct ice_vf *vf, u8 *msg) }/* lookout for the invalid queue index */ - v_ret = (enum virtchnl_status_code ) -ice_cfg_interrupt (vf, vsi, vector_id, map, q_vector); + v_ret =ice_cfg_interrupt (vf, vsi, map, q_vector);if (v_ret) goto error_param;
Quoted 3 lines
}
--
2.44.0.53.g0f9d4d28b7e6