]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ethtool: Add support for vlan accleration.
authorJesse Gross <jesse@nicira.com>
Wed, 20 Oct 2010 13:56:07 +0000 (13:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Oct 2010 08:26:54 +0000 (01:26 -0700)
Now that vlan acceleration is handled consistently regardless of usage,
it is possible to enable and disable it at will.  This adds support for
Ethtool operations that change the offloading status for debugging
purposes, similar to other forms of hardware acceleration.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/ethtool.h
net/core/ethtool.c

index 8a3338ceb4380c397249198076ad61a57a578f3b..6628a507fd3b5dff0184048ec56d3e57257343ad 100644 (file)
@@ -309,6 +309,8 @@ struct ethtool_perm_addr {
  * flag differs from the read-only value.
  */
 enum ethtool_flags {
+       ETH_FLAG_TXVLAN         = (1 << 7),     /* TX VLAN offload enabled */
+       ETH_FLAG_RXVLAN         = (1 << 8),     /* RX VLAN offload enabled */
        ETH_FLAG_LRO            = (1 << 15),    /* LRO is enabled */
        ETH_FLAG_NTUPLE         = (1 << 27),    /* N-tuple filters enabled */
        ETH_FLAG_RXHASH         = (1 << 28),
index 685c7005e87fe928df83c780f1c7aa8552f5117e..956a9f4971cbc2e7f81c4ab5d8c8a8b909d00bf1 100644 (file)
@@ -132,7 +132,8 @@ EXPORT_SYMBOL(ethtool_op_set_ufo);
  * NETIF_F_xxx values in include/linux/netdevice.h
  */
 static const u32 flags_dup_features =
-       (ETH_FLAG_LRO | ETH_FLAG_NTUPLE | ETH_FLAG_RXHASH);
+       (ETH_FLAG_LRO | ETH_FLAG_RXVLAN | ETH_FLAG_TXVLAN | ETH_FLAG_NTUPLE |
+        ETH_FLAG_RXHASH);
 
 u32 ethtool_op_get_flags(struct net_device *dev)
 {