patch 'net/mlx5: fix maximum LRO message size' has been queued to stable release 21.11.3

Kevin Traynor ktraynor at redhat.com
Wed Nov 23 19:04:06 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/8e04bc3773df69b44df18f58da7182e826a8ed24

Thanks.

Kevin

---
>From 8e04bc3773df69b44df18f58da7182e826a8ed24 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson at nvidia.com>
Date: Thu, 17 Nov 2022 16:39:00 +0200
Subject: [PATCH] net/mlx5: fix maximum LRO message size

[ upstream commit a23640047c361500c0fe4a3e52394bb7b2e9faa5 ]

The PMD analyzes each Rx queue maximal LRO size and selects one that
fits all queues to configure TIR LRO attribute.
TIR LRO attribute is number of 256 bytes chunks that match the
selected maximal LRO size.

PMD used `priv->max_lro_msg_size` for selected maximal LRO size and
number of TIR chunks.

Fixes: b9f1f4c239 ("net/mlx5: fix port initialization with small LRO")

Signed-off-by: Gregory Etelson <getelson at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 drivers/net/mlx5/mlx5.h      | 2 +-
 drivers/net/mlx5/mlx5_devx.c | 3 ++-
 drivers/net/mlx5/mlx5_rxq.c  | 4 +---
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 128ebd6937..e99831a6bb 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -1453,5 +1453,5 @@ struct mlx5_priv {
 	/**< Verbs modify header action object. */
 	uint8_t ft_type; /**< Flow table type, Rx or Tx. */
-	uint8_t max_lro_msg_size;
+	uint32_t max_lro_msg_size;
 	uint32_t link_speed_capa; /* Link speed capabilities. */
 	struct mlx5_xstats_ctrl xstats_ctrl; /* Extended stats control. */
diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c
index 44c439bb55..0d5de8303b 100644
--- a/drivers/net/mlx5/mlx5_devx.c
+++ b/drivers/net/mlx5/mlx5_devx.c
@@ -772,5 +772,6 @@ mlx5_devx_tir_attr_set(struct rte_eth_dev *dev, const uint8_t *rss_key,
 		MLX5_ASSERT(priv->config.lro.supported);
 		tir_attr->lro_timeout_period_usecs = priv->config.lro.timeout;
-		tir_attr->lro_max_msg_sz = priv->max_lro_msg_size;
+		tir_attr->lro_max_msg_sz =
+			priv->max_lro_msg_size / MLX5_LRO_SEG_CHUNK_SIZE;
 		tir_attr->lro_enable_mask =
 				MLX5_TIRC_LRO_ENABLE_MASK_IPV4_LRO |
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 0e14cd9393..6bc89a2e5c 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);
-	max_lro_size /= MLX5_LRO_SEG_CHUNK_SIZE;
 	if (priv->max_lro_msg_size)
 		priv->max_lro_msg_size =
@@ -1543,6 +1542,5 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx,
 	DRV_LOG(DEBUG,
 		"port %u Rx Queue %u max LRO message size adjusted to %u bytes",
-		dev->data->port_id, idx,
-		priv->max_lro_msg_size * MLX5_LRO_SEG_CHUNK_SIZE);
+		dev->data->port_id, idx, priv->max_lro_msg_size);
 }
 
-- 
2.38.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-23 09:55:58.295350469 +0000
+++ 0053-net-mlx5-fix-maximum-LRO-message-size.patch	2022-11-23 09:55:57.112149415 +0000
@@ -1 +1 @@
-From a23640047c361500c0fe4a3e52394bb7b2e9faa5 Mon Sep 17 00:00:00 2001
+From 8e04bc3773df69b44df18f58da7182e826a8ed24 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a23640047c361500c0fe4a3e52394bb7b2e9faa5 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index 02bee5808d..31982002ee 100644
+index 128ebd6937..e99831a6bb 100644
@@ -29 +30 @@
-@@ -1712,5 +1712,5 @@ struct mlx5_priv {
+@@ -1453,5 +1453,5 @@ struct mlx5_priv {
@@ -37 +38 @@
-index c1305836cf..02deaac612 100644
+index 44c439bb55..0d5de8303b 100644
@@ -40,3 +41,3 @@
-@@ -871,5 +871,6 @@ mlx5_devx_tir_attr_set(struct rte_eth_dev *dev, const uint8_t *rss_key,
- 		MLX5_ASSERT(priv->sh->config.lro_allowed);
- 		tir_attr->lro_timeout_period_usecs = priv->config.lro_timeout;
+@@ -772,5 +772,6 @@ mlx5_devx_tir_attr_set(struct rte_eth_dev *dev, const uint8_t *rss_key,
+ 		MLX5_ASSERT(priv->config.lro.supported);
+ 		tir_attr->lro_timeout_period_usecs = priv->config.lro.timeout;
@@ -49 +50 @@
-index 724cd6c7e6..81aa3f074a 100644
+index 0e14cd9393..6bc89a2e5c 100644
@@ -52 +53 @@
-@@ -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,
@@ -58 +59 @@
-@@ -1542,6 +1541,5 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx,
+@@ -1543,6 +1542,5 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx,



More information about the stable mailing list