From patchwork Wed Oct 20 23:56:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Gross X-Patchwork-Id: 68496 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 293EAB7103 for ; Thu, 21 Oct 2010 10:56:51 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752053Ab0JTX4g (ORCPT ); Wed, 20 Oct 2010 19:56:36 -0400 Received: from mail-qy0-f181.google.com ([209.85.216.181]:52033 "EHLO mail-qy0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753022Ab0JTX4e (ORCPT ); Wed, 20 Oct 2010 19:56:34 -0400 Received: by qyk9 with SMTP id 9so1826119qyk.19 for ; Wed, 20 Oct 2010 16:56:33 -0700 (PDT) Received: by 10.224.25.75 with SMTP id y11mr65564qab.71.1287618991632; Wed, 20 Oct 2010 16:56:31 -0700 (PDT) Received: from umstead.nicira.com (173-164-153-19-SFBA.hfc.comcastbusiness.net [173.164.153.19]) by mx.google.com with ESMTPS id y14sm373473vch.4.2010.10.20.16.56.30 (version=SSLv3 cipher=RC4-MD5); Wed, 20 Oct 2010 16:56:31 -0700 (PDT) From: Jesse Gross To: David Miller Cc: netdev@vger.kernel.org Subject: [PATCH v2 07/14] ethtool: Add support for vlan accleration. Date: Wed, 20 Oct 2010 16:56:07 -0700 Message-Id: <1287618974-4714-8-git-send-email-jesse@nicira.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1287618974-4714-1-git-send-email-jesse@nicira.com> References: <1287618974-4714-1-git-send-email-jesse@nicira.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- include/linux/ethtool.h | 2 ++ net/core/ethtool.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 8a3338c..6628a50 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -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), diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 685c700..956a9f4 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c @@ -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) {