Message ID | 20231024110929.19423-11-michal.swiatkowski@linux.intel.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | one by one port representors creation | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Guessing tree name failed - patch did not apply |
> -----Original Message----- > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of > Michal Swiatkowski > Sent: Tuesday, October 24, 2023 4:39 PM > To: intel-wired-lan@lists.osuosl.org > Cc: Drewek, Wojciech <wojciech.drewek@intel.com>; Szycik, Marcin > <marcin.szycik@intel.com>; netdev@vger.kernel.org; Brandeburg, Jesse > <jesse.brandeburg@intel.com>; Kitszel, Przemyslaw > <przemyslaw.kitszel@intel.com>; Keller, Jacob E <jacob.e.keller@intel.com>; > Michal Swiatkowski <michal.swiatkowski@linux.intel.com>; Raczynski, Piotr > <piotr.raczynski@intel.com> > Subject: [Intel-wired-lan] [PATCH iwl-next v1 10/15] 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> > --- > drivers/net/ethernet/intel/ice/ice_lib.c | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index ae4b4220e1bb..85a8cb28a489 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c @@ -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: