patch 'net/bnxt: fix flow create when RSS is disabled' has been queued to stable release 21.11.1

Kevin Traynor ktraynor at redhat.com
Mon Feb 21 16:34:07 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/b0fe5e2fa9a0515c78532b097212497d61c5cc7e

Thanks.

Kevin

---
>From b0fe5e2fa9a0515c78532b097212497d61c5cc7e Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Date: Tue, 4 Jan 2022 14:08:16 +0530
Subject: [PATCH] net/bnxt: fix flow create when RSS is disabled

[ upstream commit 59119d49529e9e940297296167e0490f56b4bb66 ]

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")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at 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 614ea57d87..3df80f50db 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -696,7 +696,4 @@ struct bnxt {
 #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)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 80de320970..83fb3861c3 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -787,15 +787,9 @@ skip_cosq_cfg:
 	}
 
-	/* 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;
 	}
 
@@ -5231,8 +5225,4 @@ static int bnxt_get_config(struct bnxt *bp)
 		return rc;
 
-	rc = bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(bp);
-	if (rc)
-		return rc;
-
 	bnxt_hwrm_port_mac_qcfg(bp);
 
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index d062be5525..f7c90c442f 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1294,11 +1294,4 @@ start:
 		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) {
@@ -1365,5 +1358,5 @@ use_vnic:
 			    "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
@@ -2064,8 +2057,5 @@ 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) {
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 6093407986..f90c22a9f7 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -6107,36 +6107,4 @@ int bnxt_hwrm_cfa_pair_free(struct bnxt *bp, struct bnxt_representor *rep_bp)
 }
 
-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 8202455bf0..21e1b7a499 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -59,7 +59,4 @@ struct hwrm_func_qstats_output;
 	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
@@ -297,5 +294,4 @@ 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);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-02-21 15:22:45.915712426 +0000
+++ 0058-net-bnxt-fix-flow-create-when-RSS-is-disabled.patch	2022-02-21 15:22:44.133704220 +0000
@@ -1 +1 @@
-From 59119d49529e9e940297296167e0490f56b4bb66 Mon Sep 17 00:00:00 2001
+From b0fe5e2fa9a0515c78532b097212497d61c5cc7e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 59119d49529e9e940297296167e0490f56b4bb66 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -38 +39 @@
-index a5b960c246..00acdb7be6 100644
+index 80de320970..83fb3861c3 100644
@@ -61 +62 @@
-@@ -5233,8 +5227,4 @@ static int bnxt_get_config(struct bnxt *bp)
+@@ -5231,8 +5225,4 @@ static int bnxt_get_config(struct bnxt *bp)



More information about the stable mailing list