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)
commit2a7556bb2b7308c6e0fe646c1ddbbf9522bf1120
tree90c62e81b5faee6bdd334b888aa43e590cbfb71a
parent44b6b88336a08be87a02d69f6a4754c86cda97f1
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