patch 'net/bnxt: fix tunnel port accounting' has been queued to stable release 19.11.11

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Nov 30 17:34:16 CET 2021


Hi,

FYI, your patch has been queued to stable release 19.11.11

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before December 10th 2021. 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/c3dd66c29ab5a907c9bfcc2877f14879a1373423

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From c3dd66c29ab5a907c9bfcc2877f14879a1373423 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde at broadcom.com>
Date: Fri, 24 Sep 2021 12:52:47 -0700
Subject: [PATCH] net/bnxt: fix tunnel port accounting

[ upstream commit 3cb6659137feb7f3ce411c3e9b4cedf30ebdebe3 ]

Fix the tunnel port counting logic.
Currently we are incrementing the port count without checking
the if bnxt_hwrm_tunnel_dst_port_alloc would return success or failure.
Modify the logic to increment it only if the firmware returns success.

Fixes: 10d074b2022d ("net/bnxt: support tunneling")

Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson at broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 69ecc6d21a..81f9886ff5 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1786,7 +1786,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
 		}
 		tunnel_type =
 			HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN;
-		bp->vxlan_port_cnt++;
 		break;
 	case RTE_TUNNEL_TYPE_GENEVE:
 		if (bp->geneve_port_cnt) {
@@ -1801,7 +1800,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
 		}
 		tunnel_type =
 			HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE;
-		bp->geneve_port_cnt++;
 		break;
 	default:
 		PMD_DRV_LOG(ERR, "Tunnel type is not supported\n");
@@ -1809,6 +1807,18 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
 	}
 	rc = bnxt_hwrm_tunnel_dst_port_alloc(bp, udp_tunnel->udp_port,
 					     tunnel_type);
+
+	if (rc != 0)
+		return rc;
+
+	if (tunnel_type ==
+	    HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN)
+		bp->vxlan_port_cnt++;
+
+	if (tunnel_type ==
+	    HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE)
+		bp->geneve_port_cnt++;
+
 	return rc;
 }
 
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-30 16:50:09.089535163 +0100
+++ 0052-net-bnxt-fix-tunnel-port-accounting.patch	2021-11-30 16:50:05.702872884 +0100
@@ -1 +1 @@
-From 3cb6659137feb7f3ce411c3e9b4cedf30ebdebe3 Mon Sep 17 00:00:00 2001
+From c3dd66c29ab5a907c9bfcc2877f14879a1373423 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3cb6659137feb7f3ce411c3e9b4cedf30ebdebe3 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 857da91c9d..aa7e7fdc85 100644
+index 69ecc6d21a..81f9886ff5 100644
@@ -24 +25 @@
-@@ -2369,7 +2369,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
+@@ -1786,7 +1786,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
@@ -32 +33 @@
-@@ -2384,7 +2383,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
+@@ -1801,7 +1800,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
@@ -40 +41 @@
-@@ -2392,6 +2390,18 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
+@@ -1809,6 +1807,18 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,


More information about the stable mailing list