patch 'net/i40e: fix maximum frame size configuration' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Sun Apr 9 17:23:57 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/11/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/8ec56c115aa1debcc3f672eb95ba646e9b2d6da5

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 8ec56c115aa1debcc3f672eb95ba646e9b2d6da5 Mon Sep 17 00:00:00 2001
From: Simei Su <simei.su at intel.com>
Date: Mon, 6 Mar 2023 20:18:53 +0800
Subject: [PATCH] net/i40e: fix maximum frame size configuration
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 82fcf20d039c5990ea7829cea2996c530d260fab ]

This patch sets max frame size at port level rather than queue level
to avoid unexpected packets received by port.

Fixes: a8ca8edf8c07 ("net/i40e: revert link status check on device start")

Signed-off-by: Simei Su <simei.su at intel.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index a982e42264..371f42233e 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1710,11 +1710,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
 	 */
 	i40e_add_tx_flow_control_drop_filter(pf);
 
-	/* Set the max frame size to 0x2600 by default,
-	 * in case other drivers changed the default value.
-	 */
-	i40e_aq_set_mac_config(hw, I40E_FRAME_SIZE_MAX, TRUE, false, 0, NULL);
-
 	/* initialize RSS rule list */
 	TAILQ_INIT(&pf->rss_config_list);
 
@@ -2332,6 +2327,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
 	uint32_t intr_vector = 0;
 	struct i40e_vsi *vsi;
 	uint16_t nb_rxq, nb_txq;
+	uint16_t max_frame_size;
 
 	hw->adapter_stopped = 0;
 
@@ -2452,7 +2448,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
 			PMD_DRV_LOG(WARNING, "Fail to set phy mask");
 
 		/* Call get_link_info aq command to enable/disable LSE */
-		i40e_dev_link_update(dev, 0);
+		i40e_dev_link_update(dev, 1);
 	}
 
 	if (dev->data->dev_conf.intr_conf.rxq == 0) {
@@ -2470,6 +2466,13 @@ i40e_dev_start(struct rte_eth_dev *dev)
 			    "please call hierarchy_commit() "
 			    "before starting the port");
 
+	max_frame_size = dev->data->mtu ?
+		dev->data->mtu + I40E_ETH_OVERHEAD :
+		I40E_FRAME_SIZE_MAX;
+
+	/* Set the max frame size to HW*/
+	i40e_aq_set_mac_config(hw, max_frame_size, TRUE, false, 0, NULL);
+
 	return I40E_SUCCESS;
 
 tx_err:
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-04-09 21:45:40.039770000 +0800
+++ 0049-net-i40e-fix-maximum-frame-size-configuration.patch	2023-04-09 21:45:38.649042200 +0800
@@ -1 +1 @@
-From 82fcf20d039c5990ea7829cea2996c530d260fab Mon Sep 17 00:00:00 2001
+From 8ec56c115aa1debcc3f672eb95ba646e9b2d6da5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 82fcf20d039c5990ea7829cea2996c530d260fab ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list