patch 'net/mlx5: fix port initialization with small LRO' has been queued to stable release 21.11.3

Kevin Traynor ktraynor at redhat.com
Wed Nov 23 19:03:31 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.11.3

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

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/4f1a129761a4b93cba0b279d11c70a0c7635aa75

Thanks.

Kevin

---
>From 4f1a129761a4b93cba0b279d11c70a0c7635aa75 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson at nvidia.com>
Date: Wed, 9 Nov 2022 18:50:38 +0200
Subject: [PATCH] net/mlx5: fix port initialization with small LRO

[ upstream commit b9f1f4c2394d1fd03ec2e27f8bad6c24153fa228 ]

If application provided maximal LRO size was less than expected PMD
minimum, the PMD either crashed with assert, if asserts were enabled,
or proceeded with port initialization to set port private maximal
LRO size below supported minimum.

The patch terminates port start if LRO size
does not match PMD requirements and TCP LRO offload was requested
at least for one Rx queue.

Fixes: 50c00baff763 ("net/mlx5: limit LRO size to maximum Rx packet")

Signed-off-by: Gregory Etelson <getelson at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 drivers/net/mlx5/mlx5_rxq.c     |  1 -
 drivers/net/mlx5/mlx5_trigger.c | 16 ++++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 4358671a60..0e14cd9393 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1535,5 +1535,4 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx,
 		max_lro_size -= MLX5_MAX_TCP_HDR_OFFSET;
 	max_lro_size = RTE_MIN(max_lro_size, MLX5_MAX_LRO_SIZE);
-	MLX5_ASSERT(max_lro_size >= MLX5_LRO_SEG_CHUNK_SIZE);
 	max_lro_size /= MLX5_LRO_SEG_CHUNK_SIZE;
 	if (priv->max_lro_msg_size)
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 2ba456ad7a..4800624ea3 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -1090,4 +1090,20 @@ mlx5_dev_start(struct rte_eth_dev *dev)
 		rte_net_mlx5_dynf_inline_mask = 0;
 	if (dev->data->nb_rx_queues > 0) {
+		uint32_t max_lro_msg_size = priv->max_lro_msg_size;
+
+		if (max_lro_msg_size < MLX5_LRO_SEG_CHUNK_SIZE) {
+			uint32_t i;
+			struct mlx5_rxq_priv *rxq;
+
+			for (i = 0; i != priv->rxqs_n; ++i) {
+				rxq = mlx5_rxq_get(dev, i);
+				if (rxq && rxq->ctrl && rxq->ctrl->rxq.lro) {
+					DRV_LOG(ERR, "port %u invalid max LRO size",
+						dev->data->port_id);
+					rte_errno = EINVAL;
+					return -rte_errno;
+				}
+			}
+		}
 		ret = mlx5_dev_configure_rss_reta(dev);
 		if (ret) {
-- 
2.38.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-23 09:55:57.527101461 +0000
+++ 0018-net-mlx5-fix-port-initialization-with-small-LRO.patch	2022-11-23 09:55:57.035149221 +0000
@@ -1 +1 @@
-From b9f1f4c2394d1fd03ec2e27f8bad6c24153fa228 Mon Sep 17 00:00:00 2001
+From 4f1a129761a4b93cba0b279d11c70a0c7635aa75 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b9f1f4c2394d1fd03ec2e27f8bad6c24153fa228 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index 0d9d11680b..724cd6c7e6 100644
+index 4358671a60..0e14cd9393 100644
@@ -29 +30 @@
-@@ -1534,5 +1534,4 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx,
+@@ -1535,5 +1535,4 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx,
@@ -36 +37 @@
-index 4b821a1076..71089299b8 100644
+index 2ba456ad7a..4800624ea3 100644
@@ -39 +40 @@
-@@ -1168,4 +1168,20 @@ continue_dev_start:
+@@ -1090,4 +1090,20 @@ mlx5_dev_start(struct rte_eth_dev *dev)



More information about the stable mailing list