From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 107CCA052B; Wed, 29 Jul 2020 09:49:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E350C10A3; Wed, 29 Jul 2020 09:49:15 +0200 (CEST) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id 63532F04 for ; Wed, 29 Jul 2020 09:49:15 +0200 (CEST) Received: by mail-wm1-f66.google.com with SMTP id f18so1574674wmc.0 for ; Wed, 29 Jul 2020 00:49:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=HXlV0RClhrS0wmSZWsCr6sxrkVtIC/ZfWQVe2Yn9XoY=; b=N7gnx7fns4wzRD5DVn8dnPM1HbSZ4Mdp8fw6DFM9Cco0bnl2tHVKhpygHmdtXWjSj+ 33HSGfD3qGdDugZnTfha81COIWhCsHkbFCYgV1EIde+ML4JskG8r4OdQ/UxFCqOO/Skv CRNl9Q4aNoOlye5jBu1y5xwwGCpPbuP7ggGw9lk6SZaYBKHxIqfMGTt3vr3wE/WTjkaY jLnWWnJRwCVG+hFJYZzb+gIetsRd8yXhxlLq/crFVqQSQnr4yRVZ2TGiDTpGexFUWFc1 9qzAC4sdfs6jR8zPQVHYnSkXpBOFH0eiAk+jFZVkixrPx2D/IDggrRMExkvOENjBPgu2 UsDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=HXlV0RClhrS0wmSZWsCr6sxrkVtIC/ZfWQVe2Yn9XoY=; b=sLD3Pbo0amfIcRf1SIGqN+gCdShb1V53so4+uRzzoeCiHVKKjgI8bYF2ikuVHXzC2b kHzXhYyoauRiaveayxsqvb9VaKesRLFgAdwojtWZxjoI1QXiPWJSzA/VSjgQ7hk381Bs 2nKUGOqiHXA4JQNuH5ox7VsaQAFN2GSoIoFR61XS+56f35w3CtaGMlYR/gnr9R/UX7aA IQV2JfWkZWgfgVQ3FBOLQbKFa/WAQsLUP/2Q6Qv57mpjA0miWFJU7Fn+455n3KL6FwpU ZokKqL2XYV8rBDu+j1hPWkxGbwDVeWOe2FMY32d4QrTyad4mHzVcO/eJtdXwvUvzsNDN A8Jg== X-Gm-Message-State: AOAM530S9IBhs3OSe5Kdo2go9LjORGbRlopMSRTKlJi++pk58cgwU+dT BojWi1RUT7p73vXEm3DnFbVzPg== X-Google-Smtp-Source: ABdhPJwaGlOT902+Yi3tElMNuL7fP/gu3yOqxOfGLYFPDLVsAu13athl4GhAf2QnM0RtFF7dtSyrzg== X-Received: by 2002:a7b:cb58:: with SMTP id v24mr7310351wmj.152.1596008955106; Wed, 29 Jul 2020 00:49:15 -0700 (PDT) Received: from 6wind.com (2a01cb0c0005a600345636f7e65ed1a0.ipv6.abo.wanadoo.fr. [2a01:cb0c:5:a600:3456:36f7:e65e:d1a0]) by smtp.gmail.com with ESMTPSA id 65sm4386197wre.6.2020.07.29.00.49.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jul 2020 00:49:14 -0700 (PDT) Date: Wed, 29 Jul 2020 09:49:13 +0200 From: Olivier Matz To: Yuying Zhang Cc: dev@dpdk.org, qi.z.zhang@intel.com, qiming.yang@intel.com, Ferruh Yigit , Andrew Rybchenko Message-ID: <20200729074913.GY5869@platinum> References: <20200728085531.204296-1-yuying.zhang@intel.com> <20200728170950.208532-1-yuying.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200728170950.208532-1-yuying.zhang@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [dpdk-dev] [PATCH v2 1/1] net: fix TSO packets checksum incorrect X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Jul 28, 2020 at 05:09:50PM +0000, Yuying Zhang wrote: > The ol_flags check lacks of flag for IPv6 which causes checksum > flag configuration error while IPv6/TCP TSO packet is sent. > This patch fixes the issue by adding PKT_TX_TCP_SEG flag. Thanks Yuying for the new version. I have another suggestion for the title/commit log: net: fix bad checksum in offloaded TSOv6 packets The rte_net_intel_cksum_flags_prepare() function prepares the pseudoheader checksum in packet data when doing checksum or TSO offload. It does nothing when no checksum offload flag is set in mbuf. But in case of a IPv6/TCP TSO packet, it is not mandatory to have a checksum flag. We also need to check the PKT_TX_TCP_SEG flag in addition to checksum flags to fix offload preparation for such packets. > Fixes: 520059a41aa9 ("net: check fragmented headers in non-debug as well") > > Signed-off-by: Yuying Zhang Acked-by: Olivier Matz > --- > lib/librte_net/rte_net.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_net/rte_net.h b/lib/librte_net/rte_net.h > index 1edc283a4..94b06d9ee 100644 > --- a/lib/librte_net/rte_net.h > +++ b/lib/librte_net/rte_net.h > @@ -125,7 +125,7 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags) > * Mainly it is required to avoid fragmented headers check if > * no offloads are requested. > */ > - if (!(ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_L4_MASK))) > + if (!(ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_L4_MASK | PKT_TX_TCP_SEG))) > return 0; > > if (ol_flags & (PKT_TX_OUTER_IPV4 | PKT_TX_OUTER_IPV6)) > -- > 2.25.1 >