]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: refactor out RX completion checksum
authorHuazhong Tan <tanhuazhong@huawei.com>
Fri, 14 May 2021 03:25:10 +0000 (11:25 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 May 2021 22:07:33 +0000 (15:07 -0700)
commit961b7e9fa4202da7aed7fd4ccd97b3e76113bdb4
treee8fb978c0232ab1df6a6b25a36fcdce310710f87
parentff3c0d97cdf7eaebeac237949670064ca6e91e45
net: hns3: refactor out RX completion checksum

Only when RXD advanced layout is enabled, in some cases
(e.g. ip fragments), the checksum of entire packet will be
calculated and filled in the least significant 16 bits of
the unused addr field.

So refactor out the handling of RX completion checksum: adjust
the location of the checksum in RX descriptor, and use ptype table
to identify whether this kind of checksum is calculated.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h