DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, ajit.khaparde@broadcom.com
Subject: [dpdk-dev] [PATCH 10/18] net/bnxt: fix flow create when RSS is disabled
Date: Tue,  4 Jan 2022 14:08:16 +0530	[thread overview]
Message-ID: <20220104083824.23001-11-kalesh-anakkur.purayil@broadcom.com> (raw)
In-Reply-To: <20220104083824.23001-1-kalesh-anakkur.purayil@broadcom.com>

From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

This patch reverts the commit "5d47d06b2c83".
Revert this commit as it caused a regression on legacy chips.
On newer chips we use TruFlow based flow creation instead of
HWRM based flow creation.

Fixes: 5d47d06b2c83 ("net/bnxt: modify VNIC accounting")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  3 ---
 drivers/net/bnxt/bnxt_ethdev.c | 18 ++++--------------
 drivers/net/bnxt/bnxt_flow.c   | 14 ++------------
 drivers/net/bnxt/bnxt_hwrm.c   | 32 --------------------------------
 drivers/net/bnxt/bnxt_hwrm.h   |  4 ----
 5 files changed, 6 insertions(+), 65 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 614ea57..3df80f5 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -695,9 +695,6 @@ struct bnxt {
 #define BNXT_FLAG_FLOW_XSTATS_EN		BIT(25)
 #define BNXT_FLAG_DFLT_MAC_SET			BIT(26)
 #define BNXT_FLAG_GFID_ENABLE			BIT(27)
-#define BNXT_FLAG_RFS_NEEDS_VNIC		BIT(28)
-#define BNXT_FLAG_FLOW_CFA_RFS_RING_TBL_IDX_V2	BIT(29)
-#define BNXT_RFS_NEEDS_VNIC(bp)	((bp)->flags & BNXT_FLAG_RFS_NEEDS_VNIC)
 #define BNXT_PF(bp)		(!((bp)->flags & BNXT_FLAG_VF))
 #define BNXT_VF(bp)		((bp)->flags & BNXT_FLAG_VF)
 #define BNXT_NPAR(bp)		((bp)->flags & BNXT_FLAG_NPAR_PF)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index a5b960c..00acdb7 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -786,17 +786,11 @@ static int bnxt_start_nic(struct bnxt *bp)
 		}
 	}
 
-	/* default vnic 0 */
-	rc = bnxt_setup_one_vnic(bp, 0);
-	if (rc)
-		goto err_out;
 	/* VNIC configuration */
-	if (BNXT_RFS_NEEDS_VNIC(bp)) {
-		for (i = 1; i < bp->nr_vnics; i++) {
-			rc = bnxt_setup_one_vnic(bp, i);
-			if (rc)
-				goto err_out;
-		}
+	for (i = 0; i < bp->nr_vnics; i++) {
+		rc = bnxt_setup_one_vnic(bp, i);
+		if (rc)
+			goto err_out;
 	}
 
 	for (j = 0; j < bp->tx_nr_rings; j++) {
@@ -5232,10 +5226,6 @@ static int bnxt_get_config(struct bnxt *bp)
 	if (rc)
 		return rc;
 
-	rc = bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(bp);
-	if (rc)
-		return rc;
-
 	bnxt_hwrm_port_mac_qcfg(bp);
 
 	bnxt_hwrm_parent_pf_qcfg(bp);
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index d062be5..f7c90c4 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1293,13 +1293,6 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
 		}
 		PMD_DRV_LOG(DEBUG, "Queue index %d\n", act_q->index);
 
-		if (use_ntuple && !BNXT_RFS_NEEDS_VNIC(bp)) {
-			filter->flags =
-				HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_DEST_RFS_RING_IDX;
-			filter->dst_id = act_q->index;
-			goto skip_vnic_alloc;
-		}
-
 		vnic_id = attr->group;
 		if (!vnic_id) {
 			PMD_DRV_LOG(DEBUG, "Group id is 0\n");
@@ -1364,7 +1357,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
 		PMD_DRV_LOG(DEBUG,
 			    "Setting vnic ff_idx %d\n", vnic->ff_pool_idx);
 		filter->dst_id = vnic->fw_vnic_id;
-skip_vnic_alloc:
+
 		/* For ntuple filter, create the L2 filter with default VNIC.
 		 * The user specified redirect queue will be set while creating
 		 * the ntuple filter in hardware.
@@ -2063,10 +2056,7 @@ bnxt_flow_create(struct rte_eth_dev *dev,
 		}
 	}
 
-	if (BNXT_RFS_NEEDS_VNIC(bp))
-		vnic = find_matching_vnic(bp, filter);
-	else
-		vnic = BNXT_GET_DEFAULT_VNIC(bp);
+	vnic = find_matching_vnic(bp, filter);
 done:
 	if (!ret || update_flow) {
 		flow->filter = filter;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 35d6982..ceb6808 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -6106,38 +6106,6 @@ int bnxt_hwrm_cfa_pair_free(struct bnxt *bp, struct bnxt_representor *rep_bp)
 	return rc;
 }
 
-int bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(struct bnxt *bp)
-{
-	struct hwrm_cfa_adv_flow_mgnt_qcaps_output *resp =
-					bp->hwrm_cmd_resp_addr;
-	struct hwrm_cfa_adv_flow_mgnt_qcaps_input req = {0};
-	uint32_t flags = 0;
-	int rc = 0;
-
-	if (!(bp->fw_cap & BNXT_FW_CAP_ADV_FLOW_MGMT))
-		return 0;
-
-	if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
-		PMD_DRV_LOG(DEBUG,
-			    "Not a PF or trusted VF. Command not supported\n");
-		return 0;
-	}
-
-	HWRM_PREP(&req, HWRM_CFA_ADV_FLOW_MGNT_QCAPS, BNXT_USE_CHIMP_MB);
-	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
-
-	HWRM_CHECK_RESULT();
-	flags = rte_le_to_cpu_32(resp->flags);
-	HWRM_UNLOCK();
-
-	if (flags & HWRM_CFA_ADV_FLOW_MGNT_QCAPS_RFS_RING_TBL_IDX_V2_SUPPORTED)
-		bp->flags |= BNXT_FLAG_FLOW_CFA_RFS_RING_TBL_IDX_V2;
-	else
-		bp->flags |= BNXT_FLAG_RFS_NEEDS_VNIC;
-
-	return rc;
-}
-
 int bnxt_hwrm_fw_echo_reply(struct bnxt *bp, uint32_t echo_req_data1,
 			    uint32_t echo_req_data2)
 {
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 8202455..21e1b7a 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -58,9 +58,6 @@ struct hwrm_func_qstats_output;
 #define HWRM_PORT_PHY_CFG_IN_EN_AUTO_LINK_SPEED_MASK \
 	HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_LINK_SPEED_MASK
 
-#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_RFS_RING_TBL_IDX_V2_SUPPORTED \
-	HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_RFS_RING_TBL_IDX_V2_SUPPORTED
-
 #define HWRM_SPEC_CODE_1_8_4		0x10804
 #define HWRM_SPEC_CODE_1_9_0		0x10900
 #define HWRM_SPEC_CODE_1_9_2		0x10902
@@ -296,7 +293,6 @@ int bnxt_hwrm_first_vf_id_query(struct bnxt *bp, uint16_t fid,
 int bnxt_hwrm_cfa_pair_exists(struct bnxt *bp, struct bnxt_representor *rep_bp);
 int bnxt_hwrm_cfa_pair_alloc(struct bnxt *bp, struct bnxt_representor *rep);
 int bnxt_hwrm_cfa_pair_free(struct bnxt *bp, struct bnxt_representor *rep);
-int bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(struct bnxt *bp);
 int bnxt_hwrm_fw_echo_reply(struct bnxt *bp, uint32_t echo_req_data1,
 			    uint32_t echo_req_data2);
 int bnxt_hwrm_poll_ver_get(struct bnxt *bp);
-- 
2.10.1


  parent reply	other threads:[~2022-01-04  8:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-04  8:38 [dpdk-dev] [PATCH 00/18] bnxt PMD fixes Kalesh A P
2022-01-04  8:38 ` [dpdk-dev] [PATCH 01/18] net/bnxt: fix bnxt_dev_set_mc_addr_list_op Kalesh A P
2022-01-04  8:38 ` [dpdk-dev] [PATCH 02/18] net/bnxt: fix to restore mcast macs during reset recovery Kalesh A P
2022-01-04  8:38 ` [dpdk-dev] [PATCH 03/18] net/bnxt: fix queue stop operation Kalesh A P
2022-01-04  8:38 ` [dpdk-dev] [PATCH 04/18] net/bnxt: restore RSS configuration after reset recovery Kalesh A P
2022-01-04  8:38 ` [dpdk-dev] [PATCH 05/18] net/bnxt: fix restoring VLAN filtering after recovery Kalesh A P
2022-01-04  8:38 ` [dpdk-dev] [PATCH 06/18] net/bnxt: fix to cap max number of unicast MACs Kalesh A P
2022-01-04  8:38 ` [dpdk-dev] [PATCH 07/18] net/bnxt: set fast-path pointers only if recovery succeeds Kalesh A P
2022-01-04  8:38 ` [dpdk-dev] [PATCH 08/18] net/bnxt: improve recovery related log messages Kalesh A P
2022-01-04  8:38 ` [dpdk-dev] [PATCH 09/18] net/bnxt: add null check for mark table Kalesh A P
2022-01-04  8:38 ` Kalesh A P [this message]
2022-01-04  8:38 ` [dpdk-dev] [PATCH 11/18] net/bnxt: get max supported multicast filters count Kalesh A P
2022-01-04  8:38 ` [dpdk-dev] [PATCH 12/18] net/bnxt: refactor bnxt_stop_rxtx() for reuse Kalesh A P
2022-01-04  8:38 ` [dpdk-dev] [PATCH 13/18] net/bnxt: fix handling of VF configuration changes Kalesh A P
2022-01-04  8:38 ` [dpdk-dev] [PATCH 14/18] net/bnxt: fix ring teardown Kalesh A P
2022-01-04  8:38 ` [dpdk-dev] [PATCH 15/18] net/bnxt: fix PAM4 mask setting Kalesh A P
2022-01-04  8:38 ` [dpdk-dev] [PATCH 16/18] net/bnxt: fix pointer access Kalesh A P
2022-01-04  8:38 ` [dpdk-dev] [PATCH 17/18] net/bnxt: fix incorrect memset in bnxt_dev_xstats_get_op Kalesh A P
2022-01-04  8:38 ` [dpdk-dev] [PATCH 18/18] net/bnxt: check VF rep pointer before access Kalesh A P
2022-01-12  2:09 ` [dpdk-dev] [PATCH 00/18] bnxt PMD 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=20220104083824.23001-11-kalesh-anakkur.purayil@broadcom.com \
    --to=kalesh-anakkur.purayil@broadcom.com \
    --cc=ajit.khaparde@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).