[PATCH 4/4][B/D] net: hns: add support for vlan TSO

Ike Panhc ike.pan at canonical.com
Wed Jan 1 16:09:51 UTC 2020


From: Yonglong Liu <liuyonglong at huawei.com>

BugLink: https://launchpad.net/bugs/1853937

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 at huawei.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
(cherry picked from commit 0d581ba311a27762fe1a14e5db5f65d225b3d844)
Signed-off-by: Ike Panhc <ike.pan at canonical.com>
---
 drivers/net/ethernet/hisilicon/hns/hns_enet.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
index db7279189d3b..0e1dd8d9571e 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
@@ -2355,6 +2355,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;
-- 
2.17.1




More information about the kernel-team mailing list