Commit 292e0154 authored by Michal Swiatkowski's avatar Michal Swiatkowski Committed by Tony Nguyen

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: default avatarPiotr Raczynski <piotr.raczynski@intel.com>
Reviewed-by: default avatarWojciech Drewek <wojciech.drewek@intel.com>
Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Signed-off-by: default avatarMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: default avatarSujai Buvaneswaran <sujai.buvaneswaran@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent deb53f20
......@@ -212,11 +212,18 @@ static void ice_vsi_set_num_qs(struct ice_vsi *vsi)
vsi->alloc_txq));
break;
case ICE_VSI_SWITCHDEV_CTRL:
/* The number of queues for ctrl VSI is equal to number of VFs.
/* The number of queues for ctrl VSI is equal to number of PRs
* Each ring is associated to the corresponding VF_PR netdev.
* Tx and Rx rings are always equal
*/
vsi->alloc_txq = ice_get_num_vfs(pf);
vsi->alloc_rxq = vsi->alloc_txq;
if (vsi->req_txq && vsi->req_rxq) {
vsi->alloc_txq = vsi->req_txq;
vsi->alloc_rxq = vsi->req_rxq;
} else {
vsi->alloc_txq = 1;
vsi->alloc_rxq = 1;
}
vsi->num_q_vectors = 1;
break;
case ICE_VSI_VF:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment