From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] librte_net: fix TX checksum offload problem with IPv6 packet. Date: Wed, 17 Dec 2014 00:56:35 +0100 Message-ID: <6854580.rpBbEFEqVn@xps13> References: <1418298582-6953-1-git-send-email-konstantin.ananyev@intel.com> <54898F06.2060503@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Konstantin Ananyev Return-path: In-Reply-To: <54898F06.2060503-pdR9zngts4EAvxtiuMwx3w@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" > > For rte_ipv6_phdr_cksum() gcc 4.8.* with "-O3" not always generates > > correct code. > > Sometimes it 'forgets' to put len and proto fields of psd_header on the stack. > > To overcome that problem and speedup things a bit, refactored rte_raw_cksum() > > by splitting ipv6 pseudo-header csum calculation into 3 phases: > > 1. calc sum for src & dst addresses > > 2. add sum for proto & len. > > 3. finalise sum > > That makes gcc to generate valid code and helps to avoid any copying. > > > > Signed-off-by: Konstantin Ananyev > > Acked-by: Olivier Matz Applied Thanks -- Thomas