[dpdk-dev] [PATCH] librte_net: fix TX checksum offload problem with IPv6 packet.

Olivier MATZ olivier.matz at 6wind.com
Thu Dec 11 13:33:10 CET 2014


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 <konstantin.ananyev at intel.com>

Acked-by: Olivier Matz <olivier.matz at 6wind.com>



More information about the dev mailing list