From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 736F6A0C47 for ; Tue, 10 Aug 2021 17:45:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 50B774014F; Tue, 10 Aug 2021 17:45:46 +0200 (CEST) Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) by mails.dpdk.org (Postfix) with ESMTP id 6EAC34014F for ; Tue, 10 Aug 2021 17:45:45 +0200 (CEST) Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPS id 517773F338 for ; Tue, 10 Aug 2021 15:45:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1628610345; bh=QCs68sjL9YJMuJYdEqlu1C1M+U+Hicn97AEE12kQrfM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Bm//kM+IeOBImBaEL45KxmUkxXevUOxtwCCJ6g2/hxeMXU0QTIojWK4g+sUN8J7pv BSTjuJIggruqH9pvnoNPNvsrsBTH4BBpEUuSMK+5AwyCZe5cd7NSbtbMBDGiSWEeDY FvvrdGeYaro5SmvSWpLWobkHi0yKoT9h6MxeEITQO0o0rFim5/V8qNE9cPjik8mfOr xAiQbNIEjp2G9JIXOdA2nunLVTbq13oDnzDglVFiLOp1vQrpseRp9Kx/igMaSClcSj lMUYUmZr9jxjQ4Cn3XBKZWSwtGGwgiKArJqcRAIWRDjNrHRqJWhVa8znoMZNXqeVss /vV7bw1uXpJnw== Received: by mail-ej1-f71.google.com with SMTP id r21-20020a1709067055b02904be5f536463so5768413ejj.0 for ; Tue, 10 Aug 2021 08:45:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QCs68sjL9YJMuJYdEqlu1C1M+U+Hicn97AEE12kQrfM=; b=tiWJfBcQ7lQzjedoN1VBugeegpKI5UWWnXQ51w+GOJTkkVHqcO8VOpI/IglbeAQUla GY0v+t15ra1LsgLmIwDGQs18LeF6r75pKvkbEW79XeGbQU51/unQKqCS95AZ+mgGnezY YLKh1Yn3K2ffHm/fHkiDZNExx1apaR/7u78jKvXcbEglkquLJQTkREMOhdcUEpjt9vu5 i2K5l1QNciycltyr33LgyNOmbCouh9Xc9IW3141fKfHxI3DmcP1+AXiujQfXjH5EFrcB 2ouYyWN4G898LkIMzaRqreDVdnUCgVivfB9A5X35ceFanRKYhYTFpeWKWqwXV1WJ4egA m9Gg== X-Gm-Message-State: AOAM532MJhvBZhAySgHvpwVo3bdGmkmsiATySYOpLLm2sxzmPn9AZkbN caPZQLFWmrixd3P03Tc68wI/iFd8LuxmqEOd+1AvjpWSVg7liQ/ulnQroMmo6MI7ewcpwGu+7Ez HbOWUtJ78PAsCm38UOyWw9Bv4 X-Received: by 2002:aa7:ce87:: with SMTP id y7mr5707956edv.306.1628610345007; Tue, 10 Aug 2021 08:45:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbQ1Z8gWesINzGUxtzLh38uWk+SkrattSfBCKkBYn2YViRR+/AxYTLIf5teDQN2ljbbYAMqA== X-Received: by 2002:aa7:ce87:: with SMTP id y7mr5707941edv.306.1628610344830; Tue, 10 Aug 2021 08:45:44 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id v6sm2106354ejk.117.2021.08.10.08.45.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Aug 2021 08:45:44 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Gregory Etelson Cc: Ajit Khaparde , dpdk stable Date: Tue, 10 Aug 2021 17:40:22 +0200 Message-Id: <20210810154022.749358-102-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810154022.749358-1-christian.ehrhardt@canonical.com> References: <20210810154022.749358-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'app/testpmd: fix IPv4 checksum' has been queued to stable release 19.11.10 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.10 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/12/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/d3dcfe0a54322e732b9b8191c8bb9672da9333ee Thanks. Christian Ehrhardt --- >From d3dcfe0a54322e732b9b8191c8bb9672da9333ee Mon Sep 17 00:00:00 2001 From: Gregory Etelson 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 Acked-by: Ajit Khaparde --- 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 7c5d54342b..29044c4170 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -458,7 +458,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); @@ -490,7 +490,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, @@ -506,7 +506,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.32.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-08-10 15:11:16.900159865 +0200 +++ 0102-app-testpmd-fix-IPv4-checksum.patch 2021-08-10 15:11:13.134638936 +0200 @@ -1 +1 @@ -From de73c8ac50681a0b9221407a100a2c578f7e6ad3 Mon Sep 17 00:00:00 2001 +From d3dcfe0a54322e732b9b8191c8bb9672da9333ee Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit de73c8ac50681a0b9221407a100a2c578f7e6ad3 ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index bd5ad64a57..607c889359 100644 +index 7c5d54342b..29044c4170 100644 @@ -31 +32 @@ -@@ -487,7 +487,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info, +@@ -458,7 +458,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info, @@ -40 +41 @@ -@@ -519,7 +519,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info, +@@ -490,7 +490,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info, @@ -49 +50 @@ -@@ -535,7 +535,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info, +@@ -506,7 +506,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,