[dpdk-dev] [PATCH] net: fix build with gcc 4.4.7 and strict aliasing

Mrzyglod, DanielX T danielx.t.mrzyglod at intel.com
Tue Nov 24 16:47:28 CET 2015


This error fix this situation for IPv6 checksum offload error on RHEL65
Any optimalisation above -O0 provide error in IPv6 checksum


Step 1 : start testpmd
./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6 -n 4  -- -i --portmask=0x3 --disable-hw-vlan --enable-rx-cksum --crc-strip --txqflags=0

Step 2 : settings and start
           set verbose 1
           set fwd csum
           start

Step 3 : calculate correct checksum values of IPv6/TCP and IPv6/UDP by scapy
           Packets info:  IPv6/UDP:Ether(dst="02:00:00:00:00:00", src="90:e2:ba:4a:33:5c")/IPv6(src="::2")/UDP()/("X"*46)
                          IPv6/TCP:  Ether(src="52:00:00:00:00:00", dst="90:e2:ba:4a:33:5d")/IPv6(src="::1")/TCP()/("X"*46)

Step 4 : Send two packets with wrong checksum value,and calculate the right checksum value by port,packets received on another port
           Send packets info: IPv6/UDP:Ether(dst="90:e2:ba:4a:33:5d", src="52:00:00:00:00:00")/IPv6(src="::1")/UDP(chksum=0xf)/("X"*46)
                              IPv6/TCP:Ether(dst="90:e2:ba:4a:33:5d", src="52:00:00:00:00:00")/IPv6(src="::1")/TCP(chksum=0xf)/("X"*46)

RESULTS:
'IPv6/TCP': ['0xd41']}, 'IPv6/UDP': ['0x7d07'],

EXPECTED RESULTS:
'IPv6/TCP': ['0x9f5e']}, 'IPv6/UDP': ['0xf26']


More information about the dev mailing list