net: vlan: rename NETIF_F_HW_VLAN_* feature flags to NETIF_F_HW_VLAN_CTAG_*
Rename the hardware VLAN acceleration features to include "CTAG" to indicate that they only support CTAGs. Follow up patches will introduce 802.1ad server provider tagging (STAGs) and require the distinction for hardware not supporting acclerating both. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c2962897c9
commit
f646968f8f
78 changed files with 285 additions and 266 deletions
|
@ -60,10 +60,10 @@ static const char netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN]
|
|||
[NETIF_F_IPV6_CSUM_BIT] = "tx-checksum-ipv6",
|
||||
[NETIF_F_HIGHDMA_BIT] = "highdma",
|
||||
[NETIF_F_FRAGLIST_BIT] = "tx-scatter-gather-fraglist",
|
||||
[NETIF_F_HW_VLAN_TX_BIT] = "tx-vlan-hw-insert",
|
||||
[NETIF_F_HW_VLAN_CTAG_TX_BIT] = "tx-vlan-ctag-hw-insert",
|
||||
|
||||
[NETIF_F_HW_VLAN_RX_BIT] = "rx-vlan-hw-parse",
|
||||
[NETIF_F_HW_VLAN_FILTER_BIT] = "rx-vlan-filter",
|
||||
[NETIF_F_HW_VLAN_CTAG_RX_BIT] = "rx-vlan-ctag-hw-parse",
|
||||
[NETIF_F_HW_VLAN_CTAG_FILTER_BIT] = "rx-vlan-ctag-filter",
|
||||
[NETIF_F_VLAN_CHALLENGED_BIT] = "vlan-challenged",
|
||||
[NETIF_F_GSO_BIT] = "tx-generic-segmentation",
|
||||
[NETIF_F_LLTX_BIT] = "tx-lockless",
|
||||
|
@ -267,18 +267,19 @@ static int ethtool_set_one_feature(struct net_device *dev,
|
|||
|
||||
#define ETH_ALL_FLAGS (ETH_FLAG_LRO | ETH_FLAG_RXVLAN | ETH_FLAG_TXVLAN | \
|
||||
ETH_FLAG_NTUPLE | ETH_FLAG_RXHASH)
|
||||
#define ETH_ALL_FEATURES (NETIF_F_LRO | NETIF_F_HW_VLAN_RX | \
|
||||
NETIF_F_HW_VLAN_TX | NETIF_F_NTUPLE | NETIF_F_RXHASH)
|
||||
#define ETH_ALL_FEATURES (NETIF_F_LRO | NETIF_F_HW_VLAN_CTAG_RX | \
|
||||
NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_NTUPLE | \
|
||||
NETIF_F_RXHASH)
|
||||
|
||||
static u32 __ethtool_get_flags(struct net_device *dev)
|
||||
{
|
||||
u32 flags = 0;
|
||||
|
||||
if (dev->features & NETIF_F_LRO) flags |= ETH_FLAG_LRO;
|
||||
if (dev->features & NETIF_F_HW_VLAN_RX) flags |= ETH_FLAG_RXVLAN;
|
||||
if (dev->features & NETIF_F_HW_VLAN_TX) flags |= ETH_FLAG_TXVLAN;
|
||||
if (dev->features & NETIF_F_NTUPLE) flags |= ETH_FLAG_NTUPLE;
|
||||
if (dev->features & NETIF_F_RXHASH) flags |= ETH_FLAG_RXHASH;
|
||||
if (dev->features & NETIF_F_LRO) flags |= ETH_FLAG_LRO;
|
||||
if (dev->features & NETIF_F_HW_VLAN_CTAG_RX) flags |= ETH_FLAG_RXVLAN;
|
||||
if (dev->features & NETIF_F_HW_VLAN_CTAG_TX) flags |= ETH_FLAG_TXVLAN;
|
||||
if (dev->features & NETIF_F_NTUPLE) flags |= ETH_FLAG_NTUPLE;
|
||||
if (dev->features & NETIF_F_RXHASH) flags |= ETH_FLAG_RXHASH;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
@ -291,8 +292,8 @@ static int __ethtool_set_flags(struct net_device *dev, u32 data)
|
|||
return -EINVAL;
|
||||
|
||||
if (data & ETH_FLAG_LRO) features |= NETIF_F_LRO;
|
||||
if (data & ETH_FLAG_RXVLAN) features |= NETIF_F_HW_VLAN_RX;
|
||||
if (data & ETH_FLAG_TXVLAN) features |= NETIF_F_HW_VLAN_TX;
|
||||
if (data & ETH_FLAG_RXVLAN) features |= NETIF_F_HW_VLAN_CTAG_RX;
|
||||
if (data & ETH_FLAG_TXVLAN) features |= NETIF_F_HW_VLAN_CTAG_TX;
|
||||
if (data & ETH_FLAG_NTUPLE) features |= NETIF_F_NTUPLE;
|
||||
if (data & ETH_FLAG_RXHASH) features |= NETIF_F_RXHASH;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue