public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Yi Zou <yi.zou@intel.com>
To: netdev@vger.kernel.org
Cc: mirq-linux@rere.qmqm.pl, jeffrey.t.kirsher@intel.com,
	devel@open-fcoe.org
Subject: [PATCH] [RFC] vlan: fix updating wanted_features for vlan device
Date: Wed, 04 May 2011 17:48:42 -0700	[thread overview]
Message-ID: <20110505004841.26691.74872.stgit@localhost6.localdomain6> (raw)

commit 8a0427b "vlan: convert VLAN devices to use ndo_fix_features()" converts the
vlan to support ndo_fix_features. However, the wanted_features is not updated
for the vlan device, causing real_dev->features not be populated to the vlan
device when real_dev->features are changed by the driver through FEAT_CHANGE.
This is breaking FCoE related netdev feature flags on vlan devices. Add updating
wanted_features to vlan_transfer_features() so netdev_get_wanted_features() will
can get the updated wanted feature flags for vlan device properly.

I am sending as RFC in case the usage of wanted_features on vlan device is not
right, since the features chanaged are not directly from user doing ethtool, but
it is from user action of starting to run FCoE on a netdev instance. Anyway, let
let me know if there is a preferred alternative fix.

Signed-off-by: Yi Zou <yi.zou@intel.com>
---

 net/8021q/vlan.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 969e700..f2ee00b 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -332,6 +332,7 @@ static void vlan_transfer_features(struct net_device *dev,
 #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
 	vlandev->fcoe_ddp_xid = dev->fcoe_ddp_xid;
 #endif
+	vlandev->wanted_features |= dev->features & dev->vlan_features;
 
 	netdev_update_features(vlandev);
 }


             reply	other threads:[~2011-05-05  0:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-05  0:48 Yi Zou [this message]
2011-05-05  6:51 ` [PATCH] [RFC] vlan: fix updating wanted_features for vlan device Michał Mirosław
2011-05-05  7:49   ` Zou, Yi

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=20110505004841.26691.74872.stgit@localhost6.localdomain6 \
    --to=yi.zou@intel.com \
    --cc=devel@open-fcoe.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=mirq-linux@rere.qmqm.pl \
    --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