net: hns3: combine len and checksum handling for inner and outer header.
authorYunsheng Lin <linyunsheng@huawei.com>
Mon, 6 May 2019 02:48:47 +0000 (10:48 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 May 2019 17:37:13 +0000 (10:37 -0700)
commit757cd1e4a4d81181fcd7130c4315d169ad9f5b81
tree2d970cfa97ca6f7691a266dd947604f6cfcbeb63
parent07918fcde144628f12048d5f95f28c40b073fba8
net: hns3: combine len and checksum handling for inner and outer header.

When filling len and checksum info to description, there is some
similar checking or calculation.

So this patch adds hns3_set_l2l3l4 to fill the inner(/normal)
header's len and checksum info. If it is a encapsulation skb, it
calls hns3_set_outer_l2l3l4 to handle the outer header's len and
checksum info, in order to avoid some similar checking or
calculation.

Signed-off-by: Yunsheng Lin <linyunsheng@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