]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: implement ndo_features_check ops for hns3 driver
authorYunsheng Lin <linyunsheng@huawei.com>
Thu, 19 Dec 2019 06:57:44 +0000 (14:57 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Dec 2019 05:20:39 +0000 (21:20 -0800)
commitb3182e71c8f042b1522e3d8deca1682262ddcff6
tree90c62e81b5faee6bdd334b888aa43e590cbfb71a
parent9f6b5400684d0521d62ead678a0a65a805e5b922
net: hns3: implement ndo_features_check ops for hns3 driver

The function netif_skb_features() will disable the TSO feature
by using dflt_features_check() if the driver does not implement
ndo_features_check ops, which may cause performance degradation
problem when hns3 hardware can do multiple tagged TSO.

Also, the HNS3 hardware only supports checksum on the SKB with
a max header len of 480 bytes, so remove the checksum and TSO
related features when the header len is over 480 bytes.

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