[dpdk-stable] patch 'net/igc: remove MTU setting limitation' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Mon May 10 17:59:43 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.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 05/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/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f9b6f0ca8b382686cf390db90e0bd95036e3ed6c

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From f9b6f0ca8b382686cf390db90e0bd95036e3ed6c Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu at intel.com>
Date: Fri, 19 Feb 2021 18:01:07 +0800
Subject: [PATCH] net/igc: remove MTU setting limitation
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit 5db232fa5aed20f7b1b2eeed19c17a97259c1261 ]

Currently, if requested MTU is bigger than mbuf size and scattered
receive is not enabled, setting MTU to that value fails.

This patch allows setting this special MTU when device is stopped,
because scattered_rx will be re-configured during next port start
and driver may enable scattered receive according new MTU value.

After this patch, driver may select different receive function
automatically after MTU set, according MTU values selected.

Fixes: a5aeb2b9e225 ("net/igc: support Rx and Tx")

Signed-off-by: Dapeng Yu <dapengx.yu at intel.com>
Acked-by: Jeff Guo <jia.guo at intel.com>
---
 drivers/net/igc/igc_ethdev.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index 802212fc57..75e114b9ca 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -1590,12 +1590,14 @@ eth_igc_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 		return -EINVAL;
 
 	/*
-	 * refuse mtu that requires the support of scattered packets when
-	 * this feature has not been enabled before.
+	 * If device is started, refuse mtu that requires the support of
+	 * scattered packets when this feature has not been enabled before.
 	 */
-	if (!dev->data->scattered_rx &&
-	    frame_size > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM)
+	if (dev->data->dev_started && !dev->data->scattered_rx &&
+	    frame_size > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM) {
+		PMD_INIT_LOG(ERR, "Stop port first.");
 		return -EINVAL;
+	}
 
 	rctl = IGC_READ_REG(hw, IGC_RCTL);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.577615200 +0800
+++ 0035-net-igc-remove-MTU-setting-limitation.patch	2021-05-10 23:59:26.360000000 +0800
@@ -1 +1 @@
-From 5db232fa5aed20f7b1b2eeed19c17a97259c1261 Mon Sep 17 00:00:00 2001
+From f9b6f0ca8b382686cf390db90e0bd95036e3ed6c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit 5db232fa5aed20f7b1b2eeed19c17a97259c1261 ]
@@ -17 +19,0 @@
-Cc: stable at dpdk.org
@@ -26 +28 @@
-index dbaa7a83e5..0ea6e2a045 100644
+index 802212fc57..75e114b9ca 100644


More information about the stable mailing list