All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH S51 07/13] ice: Allow 2 queue pairs per VF on SR-IOV initialization
Date: Wed, 29 Jul 2020 17:19:16 -0700	[thread overview]
Message-ID: <20200730001922.52568-7-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20200730001922.52568-1-anthony.l.nguyen@intel.com>

From: Brett Creeley <brett.creeley@intel.com>

Currently VFs are only allowed to get 16, 4, and 1 queue pair by
default, which require 17, 5, and 2 MSI-X vectors respectively. This
is because each VF needs a MSI-X per data queue and a MSI-X for its
other interrupt. The calculation is based on the number of VFs created,
MSI-X available, and queue pairs available at the time of VF creation.

Unfortunately the values above exclude 2 queue pairs when only 3 MSI-X
are available to each VF based on resource constraints. The current
calculation would default to 2 MSI-X and 1 queue pair. This is a waste
of resources, so fix this by allowing 2 queue pairs per VF when there
are between 2 and 5 MSI-X available per VF.

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 2 ++
 drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
index d48452e3a49b..0ba54b39ab43 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
@@ -932,6 +932,8 @@ static int ice_set_per_vf_res(struct ice_pf *pf)
 		num_msix_per_vf = ICE_NUM_VF_MSIX_MED;
 	} else if (msix_avail_per_vf >= ICE_NUM_VF_MSIX_SMALL) {
 		num_msix_per_vf = ICE_NUM_VF_MSIX_SMALL;
+	} else if (msix_avail_per_vf >= ICE_NUM_VF_MSIX_MULTIQ_MIN) {
+		num_msix_per_vf = ICE_NUM_VF_MSIX_MULTIQ_MIN;
 	} else if (msix_avail_per_vf >= ICE_MIN_INTR_PER_VF) {
 		num_msix_per_vf = ICE_MIN_INTR_PER_VF;
 	} else {
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
index 049e0b583383..0f519fba3770 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
@@ -32,6 +32,7 @@
 #define ICE_MAX_RSS_QS_PER_VF		16
 #define ICE_NUM_VF_MSIX_MED		17
 #define ICE_NUM_VF_MSIX_SMALL		5
+#define ICE_NUM_VF_MSIX_MULTIQ_MIN	3
 #define ICE_MIN_INTR_PER_VF		(ICE_MIN_QS_PER_VF + 1)
 #define ICE_MAX_VF_RESET_TRIES		40
 #define ICE_MAX_VF_RESET_SLEEP_MS	20
-- 
2.20.1


  parent reply	other threads:[~2020-07-30  0:19 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30  0:19 [Intel-wired-lan] [PATCH S51 01/13] ice: rename misleading grst_delay variable Tony Nguyen
2020-07-30  0:19 ` [Intel-wired-lan] [PATCH S51 02/13] ice: fix the vsi_id mask to be 10 bit for set_rss_lut Tony Nguyen
2020-07-31 19:57   ` Bowers, AndrewX
2020-07-30  0:19 ` [Intel-wired-lan] [PATCH S51 03/13] ice: Fix RSS profile locks Tony Nguyen
2020-07-31 19:57   ` Bowers, AndrewX
2020-07-30  0:19 ` [Intel-wired-lan] [PATCH S51 04/13] ice: remove page_reuse statistic Tony Nguyen
2020-07-31 19:59   ` Bowers, AndrewX
2020-07-30  0:19 ` [Intel-wired-lan] [PATCH S51 05/13] ice: add useful statistics Tony Nguyen
2020-07-31 19:59   ` Bowers, AndrewX
2020-07-30  0:19 ` [Intel-wired-lan] [PATCH S51 06/13] ice: Clear and free XLT entries on reset Tony Nguyen
2020-07-31 19:58   ` Bowers, AndrewX
2020-07-30  0:19 ` Tony Nguyen [this message]
2020-07-31 20:00   ` [Intel-wired-lan] [PATCH S51 07/13] ice: Allow 2 queue pairs per VF on SR-IOV initialization Bowers, AndrewX
2020-07-30  0:19 ` [Intel-wired-lan] [PATCH S51 08/13] ice: port fix for chk_linearlize Tony Nguyen
2020-07-31 19:56   ` Bowers, AndrewX
2020-07-30  0:19 ` [Intel-wired-lan] [PATCH S51 09/13] ice: Graceful error handling in HW table calloc failure Tony Nguyen
2020-07-31 19:58   ` Bowers, AndrewX
2020-07-30  0:19 ` [Intel-wired-lan] [PATCH S51 10/13] ice: Disable VLAN pruning in promiscuous mode Tony Nguyen
2020-07-31 19:58   ` Bowers, AndrewX
2020-07-30  0:19 ` [Intel-wired-lan] [PATCH S51 11/13] ice: update PTYPE lookup table Tony Nguyen
2020-07-31 19:58   ` Bowers, AndrewX
2020-07-30  0:19 ` [Intel-wired-lan] [PATCH S51 12/13] ice: adjust profile id map locks Tony Nguyen
2020-07-31 19:57   ` Bowers, AndrewX
2020-07-30  0:19 ` [Intel-wired-lan] [PATCH S51 13/13] ice: Misc minor fixes Tony Nguyen
2020-07-31 19:56   ` Bowers, AndrewX
2020-07-31 19:59 ` [Intel-wired-lan] [PATCH S51 01/13] ice: rename misleading grst_delay variable Bowers, AndrewX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200730001922.52568-7-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.