net/mlx5e: Add VLAN offload features to hw_enc_features
authorAviv Heller <avivh@mellanox.com>
Thu, 17 Aug 2017 13:44:16 +0000 (16:44 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 26 Mar 2018 20:47:16 +0000 (13:47 -0700)
We support outer VLAN offload in driver and HW regardless of whether
an encapsulation is present in the next headers.

Exposing this in hw_enc_features will allow us to offload outer VLANs
in cases where encapsulation protocols like VXLAN and IPsec are used.

Signed-off-by: Aviv Heller <avivh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c

index fb936a978f20d640c2df9f41fc49b4cdf154937a..1d36d7569f44c9f27f74a72160ac7f7fa8dd8799 100644 (file)
@@ -4106,6 +4106,9 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev)
        netdev->vlan_features    |= NETIF_F_RXCSUM;
        netdev->vlan_features    |= NETIF_F_RXHASH;
 
+       netdev->hw_enc_features  |= NETIF_F_HW_VLAN_CTAG_TX;
+       netdev->hw_enc_features  |= NETIF_F_HW_VLAN_CTAG_RX;
+
        if (!!MLX5_CAP_ETH(mdev, lro_cap))
                netdev->vlan_features    |= NETIF_F_LRO;