patch 'net/bnxt: cleanup MTU setting' has been queued to stable release 19.11.13

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Thu Jul 7 09:55:11 CEST 2022


Hi,

FYI, your patch has been queued to stable release 19.11.13

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From ccdd69c5dd08f7a776ee1d3af5b2c685998c00f4 Mon Sep 17 00:00:00 2001
From: Damodharam Ammepalli <damodharam.ammepalli at broadcom.com>
Date: Wed, 15 Jun 2022 20:27:02 +0530
Subject: [PATCH] net/bnxt: cleanup MTU setting

[ upstream commit 89670e3b0f852615c29c510d5f6c04d147675c7e ]

Minor cleanup in bnxt_mtu_set_op() to move pre-mature
setting of jumbo flag post mtu check and remove
a redundant mtu set operation from rxq vnic configs.

Fixes: daef48efe5e5 ("net/bnxt: support set MTU")

Signed-off-by: Damodharam Ammepalli <damodharam.ammepalli 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_ethdev.c | 8 ++++----
 drivers/net/bnxt/bnxt_rxq.c    | 4 ----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 9c1578e0e9..1f50a449d9 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2428,6 +2428,10 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
 	}
 #endif
 
+	/* Is there a change in mtu setting? */
+	if (eth_dev->data->dev_conf.rxmode.max_rx_pkt_len == new_pkt_size)
+		return rc;
+
 	if (new_mtu > RTE_ETHER_MTU) {
 		bp->flags |= BNXT_FLAG_JUMBO;
 		bp->eth_dev->data->dev_conf.rxmode.offloads |=
@@ -2438,10 +2442,6 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
 		bp->flags &= ~BNXT_FLAG_JUMBO;
 	}
 
-	/* Is there a change in mtu setting? */
-	if (eth_dev->data->dev_conf.rxmode.max_rx_pkt_len == new_pkt_size)
-		return rc;
-
 	for (i = 0; i < bp->nr_vnics; i++) {
 		struct bnxt_vnic_info *vnic = &bp->vnic_info[i];
 		uint16_t size = 0;
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 9d8efe0185..616a0d2360 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -348,10 +348,6 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
 	}
 	eth_dev->data->rx_queue_state[queue_idx] = queue_state;
 
-	/* Configure mtu if it is different from what was configured before */
-	if (!queue_idx)
-		bnxt_mtu_set_op(eth_dev, eth_dev->data->mtu);
-
 	return 0;
 err:
 	bnxt_rx_queue_release_op(rxq);
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:14.292865623 +0200
+++ 0076-net-bnxt-cleanup-MTU-setting.patch	2022-07-07 09:54:11.005824864 +0200
@@ -1 +1 @@
-From 89670e3b0f852615c29c510d5f6c04d147675c7e Mon Sep 17 00:00:00 2001
+From ccdd69c5dd08f7a776ee1d3af5b2c685998c00f4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 89670e3b0f852615c29c510d5f6c04d147675c7e ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index f040cdcf94..e275d3a53f 100644
+index 9c1578e0e9..1f50a449d9 100644
@@ -25,3 +26,3 @@
-@@ -3037,15 +3037,15 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
- 	if (!eth_dev->data->nb_rx_queues)
- 		return -ENOTSUP;
+@@ -2428,6 +2428,10 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
+ 	}
+ #endif
@@ -30,2 +31,2 @@
-+	if (eth_dev->data->mtu == new_mtu)
-+		return 0;
++	if (eth_dev->data->dev_conf.rxmode.max_rx_pkt_len == new_pkt_size)
++		return rc;
@@ -33 +34 @@
- 	if (new_mtu > RTE_ETHER_MTU)
+ 	if (new_mtu > RTE_ETHER_MTU) {
@@ -35 +36,2 @@
- 	else
+ 		bp->eth_dev->data->dev_conf.rxmode.offloads |=
+@@ -2438,10 +2442,6 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
@@ -36,0 +39 @@
+ 	}
@@ -39,2 +42,2 @@
--	if (eth_dev->data->mtu == new_mtu)
--		return 0;
+-	if (eth_dev->data->dev_conf.rxmode.max_rx_pkt_len == new_pkt_size)
+-		return rc;
@@ -46 +49 @@
-index f4b641773d..fabbbd4560 100644
+index 9d8efe0185..616a0d2360 100644
@@ -49,3 +52,3 @@
-@@ -402,10 +402,6 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
- 	rxq->rx_started = rxq->rx_deferred_start ? false : true;
- 	rxq->vnic = BNXT_GET_DEFAULT_VNIC(bp);
+@@ -348,10 +348,6 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
+ 	}
+ 	eth_dev->data->rx_queue_state[queue_idx] = queue_state;
@@ -59 +62 @@
- 	bnxt_rx_queue_release_op(eth_dev, queue_idx);
+ 	bnxt_rx_queue_release_op(rxq);


More information about the stable mailing list