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 DF24DA0C40 for ; Thu, 5 Aug 2021 11:53:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D9ABE41265; Thu, 5 Aug 2021 11:53:20 +0200 (CEST) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mails.dpdk.org (Postfix) with ESMTP id 3DA8141263 for ; Thu, 5 Aug 2021 11:53:20 +0200 (CEST) Received: by mail-wm1-f49.google.com with SMTP id b128so2938974wmb.4 for ; Thu, 05 Aug 2021 02:53:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d8tT/El+FO8MKdqzu2Fv2CWax1DrMQ+ZCGinkxFPSjY=; b=Ixz+2bxdnJ2fG9KpsFNLAYhX7shaRTEo3RXjT0x4KuVGsb0ow+9fOarD8v8qKCnbZH QpFA9i4fJHiuTIxOQUIIg64ZPKRuPTjhjAFyniI3aSm8VkvweUCZK3zJgUEl5yF356QG j25hgqmLGSVPIqOl3/swSScjgnfcxP5Fov5KSZ7zn84ybV2pBx8yL4ugicVur1cl2oP9 EjrgXO1TGxLXV9+IDMW+RSg1idd+9DpUG+CtvT7jy5oZp9cvS+4qbcrWwJhiS2x+Yt4x G/fyNS5+4qYCmBjykqic16CltGY7Im2PKLNMKC6fpefdbfUVGBUe0PDXuTfWceN6Yc9d rqWw== 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=d8tT/El+FO8MKdqzu2Fv2CWax1DrMQ+ZCGinkxFPSjY=; b=s3lPuKupj2qLy4A2DMFg1mf8heN06t4uRTDf+q2I9X340dsaNiA5Z3EBjlzJMXbQAy Xyb6PfXzg+rf1laoUI75vWtQMxuwMn8fQkHx6VXZw6BE+ay0DwLyDfOJw00bJ+f6+2uA PAy9qoZsgy3yiwQvSlcT/W4p313F5y016TlEedqIOOP4/iWoxj98Z50QtPPxIR3dOIDX 2BFVBJ6IqEek7BmV+sjZ8COuBXzW3GoKXYf3WL0oHr5dAp+CQd4Up3gbhWVWPBk9/5Nu rLtPJVH6ter/1mrVgeRX80e4IRhksOGWj8JZP4XXvl1EgiaNGP9sxEhz0WcLkvVDe1uy XEfA== X-Gm-Message-State: AOAM533+nz7ZTbq2jWQyPWxws/sEmuvkv/jepXwQjz19Xj8YnSxV8XLw GRx6/4Omr55pP9cwEVkmAIs= X-Google-Smtp-Source: ABdhPJxMhhnW1V3b7A+6FeSSKKTxmZpSGItIdQdk6EJqto1DCskaH9Km4MK7SFcTWLkthgmwDX3M1w== X-Received: by 2002:a05:600c:4f8c:: with SMTP id n12mr4056981wmq.137.1628157200047; Thu, 05 Aug 2021 02:53:20 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id q63sm11125662wme.36.2021.08.05.02.53.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Aug 2021 02:53:19 -0700 (PDT) From: luca.boccassi@gmail.com To: Gregory Etelson Cc: Ajit Khaparde , dpdk stable Date: Thu, 5 Aug 2021 10:53:14 +0100 Message-Id: <20210805095314.1755018-3-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210805095314.1755018-1-luca.boccassi@gmail.com> References: <20210803122214.1094992-25-luca.boccassi@gmail.com> <20210805095314.1755018-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'app/testpmd: fix IPv4 checksum' has been queued to stable release 20.11.3 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 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 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 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@dpdk.org @@ -28 +29 @@ -index bd5ad64a57..607c889359 100644 +index 73a78f955c..b0a58e8573 100644