From: Jay Vosburgh <fubar@us.ibm.com>
To: Or Gerlitz <ogerlitz@voltaire.com>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: zero features for a vlan over bond / vlan features
Date: Thu, 23 Apr 2009 16:47:41 -0700 [thread overview]
Message-ID: <24949.1240530461@death.nxdomain.ibm.com> (raw)
In-Reply-To: <49E73C94.5030009@Voltaire.com>
Or Gerlitz <ogerlitz@voltaire.com> wrote:
>Jay Vosburgh wrote:
>> The features system now has a dev->vlan_features that lists the
>> features that will work through a vlan; bond_compute_features isn't
>> using netdev_increment/fix_features to additionally compute the vlan_features,
>> so that's ending up always empty even if the underlying device supports vlan passthrough.
>> I'm working on a patch; I'll see what I can come up with.
>
>Great, I will be happy to test the patch once you have it...
Ok, here's a patch, but I'm not sure it's the right patch.
I'm not entirely sure if the vlan_features should be amassed as
the regular features are, or if it should be a strict subset
(slave0->vlan_features & slave1->vlan_features, etc). This patch does
the former, collecting the vlan_features in a manner analagous to the
regular features.
This is strictly a test patch, it's still got printks and such
in it.
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 99610f3..967c5b6 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1341,6 +1341,7 @@ static int bond_compute_features(struct bonding *bond)
struct slave *slave;
struct net_device *bond_dev = bond->dev;
unsigned long features = bond_dev->features;
+ unsigned long vlan_features = 0;
unsigned short max_hard_header_len = max((u16)ETH_HLEN,
bond_dev->hard_header_len);
int i;
@@ -1352,11 +1353,18 @@ static int bond_compute_features(struct bonding *bond)
goto done;
features &= ~NETIF_F_ONE_FOR_ALL;
-
+ vlan_features = bond->first_slave->dev->vlan_features;
+ printk("vf %lx\n", vlan_features);
bond_for_each_slave(bond, slave, i) {
features = netdev_increment_features(features,
slave->dev->features,
NETIF_F_ONE_FOR_ALL);
+ vlan_features = netdev_increment_features(vlan_features,
+ slave->dev->vlan_features,
+ NETIF_F_ONE_FOR_ALL);
+ printk("slave %s (f %lx vf %lx) new f %lx vf %lx\n",
+ slave->dev->name, slave->dev->features,
+ slave->dev->vlan_features, features, vlan_features);
if (slave->dev->hard_header_len > max_hard_header_len)
max_hard_header_len = slave->dev->hard_header_len;
}
@@ -1364,6 +1372,8 @@ static int bond_compute_features(struct bonding *bond)
done:
features |= (bond_dev->features & BOND_VLAN_FEATURES);
bond_dev->features = netdev_fix_features(features, NULL);
+ bond_dev->vlan_features = netdev_fix_features(vlan_features, NULL);
+ printk("bd->vf %lx\n", bond_dev->vlan_features);
bond_dev->hard_header_len = max_hard_header_len;
return 0;
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
next prev parent reply other threads:[~2009-04-23 23:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-06 13:00 zero features for a vlan over bond Or Gerlitz
2009-04-07 14:16 ` Jay Vosburgh
2009-04-07 22:16 ` Or Gerlitz
2009-04-16 14:11 ` zero features for a vlan over bond / vlan features Or Gerlitz
2009-04-23 23:47 ` Jay Vosburgh [this message]
2009-06-08 9:34 ` Or Gerlitz
2009-07-20 8:08 ` Or Gerlitz
2009-07-22 21:34 ` [PATCH net-next-2.6] bonding: propogate vlan_features to bonding master Jay Vosburgh
2009-07-23 6:03 ` Eric Dumazet
2009-07-23 7:24 ` Or Gerlitz
2009-07-23 8:29 ` [PATCH net-next-2.6] bnx2: Update vlan_features Eric Dumazet
2009-07-23 12:01 ` Eric Dumazet
2009-07-23 17:59 ` David Miller
2009-07-24 0:12 ` Michael Chan
2009-07-24 7:21 ` [PATCH net-next-2.6] bnx2x: Dont update vlan_features in bnx2x_set_tso() Eric Dumazet
2009-07-26 10:53 ` Eilon Greenstein
2009-07-27 2:49 ` David Miller
2009-07-27 2:50 ` [PATCH net-next-2.6] bnx2: Update vlan_features David Miller
2009-07-23 11:03 ` [PATCH net-next-2.6] bonding: propogate vlan_features to bonding master Patrick McHardy
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=24949.1240530461@death.nxdomain.ibm.com \
--to=fubar@us.ibm.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@voltaire.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.