[dpdk-stable] patch 'app/testpmd: fix IPv4 checksum' has been queued to stable release 20.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Aug 5 11:53:14 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.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 08/07/21. 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/62ff84ca2a6752e24f6fa7a96e8abc3ffd749240

Thanks.

Luca Boccassi

---
>From 62ff84ca2a6752e24f6fa7a96e8abc3ffd749240 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson at nvidia.com>
Date: Mon, 2 Aug 2021 21:13:16 +0300
Subject: [PATCH] app/testpmd: fix IPv4 checksum

[ upstream commit de73c8ac50681a0b9221407a100a2c578f7e6ad3 ]

UDP protocol reserves 0 checksum value for special purposes.
Other protocols, like IPv4, TCP and SCTP must calculate checksum value
in software or offload checksum calculation to hardware.

If IPv4 TX checksum offload was off and header checksum was set to 0,
testpmd csum engine did not calculate checksum value for IPv4, TCP and
SCTP.

The patch always calculates IPv4, TCP and SCTP TX checksums if it is
not offloaded.

Bugzilla ID: 768
Fixes: b2a9e4a855d0 ("app/testpmd: fix Tx checksum calculation for tunnel")

Signed-off-by: Gregory Etelson <getelson at nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 app/test-pmd/csumonly.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 73a78f955c..b0a58e8573 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -487,7 +487,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
 		} else {
 			if (tx_offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) {
 				ol_flags |= PKT_TX_IP_CKSUM;
-			} else if (ipv4_hdr->hdr_checksum != 0) {
+			} else {
 				ipv4_hdr->hdr_checksum = 0;
 				ipv4_hdr->hdr_checksum =
 					rte_ipv4_cksum(ipv4_hdr);
@@ -519,7 +519,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
 			ol_flags |= PKT_TX_TCP_SEG;
 		else if (tx_offloads & DEV_TX_OFFLOAD_TCP_CKSUM) {
 			ol_flags |= PKT_TX_TCP_CKSUM;
-		} else if (tcp_hdr->cksum != 0) {
+		} else {
 			tcp_hdr->cksum = 0;
 			tcp_hdr->cksum =
 				get_udptcp_checksum(l3_hdr, tcp_hdr,
@@ -535,7 +535,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
 		if ((tx_offloads & DEV_TX_OFFLOAD_SCTP_CKSUM) &&
 			((ipv4_hdr->total_length & 0x3) == 0)) {
 			ol_flags |= PKT_TX_SCTP_CKSUM;
-		} else if (sctp_hdr->cksum != 0) {
+		} else {
 			sctp_hdr->cksum = 0;
 			/* XXX implement CRC32c, example available in
 			 * RFC3309 */
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-08-05 09:55:22.718756913 +0100
+++ 0003-app-testpmd-fix-IPv4-checksum.patch	2021-08-05 09:55:22.598740183 +0100
@@ -1 +1 @@
-From de73c8ac50681a0b9221407a100a2c578f7e6ad3 Mon Sep 17 00:00:00 2001
+From 62ff84ca2a6752e24f6fa7a96e8abc3ffd749240 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit de73c8ac50681a0b9221407a100a2c578f7e6ad3 ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
@@ -28 +29 @@
-index bd5ad64a57..607c889359 100644
+index 73a78f955c..b0a58e8573 100644


More information about the stable mailing list