From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH v3 08/13] testpmd: rework csum forward engine Date: Wed, 26 Nov 2014 15:55:16 +0100 Message-ID: <5475E9D4.6000607@6wind.com> References: <1415984609-2484-1-git-send-email-olivier.matz@6wind.com> <1416524335-22753-1-git-send-email-olivier.matz@6wind.com> <1416524335-22753-9-git-send-email-olivier.matz@6wind.com> <2601191342CEEE43887BDE71AB977258213BA62A@IRSMSX105.ger.corp.intel.com> <5475B622.8030705@6wind.com> <2601191342CEEE43887BDE71AB977258213BA869@IRSMSX105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "jigsaw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" To: "Ananyev, Konstantin" , "dev-VfR2kkLFssw@public.gmane.org" Return-path: In-Reply-To: <2601191342CEEE43887BDE71AB977258213BA869-kPTMFJFq+rEu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Hi Konstantin, On 11/26/2014 01:25 PM, Ananyev, Konstantin wrote: >> By the way (this is probably off-topic), but I'm wondering if the TX >> flags should have the same values than the RX flags: >> >> #define PKT_TX_IPV4 PKT_RX_IPV4_HDR >> #define PKT_TX_IPV6 PKT_RX_IPV6_HDR > > Thought about that too. > From one side, it is a bit out of our concept: separate RX and TX falgs. > From other side, it allows us to save 2 bits in the ol_flags. > Don't have any strong opinion here. > What do you think? I have no strong opinion too, but I have a preference for 2 different bit values for these flags: - as you say, it's matches the concept (RX and TX flags are separated) - 64 bits is a lot, we have some time before there is no more available bit... and I hope we it will never occur because it would become complex for an application to handle them all - it will avoid to send a packet with a bad info: - we receive a Ether/IP6/IP4/L4/data packet - the driver sets PKT_RX_IPV6_HDR - the stack decapsulates IP6 - the stack sends the packet, it has the PKT_TX_IPV6 flag but it's an IPv4 packet This is not a real problem as the flag will not be used by the driver/hardware (it's only mandatory for hw cksum / tso), but it can be confusing. Regards, Olivier