net/octeontx2: offload bad L2/L3/L4 UDP lengths detection
authorKiran Kumar K <kirankumark@marvell.com>
Sat, 7 Mar 2020 09:56:53 +0000 (15:26 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:06 +0000 (13:57 +0200)
commit41fe7a3a11fd90a46baa33be71d3e8b9aa6be53f
treeef6c4e3fb56c94f8a30cec554a6fbec65e4f736b
parentbe284df0829254f5b84bb965acbecef0aa2ae043
net/octeontx2: offload bad L2/L3/L4 UDP lengths detection

Octeontx2 HW has support for detecting the bad L2/L3/L4 UDP lengths.
Since DPDK does not have specific error flag for this, exposing it
as bad checksum failure in mbuff:ol_flags to leverage this feature.

These errors will be propagated to the ol_flags as follows.

L2 length error ==> (PKT_RX_IP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD).
Both Outer and Inner L3 length error ==> PKT_RX_IP_CKSUM_BAD.
Outer L4 UDP length/port error ==> PKT_RX_OUTER_L4_CKSUM_BAD.
Inner L4 UDP length/port error ==> PKT_RX_L4_CKSUM_BAD.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
drivers/net/octeontx2/otx2_ethdev.c
drivers/net/octeontx2/otx2_lookup.c