net/ixgbe: fix UDP zero checksum on Arm
authorFeifei Wang <feifei.wang2@arm.com>
Mon, 8 Feb 2021 09:07:04 +0000 (17:07 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 10 Feb 2021 20:51:38 +0000 (21:51 +0100)
commitb9c366e029f5710718006e95eec8f133ad5782a4
tree93605b29c32afef94d1c65f35fc007759db13117
parent9a40edb599d76f7f9d116bb2f91b23c082b5f154
net/ixgbe: fix UDP zero checksum on Arm

There is an 82599 errata that UDP frames with a zero checksum are
incorrectly marked as checksum invalid by the hardware.  This was
leading to misleading PKT_RX_L4_CKSUM_BAD flag.

To fix it for the NEON path in Arm platform, change the bad UDP checksum to
unknown, and then let software application to recompute the checksum.

NICs: 82599(igb)
Driver: ixgbe(vector)
Architecture: arm64
$:./app/dpdk-testpmd -c 0x3 -w 0002:f9:00.0 -- -i
--port-topology=chained --enable-rx-cksum
test-pmd> set fwd rxonly
test-pmd> set verbose 1
test-pmd> start

1. UDP Test:
Package: (Ether()/IP()/UDP(checksum=0)
ol_flags: PKT_RX_L4_CKSUM_UNKNOWN PKT_RX_IP_CKSUM_GOOD

2. TCP Test:
Package: (Ether()/IP()/TCP(checksum=0)
ol_flags: PKT_RX_L4_CKSUM_BAD PKT_RX_IP_CKSUM_GOOD

Bugzilla ID: 629
Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Reported-by: Paolo Valerio <pvalerio@redhat.com>
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c