OSDN Git Service

net: hns3: make HW GRO handling compliant with SW GRO
authorYunsheng Lin <linyunsheng@huawei.com>
Fri, 7 Jun 2019 02:03:04 +0000 (10:03 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 9 Jun 2019 20:20:58 +0000 (13:20 -0700)
commite2ee1c5a5944231a79cf6d64c2a703ea08a2e411
treea7db21af809d332aa5c76a098dfbcad809272384
parentf5d20e396abf7f8b665b05bf906079084426681a
net: hns3: make HW GRO handling compliant with SW GRO

Currently when a GRO packet is assembled by HW, the checksum is
modified to reflect the entire packet by HW and skb->ip_summed is
set to CHECKSUM_UNNECESSARY, which is not compliant with SW GRO.

This patch sets up skb's network and transport header, sets the
GRO packet's checksum according to pseudo header and set the
skb->ip_summed to CHECKSUM_PARTIAL.

This patch also use gso_size to distinguish GRO packet from
normal packet, use eth_type_vlan to check the VLAN type and set
the SKB_GSO_TCP_FIXEDID according to BD info during HW GRO info
processing.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c