net: mvpp2: Add parsing support for different IPv4 IHL values
authorStefan Chulski <stefanc@marvell.com>
Fri, 16 Apr 2021 08:15:17 +0000 (11:15 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Apr 2021 22:29:40 +0000 (15:29 -0700)
commit4ad29b1a484e0c58acfffdcd87172ed17f35c1dd
tree88005648176f4f46636c3e5dde2afbb57625928a
parentaf1fa6b696cca5c559ed6d38cad0213544f299a0
net: mvpp2: Add parsing support for different IPv4 IHL values

Add parser entries for different IPv4 IHL values.
Each entry will set the L4 header offset according to the IPv4 IHL field.
L3 header offset will set during the parsing of the IPv4 protocol.

Because of missed parser support for IP header length > 20, RX IPv4 checksum HW offload fails
and skb->ip_summed set to CHECKSUM_NONE(checksum done by Network stack).
This patch adds RX IPv4 checksum HW offload capability for frames with IP header length > 20.

v1 --> v2
- Improve commit message.

Suggested-by: Dana Vardi <danat@marvell.com>
Signed-off-by: Stefan Chulski <stefanc@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c
drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.h