patch 'net/mlx5: fix maximum LRO message size' has been queued to stable release 20.11.7
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue Nov 22 23:02:35 CET 2022
Hi,
FYI, your patch has been queued to stable release 20.11.7
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/24/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/ee96651e5a998f0b84e7f84936ae676281876fe5
Thanks.
Luca Boccassi
---
>From ee96651e5a998f0b84e7f84936ae676281876fe5 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 69fb34826d..1f47c433eb 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -981,7 +981,7 @@ struct mlx5_priv {
uint32_t refcnt; /**< Reference counter. */
/**< 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;
/* Tags resources cache. */
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 b2c770f537..b0bc61bd7b 100644
--- a/drivers/net/mlx5/mlx5_devx.c
+++ b/drivers/net/mlx5/mlx5_devx.c
@@ -905,7 +905,8 @@ mlx5_devx_tir_attr_set(struct rte_eth_dev *dev, const uint8_t *rss_key,
MLX5_TIRC_SELF_LB_BLOCK_BLOCK_UNICAST;
if (lro) {
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 |
MLX5_TIRC_LRO_ENABLE_MASK_IPV6_LRO;
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 048d1c571b..5d659738fe 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1378,7 +1378,6 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx,
MLX5_MAX_TCP_HDR_OFFSET)
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 =
RTE_MIN((uint32_t)priv->max_lro_msg_size, max_lro_size);
@@ -1386,8 +1385,7 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx,
priv->max_lro_msg_size = max_lro_size;
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.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-11-22 22:01:32.257195291 +0000
+++ 0011-net-mlx5-fix-maximum-LRO-message-size.patch 2022-11-22 22:01:31.515524803 +0000
@@ -1 +1 @@
-From a23640047c361500c0fe4a3e52394bb7b2e9faa5 Mon Sep 17 00:00:00 2001
+From ee96651e5a998f0b84e7f84936ae676281876fe5 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 69fb34826d..1f47c433eb 100644
@@ -29 +30 @@
-@@ -1711,7 +1711,7 @@ struct mlx5_priv {
+@@ -981,7 +981,7 @@ struct mlx5_priv {
@@ -34,0 +36 @@
+ /* Tags resources cache. */
@@ -37 +38,0 @@
- struct mlx5_stats_ctrl stats_ctrl; /* Stats control. */
@@ -39 +40 @@
-index c1305836cf..02deaac612 100644
+index b2c770f537..b0bc61bd7b 100644
@@ -42 +43,2 @@
-@@ -870,7 +870,8 @@ mlx5_devx_tir_attr_set(struct rte_eth_dev *dev, const uint8_t *rss_key,
+@@ -905,7 +905,8 @@ mlx5_devx_tir_attr_set(struct rte_eth_dev *dev, const uint8_t *rss_key,
+ MLX5_TIRC_SELF_LB_BLOCK_BLOCK_UNICAST;
@@ -44,2 +46 @@
- MLX5_ASSERT(priv->sh->config.lro_allowed);
- tir_attr->lro_timeout_period_usecs = priv->config.lro_timeout;
+ tir_attr->lro_timeout_period_usecs = priv->config.lro.timeout;
@@ -53 +54 @@
-index 724cd6c7e6..81aa3f074a 100644
+index 048d1c571b..5d659738fe 100644
@@ -56 +57 @@
-@@ -1533,7 +1533,6 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx,
+@@ -1378,7 +1378,6 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx,
@@ -64 +65 @@
-@@ -1541,8 +1540,7 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx,
+@@ -1386,8 +1385,7 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx,
More information about the stable
mailing list