From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 534547F25 for ; Fri, 14 Nov 2014 09:59:58 +0100 (CET) Received: from was59-1-82-226-113-214.fbx.proxad.net ([82.226.113.214] helo=[192.168.0.10]) by mail.droids-corp.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XpCw9-0006jL-Jk; Fri, 14 Nov 2014 10:13:04 +0100 Message-ID: <5465C6DD.4000000@6wind.com> Date: Fri, 14 Nov 2014 10:09:49 +0100 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0 MIME-Version: 1.0 To: "Liu, Jijiang" , Thomas Monjalon References: <1414376006-31402-1-git-send-email-jijiang.liu@intel.com> <176980123.CbUgamS8oi@xps13> <1ED644BD7E0A5F4091CF203DAFB8E4CC01D992F8@SHSMSX101.ccr.corp.intel.com> <3175184.TxKMqZeb6U@xps13> <1ED644BD7E0A5F4091CF203DAFB8E4CC01D9B646@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <1ED644BD7E0A5F4091CF203DAFB8E4CC01D9B646@SHSMSX101.ccr.corp.intel.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v8 10/10] app/testpmd:test VxLAN Tx checksum offload X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2014 08:59:58 -0000 Hi Jijiang, On 11/14/2014 09:15 AM, Liu, Jijiang wrote: > > Thomas Monjalon wrote: >> >> You mean that PKT_TX_VXLAN_CKSUM request hardware checksumming of outer >> L3, outer L4, inner L3 and inner L4? >> So maybe the name and comments are not enough clear. > > Yes, PKT_TX_VXLAN_CKSUM request hardware checksum of outerL3, outer L4, inner L3 and inner L4. I don't understand: it looks in contradiction with our previous discussion: Olivier Matz wrote: > > Liu, Jijiang wrote: >> >> Olivier Matz wrote: >>> What is the >>> meaning of this flag? Is it enough to checksum outer L3, inner L3, and >>> inner L4 as specified in commit log? If yes, why are the other flags >>> PKT_TX_IPV4_CSUM, PKT_TX_UDP_CKSUM, (...) added in the mbuf later? >>> In my comprehension, these flags are needed in addition to >>> PKT_TX_VXLAN_CKSUM to do the checksum of the inner headers. >> >> Yes, these flags(PKT_TX_IPV4_CSUM, PKT_TX_UDP_CKSUM) are needed by HW >> offload of non-tunneling and tunneling packet. > > OK, so I understand that when PKT_TX_VXLAN_CKSUM is set, if the > driver supports it, it will process IP and UDP checksum of outer > header, using l2_len and l3_len. So you say that PKT_TX_VXLAN_CKSUM is enough for all inner and outer headers, but also that PKT_TX_IPV4_CSUM, PKT_TX_UDP_CKSUM are needed. What occurs if we don't set them? Now let's say you have an application that receives a TCP packet, then encaspulate it in vxlan, and forward it. You want to regenerate the checksum for the new outer headers, but you don't need to change the inner ones. You say that setting the PKT_TX_VXLAN_CKSUM will request the hw to process inner and outer checksum. This is not required in that case. Also, do you need to set the pseudo header checksum in the TCP inner header? Regards, Olivier