net: hns: add support for vlan TSO
authorYonglong Liu <liuyonglong@huawei.com>
Wed, 3 Jul 2019 11:12:30 +0000 (19:12 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 Jul 2019 18:48:49 +0000 (11:48 -0700)
The hip07 chip support vlan TSO, this patch adds NETIF_F_TSO
and NETIF_F_TSO6 flags to vlan_features to improve the
performance after adding vlan to the net ports.

Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns/hns_enet.c

index fe879c0..2235dd5 100644 (file)
@@ -2370,6 +2370,7 @@ static int hns_nic_dev_probe(struct platform_device *pdev)
                ndev->hw_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
                        NETIF_F_RXCSUM | NETIF_F_SG | NETIF_F_GSO |
                        NETIF_F_GRO | NETIF_F_TSO | NETIF_F_TSO6;
+               ndev->vlan_features |= NETIF_F_TSO | NETIF_F_TSO6;
                ndev->max_mtu = MAC_MAX_MTU_V2 -
                                (ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN);
                break;