netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Horman <nhorman@tuxdriver.com>
To: netdev@vger.kernel.org
Cc: Neil Horman <nhorman@tuxdriver.com>, davem@davemloft.net
Subject: [PATCH 2/2] net: add passthrough ethtool commands for get/set flags to vlan dev
Date: Tue, 24 May 2011 13:15:14 -0400	[thread overview]
Message-ID: <1306257314-3925-3-git-send-email-nhorman@tuxdriver.com> (raw)
In-Reply-To: <1306257314-3925-1-git-send-email-nhorman@tuxdriver.com>

Add ethtool command to the vlan driver so that when dev_disable_lro is called on
a vlan device, the disablement can be correctly passed down to the underlying
hardware

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: davem@davemloft.net
---
 net/8021q/vlan_dev.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index f247f5b..611839b 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -648,10 +648,24 @@ static struct rtnl_link_stats64 *vlan_dev_get_stats64(struct net_device *dev, st
 	return stats;
 }
 
+static u32 vlan_ethtool_get_flags (struct net_device *vdev)
+{
+	const struct vlan_dev_info *vlan = vlan_dev_info(vdev);
+	return dev_ethtool_get_flags(vlan->real_dev);
+}
+
+static int vlan_ethtool_set_flags(struct net_device *vdev, u32 flags)
+{
+	const struct vlan_dev_info *vlan = vlan_dev_info(vdev);
+	return dev_ethtool_set_flags(vlan->real_dev, flags);
+}
+
 static const struct ethtool_ops vlan_ethtool_ops = {
 	.get_settings	        = vlan_ethtool_get_settings,
 	.get_drvinfo	        = vlan_ethtool_get_drvinfo,
 	.get_link		= ethtool_op_get_link,
+	.get_flags		= vlan_ethtool_get_flags,
+	.set_flags		= vlan_ethtool_set_flags,
 };
 
 static const struct net_device_ops vlan_netdev_ops = {
-- 
1.7.5.1


  parent reply	other threads:[~2011-05-24 17:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-24 17:15 net: enable dynamic lro disabling for vlans Neil Horman
2011-05-24 17:15 ` [PATCH 1/2] net: add dev_ethtool_set_flags helper Neil Horman
2011-05-24 17:15 ` Neil Horman [this message]
2011-05-24 17:22 ` net: enable dynamic lro disabling for vlans Ben Hutchings
2011-05-24 17:54   ` Neil Horman
2011-05-24 18:31 ` net: enable dynamic lro disabling for vlans (v2) Neil Horman
2011-05-24 18:31   ` [PATCH 1/2] net: move is_vlan_dev into public header file (v2) Neil Horman
2011-05-24 18:36     ` Joe Perches
2011-05-24 19:03       ` Neil Horman
2011-05-25 21:56     ` David Miller
2011-05-24 18:31   ` [PATCH 2/2] net: make dev_disable_lro use physical device if passed a vlan dev (v2) Neil Horman
2011-05-25 21:56     ` David Miller
2011-05-28  3:11     ` Ben Hutchings
2011-05-31  0:06       ` Neil Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1306257314-3925-3-git-send-email-nhorman@tuxdriver.com \
    --to=nhorman@tuxdriver.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).