b4f3c136a1
Update desc_to_olflags_v() to set PKT_RX_IP_CKSUM_BAD and PKT_RX_L4_CKSUM_BAD in the ol_fags of the mbuf. The Rx vector function can now be used with hw_ip_checksum enabled. Tested with: cd dpdk.org/ make config T=x86_64-native-linuxapp-gcc make -j32 mkdir -p /mnt/huge mount -t hugetlbfs nodev /mnt/huge echo 256 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages modprobe uio_pci_generic python tools/dpdk_nic_bind.py -b uio_pci_generic 0000:04:00.0 ./build/app/testpmd -l 2,4 -- --total-num-mbufs=65536 -i --port-topology=chained --enable-rx-cksum --disable-hw-vlan-filter --disable-hw-vlan-strip set fwd rxonly set verbose 1 start # send packets to testpmd using scapy eh = Ether(src="00:01:02:03:04:05", dst="00:1B:21:AB:8F:10") p = Ether()/IP(src="1.1.1.1", dst="1.1.1.2")/UDP()/Raw("x"*50) sendp(p, iface="ixgbe2") p = Ether()/IP(src="1.1.1.1", dst="1.1.1.2", chksum=42)/UDP()/Raw("x"*50) sendp(p, iface="ixgbe2") p = Ether()/IP(src="1.1.1.1", dst="1.1.1.2")/UDP(chksum=42)/Raw("x"*50) sendp(p, iface="ixgbe2") p = Ether()/IP(src="1.1.1.1", dst="1.1.1.2", chksum=45)/UDP(chksum=42)/Raw("x"*50) sendp(p, iface="ixgbe2") # result port 0/queue 0: received 1 packets src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=92 - nb_segs=1Unknown packet type - Receive queue=0x0 port 0/queue 0: received 1 packets src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=92 - nb_segs=1Unknown packet type - Receive queue=0x0 PKT_RX_IP_CKSUM_BAD port 0/queue 0: received 1 packets src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=92 - nb_segs=1Unknown packet type - Receive queue=0x0 PKT_RX_L4_CKSUM_BAD port 0/queue 0: received 1 packets src=00:01:02:03:04:05 - dst=00:1B:21:AB:8F:10 - type=0x0800 - length=92 - nb_segs=1Unknown packet type - Receive queue=0x0 PKT_RX_L4_CKSUM_BAD PKT_RX_IP_CKSUM_BAD Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com> Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Remy Horton <remy.horton@intel.com>