patch 'net/mlx5: fix LRO TCP checksum' has been queued to stable release 20.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Jul 20 12:58:57 CEST 2023


Hi,

FYI, your patch has been queued to stable release 20.11.9

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/09c57bff240fa74e6ac389516dce60f4da998b97

Thanks.

Luca Boccassi

---
>From 09c57bff240fa74e6ac389516dce60f4da998b97 Mon Sep 17 00:00:00 2001
From: Heng Jiang <jiangheng14 at huawei.com>
Date: Tue, 18 Jul 2023 11:56:13 +0300
Subject: [PATCH] net/mlx5: fix LRO TCP checksum

[ upstream commit 776209c4b865ad3e0eaff202c5ff7358b8f5ab57 ]

The variable csum is the sum of three 16 bits integers, the max value
is 0x2FFFD. The corner case of sum of 3 is 0x1FFFF gives the wrong
result: 0x1 + 0xFFFF = 0x10000, the upper 16 bits are not 0.
It must be folded again to ensure that the upper 16 bits are 0.

Fixes: e4c2a16eb1de ("net/mlx5: handle LRO packets in Rx queue")

Signed-off-by: Heng Jiang <jiangheng14 at huawei.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index c8f24dd4ef..ed22612737 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1620,6 +1620,7 @@ mlx5_lro_update_tcp_hdr(struct rte_tcp_hdr *__rte_restrict tcp,
 	tcp->cksum = 0;
 	csum += rte_raw_cksum(tcp, (tcp->data_off >> 4) * 4);
 	csum = ((csum & 0xffff0000) >> 16) + (csum & 0xffff);
+	csum = ((csum & 0xffff0000) >> 16) + (csum & 0xffff);
 	csum = (~csum) & 0xffff;
 	if (csum == 0)
 		csum = 0xffff;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 11:54:24.566507997 +0100
+++ 0008-net-mlx5-fix-LRO-TCP-checksum.patch	2023-07-20 11:54:24.249504750 +0100
@@ -1 +1 @@
-From 776209c4b865ad3e0eaff202c5ff7358b8f5ab57 Mon Sep 17 00:00:00 2001
+From 09c57bff240fa74e6ac389516dce60f4da998b97 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 776209c4b865ad3e0eaff202c5ff7358b8f5ab57 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -17,3 +18,2 @@
- .mailmap                   | 1 +
- drivers/net/mlx5/mlx5_rx.c | 1 +
- 2 files changed, 2 insertions(+)
+ drivers/net/mlx5/mlx5_rxtx.c | 1 +
+ 1 file changed, 1 insertion(+)
@@ -21,17 +21,5 @@
-diff --git a/.mailmap b/.mailmap
-index 9ce554451b..864d33ee46 100644
---- a/.mailmap
-+++ b/.mailmap
-@@ -496,6 +496,7 @@ Helin Zhang <helin.zhang at intel.com>
- Hemant Agrawal <hemant.agrawal at nxp.com> <hemant at freescale.com>
- Heng Ding <hengx.ding at intel.com>
- Hengjian Zhang <hengjianx.zhang at intel.com>
-+Heng Jiang <jiangheng14 at huawei.com>
- Heng Wang <heng.wang at ericsson.com>
- Henning Schild <henning.schild at siemens.com>
- Henry Cai <caihe at huawei.com>
-diff --git a/drivers/net/mlx5/mlx5_rx.c b/drivers/net/mlx5/mlx5_rx.c
-index 71c4638251..392784050f 100644
---- a/drivers/net/mlx5/mlx5_rx.c
-+++ b/drivers/net/mlx5/mlx5_rx.c
-@@ -1090,6 +1090,7 @@ mlx5_lro_update_tcp_hdr(struct rte_tcp_hdr *__rte_restrict tcp,
+diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
+index c8f24dd4ef..ed22612737 100644
+--- a/drivers/net/mlx5/mlx5_rxtx.c
++++ b/drivers/net/mlx5/mlx5_rxtx.c
+@@ -1620,6 +1620,7 @@ mlx5_lro_update_tcp_hdr(struct rte_tcp_hdr *__rte_restrict tcp,


More information about the stable mailing list