[dpdk-stable] patch 'net/bnxt: cleanup code' has been queued to stable release 19.11.10

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Aug 10 17:39:27 CEST 2021


Hi,

FYI, your patch has been queued to stable release 19.11.10

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/12/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/f21240d13a040bf074c17e4fe269050cce8c7848

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From f21240d13a040bf074c17e4fe269050cce8c7848 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Date: Wed, 9 Jun 2021 08:43:29 +0530
Subject: [PATCH] net/bnxt: cleanup code

[ upstream commit 8879ece56832b7f2dd5e5ee10f36e848089f09df ]

This is a cleanup commit and no functional change.

1. use macros instead of hard coded values
2. remove unnecessary comments

Fixes: 5cd0e2889c43 ("net/bnxt: support NIC Partitioning")
Fixes: 2ba07b7dbd9d ("net/bnxt: set the hash key size")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 3 +--
 drivers/net/bnxt/bnxt_hwrm.c   | 5 ++---
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 7f5045c55f..90cee73e51 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -530,7 +530,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
 	dev_info->max_rx_queues = max_rx_rings;
 	dev_info->max_tx_queues = max_rx_rings;
 	dev_info->reta_size = bnxt_rss_hash_tbl_size(bp);
-	dev_info->hash_key_size = 40;
+	dev_info->hash_key_size = HW_HASH_KEY_SIZE;
 	max_vnics = bp->max_vnics;
 
 	/* MTU specifics */
@@ -1469,7 +1469,6 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev,
 	if (rc)
 		return rc;
 
-	/* Retrieve from the default VNIC */
 	if (!vnic)
 		return -EINVAL;
 	if (!vnic->rss_table)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 0701347003..23c5f7c3a2 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2938,7 +2938,6 @@ error:
 	return rc;
 }
 
-/* JIRA 22088 */
 int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu)
 {
 	struct hwrm_func_qcfg_input req = {0};
@@ -2953,8 +2952,8 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu)
 
 	HWRM_CHECK_RESULT();
 
-	/* Hard Coded.. 0xfff VLAN ID mask */
-	bp->vlan = rte_le_to_cpu_16(resp->vlan) & 0xfff;
+	bp->vlan = rte_le_to_cpu_16(resp->vlan) & ETH_VLAN_ID_MAX;
+
 	flags = rte_le_to_cpu_16(resp->flags);
 	if (BNXT_PF(bp) && (flags & HWRM_FUNC_QCFG_OUTPUT_FLAGS_MULTI_HOST))
 		bp->flags |= BNXT_FLAG_MULTI_HOST;
-- 
2.32.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-08-10 15:11:14.844513926 +0200
+++ 0047-net-bnxt-cleanup-code.patch	2021-08-10 15:11:13.018638100 +0200
@@ -1 +1 @@
-From 8879ece56832b7f2dd5e5ee10f36e848089f09df Mon Sep 17 00:00:00 2001
+From f21240d13a040bf074c17e4fe269050cce8c7848 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8879ece56832b7f2dd5e5ee10f36e848089f09df ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -19,2 +20,2 @@
- drivers/net/bnxt/bnxt_hwrm.c   | 4 +---
- 2 files changed, 2 insertions(+), 5 deletions(-)
+ drivers/net/bnxt/bnxt_hwrm.c   | 5 ++---
+ 2 files changed, 3 insertions(+), 5 deletions(-)
@@ -23 +24 @@
-index 1579d797ce..e7fc254173 100644
+index 7f5045c55f..90cee73e51 100644
@@ -26 +27 @@
-@@ -966,7 +966,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
+@@ -530,7 +530,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
@@ -35 +36 @@
-@@ -2071,7 +2071,6 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev,
+@@ -1469,7 +1469,6 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev,
@@ -44 +45 @@
-index be595487e5..13c2b88104 100644
+index 0701347003..23c5f7c3a2 100644
@@ -47 +48 @@
-@@ -3313,7 +3313,6 @@ error:
+@@ -2938,7 +2938,6 @@ error:
@@ -55 +56 @@
-@@ -3330,8 +3329,7 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu)
+@@ -2953,8 +2952,8 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu)
@@ -62,3 +63,4 @@
- 
- 	svif_info = rte_le_to_cpu_16(resp->svif_info);
- 	if (svif_info & HWRM_FUNC_QCFG_OUTPUT_SVIF_INFO_SVIF_VALID)
++
+ 	flags = rte_le_to_cpu_16(resp->flags);
+ 	if (BNXT_PF(bp) && (flags & HWRM_FUNC_QCFG_OUTPUT_FLAGS_MULTI_HOST))
+ 		bp->flags |= BNXT_FLAG_MULTI_HOST;


More information about the stable mailing list