Skip to content

Commit 292e015

Browse files
Michal Swiatkowskianguy11
authored andcommitted
ice: allow changing SWITCHDEV_CTRL VSI queues
Implement mechanism to change number of queues for SWITCHDEV_CTRL VSI type. Value from ::req_txq/rxq will be written to ::alloc_txq/rxq after calling ice_vsi_rebuild(). Reviewed-by: Piotr Raczynski <piotr.raczynski@intel.com> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent deb53f2 commit 292e015

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

drivers/net/ethernet/intel/ice/ice_lib.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,18 @@ static void ice_vsi_set_num_qs(struct ice_vsi *vsi)
212212
vsi->alloc_txq));
213213
break;
214214
case ICE_VSI_SWITCHDEV_CTRL:
215-
/* The number of queues for ctrl VSI is equal to number of VFs.
215+
/* The number of queues for ctrl VSI is equal to number of PRs
216216
* Each ring is associated to the corresponding VF_PR netdev.
217+
* Tx and Rx rings are always equal
217218
*/
218-
vsi->alloc_txq = ice_get_num_vfs(pf);
219-
vsi->alloc_rxq = vsi->alloc_txq;
219+
if (vsi->req_txq && vsi->req_rxq) {
220+
vsi->alloc_txq = vsi->req_txq;
221+
vsi->alloc_rxq = vsi->req_rxq;
222+
} else {
223+
vsi->alloc_txq = 1;
224+
vsi->alloc_rxq = 1;
225+
}
226+
220227
vsi->num_q_vectors = 1;
221228
break;
222229
case ICE_VSI_VF:

0 commit comments

Comments
 (0)