diff mbox series

[net,01/13] ice: Fix allowing VF to request more/less queues via virtchnl

Message ID 20210226211932.46683-1-anthony.l.nguyen@intel.com
State Accepted
Delegated to: Anthony Nguyen
Headers show
Series [net,01/13] ice: Fix allowing VF to request more/less queues via virtchnl | expand

Commit Message

Tony Nguyen Feb. 26, 2021, 9:19 p.m. UTC
From: Brett Creeley <brett.creeley@intel.com>

Commit 12bb018c538c ("ice: Refactor VF reset") caused a regression
that removes the ability for a VF to request a different amount of
queues via VIRTCHNL_OP_REQUEST_QUEUES. This prevents VF drivers to
either increase or decrease the number of queue pairs they are
allocated. Fix this by using the variable vf->num_req_qs when
determining the vf->num_vf_qs during VF VSI creation.

Fixes: 12bb018c538c ("ice: Refactor VF reset")
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_lib.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jankowski, Konrad0 April 19, 2021, 7:21 p.m. UTC | #1
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Tony Nguyen
> Sent: piÄ…tek, 26 lutego 2021 22:19
> To: intel-wired-lan@lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH net 01/13] ice: Fix allowing VF to request
> more/less queues via virtchnl
> 
> From: Brett Creeley <brett.creeley@intel.com>
> 
> Commit 12bb018c538c ("ice: Refactor VF reset") caused a regression that
> removes the ability for a VF to request a different amount of queues via
> VIRTCHNL_OP_REQUEST_QUEUES. This prevents VF drivers to either
> increase or decrease the number of queue pairs they are allocated. Fix this
> by using the variable vf->num_req_qs when determining the vf->num_vf_qs
> during VF VSI creation.
> 
> Fixes: 12bb018c538c ("ice: Refactor VF reset")
> Signed-off-by: Brett Creeley <brett.creeley@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_lib.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c
> b/drivers/net/ethernet/intel/ice/ice_lib.c
> index 8d4e2ad4328d..116f8556f4a8 100644
> --- a/drivers/net/ethernet/intel/ice/ice_lib.c
> +++ b/drivers/net/ethernet/intel/ice/ice_lib.c
> @@ -192,6 +192,8 @@ static void ice_vsi_set_num_qs(struct ice_vsi *vsi,
> u16 vf_id)
>  		break;
>  	case ICE_VSI_VF:
>  		vf = &pf->vf[vsi->vf_id];
> +		if (vf->num_req_qs)
> +			vf->num_vf_qs = vf->num_req_qs;
>  		vsi->alloc_txq = vf->num_vf_qs;
>  		vsi->alloc_rxq = vf->num_vf_qs;
>  		/* pf->num_msix_per_vf includes (VF miscellaneous vector
> +

Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 8d4e2ad4328d..116f8556f4a8 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -192,6 +192,8 @@  static void ice_vsi_set_num_qs(struct ice_vsi *vsi, u16 vf_id)
 		break;
 	case ICE_VSI_VF:
 		vf = &pf->vf[vsi->vf_id];
+		if (vf->num_req_qs)
+			vf->num_vf_qs = vf->num_req_qs;
 		vsi->alloc_txq = vf->num_vf_qs;
 		vsi->alloc_rxq = vf->num_vf_qs;
 		/* pf->num_msix_per_vf includes (VF miscellaneous vector +