From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH] librte_net: fix TX checksum offload problem with IPv6 packet. Date: Thu, 11 Dec 2014 13:33:10 +0100 Message-ID: <54898F06.2060503@6wind.com> References: <1418298582-6953-1-git-send-email-konstantin.ananyev@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: Konstantin Ananyev , dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1418298582-6953-1-git-send-email-konstantin.ananyev-ral2JQCrhuEAvxtiuMwx3w@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 12/11/2014 12:49 PM, Konstantin Ananyev wrote: > 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