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 A2A01231C for ; Fri, 28 Nov 2014 10:54:45 +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 1XuIJ7-0004hN-J5; Fri, 28 Nov 2014 10:57:58 +0100 Message-ID: <54784652.8080608@6wind.com> Date: Fri, 28 Nov 2014 10:54:26 +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" , "dev@dpdk.org" , "Ananyev, Konstantin" References: <1416524335-22753-1-git-send-email-olivier.matz@6wind.com> <1417014295-29064-1-git-send-email-olivier.matz@6wind.com> <1417014295-29064-9-git-send-email-olivier.matz@6wind.com> <2601191342CEEE43887BDE71AB977258213BAA86@IRSMSX105.ger.corp.intel.com> <5476EA87.4040807@6wind.com> <2601191342CEEE43887BDE71AB977258213BACAB@IRSMSX105.ger.corp.intel.com> <1ED644BD7E0A5F4091CF203DAFB8E4CC01D9F23E@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <1ED644BD7E0A5F4091CF203DAFB8E4CC01D9F23E@SHSMSX101.ccr.corp.intel.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "jigsaw@gmail.com" Subject: Re: [dpdk-dev] [PATCH v4 08/13] testpmd: rework csum forward engine 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, 28 Nov 2014 09:54:45 -0000 Hi Jijiang, On 11/28/2014 09:54 AM, Liu, Jijiang wrote: >>> My understanding of the meaning of the flags is: >>> >>> - PKT_TX_IP_CKSUM: tell the NIC to compute IP cksum > >> My initial thought: >> It tells the NIC that it is an IPV4 packet for which it has to compute checksum. >> >>> >>> - PKT_TX_IPV4: tell the NIC it's an IPv4 packet. Required for L4 >>> checksum offload or TSO. >> >> It tells the NIC that it is an IPV4 packet for which it shouldn't compute checksum. >> >>> >>> - PKT_TX_IPV6: tell the NIC it's an IPv6 packet. Required for L4 >>> checksum offload or TSO. >> >> Yes. >> >>> >>> If it's a i40e driver requirement, don't you think it's better to >>> change the driver? > > There should be two logics in csum engine, which is that either HW computes TX checksum (using PKT_TX_IP_CKSUM) or SW compute TX checksum(use PKT_TX_IPV4(or another flag) to tell driver no IP checksum offload requirement ), To me it's strange to have a flag saying "it's ipv4 and do the checksum" and another one saying "it's ipv4 and don't do the checksum". We can clearly see we have 2 different things to know about the packet: - is it ipv4? - do we want the hw checksum? I think that mapping the flags on these 2 questions is the most logical. > I think we shouldn't use L3 flag to tell driver what HW need do for L4, L3 and L4 flag should be separated . What L4 operation are you talking about? Regards, Olivier