DPDK patches and discussions
 help / color / mirror / Atom feed
From: Somnath Kotur <somnath.kotur@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com
Subject: [dpdk-dev] [PATCH v2 03/17] net/bnxt: fix to set MAX RSS contexts for maximal reservation
Date: Thu, 24 Oct 2019 13:14:18 +0530	[thread overview]
Message-ID: <20191024074432.30705-4-somnath.kotur@broadcom.com> (raw)
In-Reply-To: <20191024074432.30705-1-somnath.kotur@broadcom.com>

From: Ajit Khaparde <ajit.khaparde@broadcom.com>

Configure max RSS contexts in case the firmware indicates a maximal
resource reservation strategy.

Fixes: 6d8109bcb398 ("net/bnxt: check VF resources if resource manager is enabled)
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
v2: Squashed in compilation fix from 04/17 

 drivers/net/bnxt/bnxt_hwrm.c | 4 ++++
 drivers/net/bnxt/bnxt_hwrm.h | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 018113c..3eedd08 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -859,6 +859,10 @@ int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp, bool test)
 		req.num_rsscos_ctxs = rte_cpu_to_le_16(BNXT_VF_RSV_NUM_RSS_CTX);
 		req.num_l2_ctxs = rte_cpu_to_le_16(BNXT_VF_RSV_NUM_L2_CTX);
 		req.num_vnics = rte_cpu_to_le_16(BNXT_VF_RSV_NUM_VNIC);
+	} else if (bp->vf_resv_strategy ==
+		   HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESV_STRATEGY_MAXIMAL) {
+		enables |= HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RSSCOS_CTXS;
+		req.num_rsscos_ctxs = rte_cpu_to_le_16(bp->max_rsscos_ctx);
 	}
 
 	if (test)
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index fcbce60..abe5de9 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -37,6 +37,8 @@ struct bnxt_cp_ring_info;
 
 #define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESV_STRATEGY_MINIMAL_STATIC \
 	HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_MINIMAL_STATIC
+#define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESV_STRATEGY_MAXIMAL \
+	HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_MAXIMAL
 
 #define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_L2_HDR_SRC_FILTER_EN \
 HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_L2_HEADER_SOURCE_FIELDS_SUPPORTED
-- 
2.10.1.613.g2cc2e70


  parent reply	other threads:[~2019-10-24  7:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24  7:44 [dpdk-dev] [PATCH v2 00/17] bnxt patchset with bug fixes Somnath Kotur
2019-10-24  7:44 ` [dpdk-dev] [PATCH 01/17] net/bnxt: fix unused value in free filter mem Somnath Kotur
2019-10-24  7:44 ` [dpdk-dev] [PATCH 02/17] net/bnxt: fix ping failure with MTU change Somnath Kotur
2019-10-24  7:44 ` Somnath Kotur [this message]
2019-10-24  7:44 ` [dpdk-dev] [PATCH 04/17] net/bnxt: fix to write the correct MTU to FW Somnath Kotur
2019-10-24  7:44 ` [dpdk-dev] [PATCH 05/17] net/bnxt: fix RSS configuration failure for thor-based controllers Somnath Kotur
2019-10-24  7:44 ` [dpdk-dev] [PATCH 06/17] net/bnxt: update HWRM API to version 1.10.1.6 Somnath Kotur
2019-10-25 13:22   ` Ferruh Yigit
2019-10-24  7:44 ` [dpdk-dev] [PATCH 07/17] net/bnxt: use mac index, while checking for default mac Somnath Kotur
2019-10-24  7:44 ` [dpdk-dev] [PATCH 08/17] net/bnxt: fix a possible race between start and interrupt handler Somnath Kotur
2019-10-24  7:44 ` [dpdk-dev] [PATCH 09/17] net/bnxt: fix to use HWRM_CFA_L2_FILTER as the filter_type for non-ntuple flows Somnath Kotur
2019-10-24  7:44 ` [dpdk-dev] [PATCH 10/17] net/bnxt: expose some missing counters in port statistics Somnath Kotur
2019-10-24  7:44 ` [dpdk-dev] [PATCH 11/17] net/bnxt: fix to check for zero mac address while parsing flow arguments Somnath Kotur
2019-10-24  7:44 ` [dpdk-dev] [PATCH 12/17] net/bnxt: fix segfault after removing and adding the slaves Somnath Kotur
2019-10-24  7:44 ` [dpdk-dev] [PATCH 13/17] net/bnxt: add more checks for fw reset Somnath Kotur
2019-10-24  7:44 ` [dpdk-dev] [PATCH 14/17] net/bnxt: add PCI IDs for 57500 series NPAR devices Somnath Kotur
2019-10-24  7:44 ` [dpdk-dev] [PATCH 15/17] net/bnxt: add a wrapper function for thor device check Somnath Kotur
2019-10-24  7:44 ` [dpdk-dev] [PATCH 16/17] net/bnxt: fix a possible memory leak Somnath Kotur
2019-10-24  7:44 ` [dpdk-dev] [PATCH 17/17] net/bnxt: call bnxt_uninit_locks from bnxt_uninit_resources Somnath Kotur
2019-10-24 18:40 ` [dpdk-dev] [PATCH v2 00/17] bnxt patchset with bug fixes Ajit Khaparde

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=20191024074432.30705-4-somnath.kotur@broadcom.com \
    --to=somnath.kotur@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).