]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit454329cb48b0a0be28354b9921ab74feb7be5dd5
tree2d970cfa97ca6f7691a266dd947604f6cfcbeb63
parentcd7331428355e4e7b3c87b27e5d747ea9448712e
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