Hi Yao,

Dave recently fixed bug related to alignment, Are you using latest code?

Also, few days ago i merged new significantly-faster SIMD based ip checksum 
code[1], you can try that one also...

[1] https://git.fd.io/vpp/commit/?id=08bca80

Thanks,

-- 
Damjan

> On 29 Jun 2018, at 09:27, Yao, Chengqiang <chengqiang....@intel.com> wrote:
> 
> Hi,
>  
> I have an issue when calculating the checksum of two IP headers with 
> ip4_header_checksum function. The content of these two IP headers are exactly 
> the same. The only difference between these 2 IP headers is that, one IP 
> header’s address is 64 bits aligned, while the other one is not (My test bed 
> is x86_64). The return value of ip4_header_checksum function for these two IP 
> headers are different. Anyone knows why?
>  
> I also wrote a simple test code to test this function. The result is as below:
>  
>  
> [root@localhost vpp_pdcp]# ./test_ip_checksum
>  
> ip header 1: 0x45 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xfe 0x11 0x0 0x0 0xc0 0xa8 
> 0x32 0x48 0xc0 0xa8 0x32 0x47
>  
> ip header 1 address:0x7fff1b1ba1a0, csum 1:0xcd7
>  
> ip header 2: 0x45 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xfe 0x11 0x0 0x0 0xc0 0xa8 
> 0x32 0x48 0xc0 0xa8 0x32 0x47
>  
> ip header 2 address:0x7fff1b1ba171, csum 2:0x1bc8
>  
>  
>  
> Best Regards,
> Chengqiang Yao
>  
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#9737): https://lists.fd.io/g/vpp-dev/message/9737 
> <https://lists.fd.io/g/vpp-dev/message/9737>
> Mute This Topic: https://lists.fd.io/mt/22892325/675642 
> <https://lists.fd.io/mt/22892325/675642>
> Group Owner: vpp-dev+ow...@lists.fd.io <mailto:vpp-dev+ow...@lists.fd.io>
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub 
> <https://lists.fd.io/g/vpp-dev/unsub>  [dmar...@me.com 
> <mailto:dmar...@me.com>]
> -=-=-=-=-=-=-=-=-=-=-=-

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#9739): https://lists.fd.io/g/vpp-dev/message/9739
Mute This Topic: https://lists.fd.io/mt/22892325/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to