[dpdk-stable] patch 'net/mlx5: fix LRO checksum' has been queued to stable release 19.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Jul 24 13:57:52 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.4

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/26/20. 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.

Thanks.

Luca Boccassi

---
>From caedd7c3682922aeb7b3ba7747655da90cc8dac4 Mon Sep 17 00:00:00 2001
From: Dong Zhou <dongz at mellanox.com>
Date: Fri, 12 Jun 2020 11:57:46 +0300
Subject: [PATCH] net/mlx5: fix LRO checksum

[ upstream commit eb10fe7fb150d3a9c1ef01134403f85890d5e06e ]

The TCP checksum includes IPV4 pseudo-header checksum and L3
payload checksum which include TCP header and TCP payload.
When mlx5 LRO is enabled, HW will calculate the TCP payload
checksum, PMD need complete the IPV4 pseudo-header checksum
and the TCP header checksum.

The mlx5_lro_update_tcp_hdr function completes the TCP header
checksum, but this function using lower 4 bits of data-offset
field in TCP header to get the whole TCP header length, this
will cause TCP header checksum wrong calculation.

Update the code using higher 4 bits of data-offset field
instead of lower 4 bits.

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

Signed-off-by: Dong Zhou <dongz at mellanox.com>
Acked-by: Matan Azrad <matan at mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 90625e71f..a9c618128 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1439,7 +1439,7 @@ mlx5_lro_update_tcp_hdr(struct rte_tcp_hdr *restrict tcp,
 	if (cqe->lro_tcppsh_abort_dupack & MLX5_CQE_LRO_PUSH_MASK)
 		tcp->tcp_flags |= RTE_TCP_PSH_FLAG;
 	tcp->cksum = 0;
-	csum += rte_raw_cksum(tcp, (tcp->data_off & 0xF) * 4);
+	csum += rte_raw_cksum(tcp, (tcp->data_off >> 4) * 4);
 	csum = ((csum & 0xffff0000) >> 16) + (csum & 0xffff);
 	csum = (~csum) & 0xffff;
 	if (csum == 0)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.914474559 +0100
+++ 0034-net-mlx5-fix-LRO-checksum.patch	2020-07-24 12:53:48.231005416 +0100
@@ -1,8 +1,10 @@
-From eb10fe7fb150d3a9c1ef01134403f85890d5e06e Mon Sep 17 00:00:00 2001
+From caedd7c3682922aeb7b3ba7747655da90cc8dac4 Mon Sep 17 00:00:00 2001
 From: Dong Zhou <dongz at mellanox.com>
 Date: Fri, 12 Jun 2020 11:57:46 +0300
 Subject: [PATCH] net/mlx5: fix LRO checksum
 
+[ upstream commit eb10fe7fb150d3a9c1ef01134403f85890d5e06e ]
+
 The TCP checksum includes IPV4 pseudo-header checksum and L3
 payload checksum which include TCP header and TCP payload.
 When mlx5 LRO is enabled, HW will calculate the TCP payload
@@ -18,7 +20,6 @@
 instead of lower 4 bits.
 
 Fixes: e4c2a16eb1de ("net/mlx5: handle LRO packets in Rx queue")
-Cc: stable at dpdk.org
 
 Signed-off-by: Dong Zhou <dongz at mellanox.com>
 Acked-by: Matan Azrad <matan at mellanox.com>
@@ -27,10 +28,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
-index 4d67925e5..e4106bf0a 100644
+index 90625e71f..a9c618128 100644
 --- a/drivers/net/mlx5/mlx5_rxtx.c
 +++ b/drivers/net/mlx5/mlx5_rxtx.c
-@@ -1529,7 +1529,7 @@ mlx5_lro_update_tcp_hdr(struct rte_tcp_hdr *restrict tcp,
+@@ -1439,7 +1439,7 @@ mlx5_lro_update_tcp_hdr(struct rte_tcp_hdr *restrict tcp,
  	if (cqe->lro_tcppsh_abort_dupack & MLX5_CQE_LRO_PUSH_MASK)
  		tcp->tcp_flags |= RTE_TCP_PSH_FLAG;
  	tcp->cksum = 0;


More information about the stable mailing list