net/mlx4_en: Notify TX Vlan offload change
authorIdo Shamay <idos@mellanox.com>
Tue, 3 Feb 2015 15:57:21 +0000 (17:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Feb 2015 00:17:46 +0000 (16:17 -0800)
Notify users when TX vlan offload feature changed with ethtool.
Relevant command - ethtool -K <eth> txvlan on/off.

Signed-off-by: Ido Shamay <idos@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c

index 028937b..2a210c4 100644 (file)
@@ -2202,6 +2202,10 @@ static int mlx4_en_set_features(struct net_device *netdev,
                        return ret;
        }
 
+       if (DEV_FEATURE_CHANGED(netdev, features, NETIF_F_HW_VLAN_CTAG_TX))
+               en_info(priv, "Turn %s TX vlan strip offload\n",
+                       (features & NETIF_F_HW_VLAN_CTAG_TX) ? "ON" : "OFF");
+
        if (features & NETIF_F_LOOPBACK)
                priv->ctrl_flags |= cpu_to_be32(MLX4_WQE_CTRL_FORCE_LOOPBACK);
        else