zero features for a vlan over bond
Subsystems (3)
Hi,
Using vconfig and the 8021q modules I have created a vlan device over a bond (e.g bond0.4001 over bond0 which is over eth0,eth1) - but for some reason the vlan device has no features - any idea what may be the reason for that? below is the flags/features matrix (eth0/1 are igb, 2.6.29)
device flags features
================================
bond0.4001 0x1403 0x0
bond0 0x1403 0x1113a9
eth0/1 0x1803 0x111ba9
Or.
Quoted 10 lines · Or Gerlitz
Using vconfig and the 8021q modules I have created a vlan device over a bond (e.g bond0.4001 over bond0 which is over eth0,eth1) - but for some reason the vlan device has no features - any idea what may be the reason for that? below is the flags/features matrix (eth0/1 are igb, 2.6.29)
device flags features
================================
bond0.40010x14030x0
bond00x14030x1113a9
eth0/10x18030x111ba9
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 suspect a bridge will display the same symptoms.
I'm working on a patch; I'll see what I can come up with. Note,
however, that at this writing, the set of drivers that explicitly supports VLAN passthrough (a non-zero vlan_features) is rather limited.
-J
---
-Jay Vosburgh, IBM Linux Technology Center, [email protected]
Quoted 3 lines · Jay Vosburgh
I suspect a bridge will display the same symptoms. I'm working on a patch; I'll see what I can come up with. Note, however, that at this writing, the set of drivers that explicitly supports VLAN passthrough (a non-zero
vlan_features) is rather limited.
Hi Jay,
Thanks for your quick notes. I'm looking forward to see the patch and then better understand the impact on bridges and how VLANs are going along with bonds and bridges, but the way are later two coexist peacefully? I remember discussions in the past whether one can bridge bonds and/or bond bridges, however, I wasn't sure what was the conclusion and what is possible, I would be more interested to see that the specific case of a bond connected to a bridge is supported. We are going into the Passover vacation and as such I would be somehow slow in responding over the next week or so.
Or.
Re: zero features for a vlan over bond / vlan features
In reply to Jay VosburghQuoted 5 lines · Jay Vosburgh
The features system now has a
dev->vlan_featuresthat lists the
features that will work through a vlan;bond_compute_featuresisn't
using netdev_increment/fix_features to additionally compute thevlan_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...
Quoted 2 lines
Note, however, that at this writing, the set of drivers that explicitly supports VLAN passthrough (a non-zero
vlan_features) is rather limited.
Please correct me if I'm wrong - would be it correct to say that there's a concept of "VLAN acceleration" which comes into play when the NIC device advertises NETIF_F_HW_VLAN_xxx features and a concept of "VLAN passthrough" which means the NIC device have a non empty vlan_features bit mask?
Looking on Linus tree I noted that indeed only few drivers have non-empty vlan_features and I wonder if the reason for that is indeed lack of HW support or just the driver maintainers being somehow slow to catch up with the vlan_features concept, Dave - any insight here?
Or.
Re: zero features for a vlan over bond / vlan features
Quoted 8 lines · Or Gerlitz
Quoted 5 lines · Jay Vosburgh
The features system now has a
dev->vlan_featuresthat lists the
features that will work through a vlan;bond_compute_featuresisn't
using netdev_increment/fix_features to additionally compute thevlan_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.
drivers/net/bonding/bond_main.c +11 -1
@@ -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, [email protected]
Re: zero features for a vlan over bond / vlan features
Quoted 10 lines · Jay Vosburgh
Quoted 4 lines
Quoted 4 lines
The features system now has a
dev->vlan_featuresthat lists the features that will work through a vlan;bond_compute_featuresisn't using netdev_increment/fix_features to additionally compute thevlan_features, so that's ending up always empty even if the underlying device supports vlan passthroughOk, here's a patch, but I'm not sure it's the right patch.
I'm not entirely sure if thevlan_featuresshould 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 thevlan_featuresin a manner analogous to the regular features.
Jay,
I have tested with your patch and indeed now, vlan-over-bond (e.g bond0.4001) advertises features to the stack wheres before it didn't. Below is the patch you sent with the debugging prints removed and my signature added, I would be happy if you set the change-log && your signature and push it further to Dave. I'm also find if you prefer that I'll do that.
drivers/net/bonding/bond_main.c +6 -0
@@ -1339,6 +1339,7 @@ static int bond_compute_features(structstruct 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;
@@ -1351,10 +1352,14 @@ static int bond_compute_features(struct features &= ~NETIF_F_ONE_FOR_ALL ; + vlan_features = bond->first_slave->dev->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 );if (slave->dev->hard_header_len > max_hard_header_len) max_hard_header_len = slave->dev->hard_header_len; }
@@ -1362,6 +1367,7 @@ static int bond_compute_features(struct 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 ); bond_dev->hard_header_len = max_hard_header_len;return 0 ;
Re: zero features for a vlan over bond / vlan features
Quoted 4 lines · Or Gerlitz
Jay, I have tested with your patch and indeed now, vlan-over-bond (e.g bond0.4001) advertises features to the stack wheres before it didn't. Below is the patch you sent with the debugging prints removed and my signature added, I would be happy if you set the change-log && your signature and push it further to Dave. I'm also find if you prefer that I'll do that.
Signed-off-by Or Gerlitz <[email protected]>
Hi Jay,
This (http://marc.info/?l=linux-netdev&m=124445367820790) is pending quite a lot of time and already missed 2.6.31, please let me know if you prefer that I will push it directly to Dave, or you want to do so, thanks
Or.
PATCH 1/1 bonding: propogate vlan_features to bonding master
Propogate the vlan_features of the slave devices to the bonding
master device, using the same logic as for regular features.
Tested by Or Gerlitz <[email protected]>, who also removed
the debug logic from the original test patch.
drivers/net/bonding/bond_main.c +6 -0
@@ -1331,6 +1331,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;unsigned short max_hard_header_len =max ((u16 )ETH_HLEN , bond_dev->hard_header_len);int i;
@@ -1343,10 +1344,14 @@ static int bond_compute_features(struct bonding *bond) features &= ~NETIF_F_ONE_FOR_ALL ; + vlan_features = bond->first_slave->dev->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 );if (slave->dev->hard_header_len > max_hard_header_len) max_hard_header_len = slave->dev->hard_header_len; }
@@ -1354,6 +1359,7 @@ 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 ); bond_dev->hard_header_len = max_hard_header_len;return 0 ;
Re: [PATCH net-next-2.6] bonding: propogate vlan_features to bonding master
Quoted 8 lines · Jay Vosburgh
Propogate the
vlan_featuresof the slave devices to the bonding
master device, using the same logic as for regular features.Tested by Or Gerlitz <[email protected]>, who also removed
the debug logic from the original test patch.Signed-off-by Or Gerlitz <[email protected]>Signed-off-by Jay Vosburgh <[email protected]>
Seems pretty cool, but I could not test it on my dev machine, since tg3 and bnx2 drivers dont advertize yet vlan_features
Quoted 36 lines
drivers/net/bonding/bond_main.c +6
-0@@ -1331,6 +1331,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;unsigned short max_hard_header_len =max ((u16 )ETH_HLEN , bond_dev->hard_header_len);int i;@@ -1343,10 +1344,14 @@ static int bond_compute_features(struct bonding *bond) features &= ~NETIF_F_ONE_FOR_ALL ; + vlan_features = bond->first_slave->dev->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 );if (slave->dev->hard_header_len > max_hard_header_len) max_hard_header_len = slave->dev->hard_header_len; }@@ -1354,6 +1359,7 @@ 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 ); bond_dev->hard_header_len = max_hard_header_len;return 0 ;
Re: [PATCH net-next-2.6] bonding: propogate vlan_features to bonding master
Quoted 3 lines · Eric Dumazet
Quoted 1 line · Jay Vosburgh
Propogate the
vlan_featuresof the slave devices to the bonding master device, using the same logic as for regular features.Seems pretty cool, but I could not test it on my dev machine, since tg3 and bnx2 drivers dont advertize yet
vlan_features
The bnx2x maintainer posted yesterday a patch that does so, I assume a similar patch could work for at least one of tg3 or bnx2. I copied both maintainers on this email, in the hope they can come up with a patch.
Or.
PATCH 1/1 bnx2: Update vlan_features
Quoted 10 lines · Or Gerlitz
Quoted 5 lines · Eric Dumazet
Quoted 2 lines · Jay Vosburgh
Propogate the
vlan_featuresof the slave devices to the bonding master device, using the same logic as for regular features.Seems pretty cool, but I could not test it on my dev machine, since tg3 and bnx2 drivers dont advertize yet
vlan_featuresThe bnx2x maintainer posted yesterday a patch that does so, I assume a similar patch could work for at least one of tg3 or bnx2. I copied both maintainers on this email, in the hope they can come up with a patch.
Here is the bnx2 patch I cooked to test this vlan_features propagation on bonding.
Everything fine so far !
# cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.5.0 (November 4, 2008)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth1 (bnx2 driver)
MII Status: up
Link Failure Count: 2
Permanent HW addr: 00:1e:0b:ec:d3:d2
Slave Interface: eth2 (tg3 driver)
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:1e:0b:92:78:50
# ethtool -k bond0 Offload parameters for bond0: Cannot get device rx csum settings: Operation not supported rx-checksumming: off tx-checksumming: on scatter-gather: on tcp-segmentation-offload: on udp-fragmentation-offload: off generic-segmentation-offload: off generic-receive-offload: off large-receive-offload: off
# ip link add link bond0 vlan.103 type vlan id 103 # ethtool -k vlan.103 Offload parameters for vlan.103: rx-checksumming: off tx-checksumming: on scatter-gather: on tcp-segmentation-offload: on udp-fragmentation-offload: off generic-segmentation-offload: on generic-receive-offload: off large-receive-offload: off
Thanks Or & Jay
[PATCH net-next-2.6] bnx2: Update vlan_features
In order to get full use of some advanced features of BNX2, we now need to fill dev->vlan_features.
Patch successfully tested with vlan devices built on top of bonding. (bond0 : one bnx2 slave, one tg3 slave (not yet vlan_features enabled)
--- drivers/net/bnx2.c | 36 ++++++++++++++++++++++++++++++------ 1 files changed, 30 insertions(+), 6 deletions(-)
drivers/net/bnx2.c +30 -6
@@ -3485,6 +3485,20 @@ static int bnx2_poll(struct napi_struct *napi, int budget)return work_done; } +static void inline vlan_features_add (struct net_device *dev,unsigned long flags) +{ +#ifdef BCM_VLAN + dev->vlan_features |= flags; +#endif +} + +static void inline vlan_features_del (struct net_device *dev,unsigned long flags) +{ +#ifdef BCM_VLAN + dev->vlan_features &= ~flags; +#endif +} +/* Called with rtnl_lock from vlan functions and also netif_tx_lock * from set_multicast. */
@@ -7068,11 +7082,17 @@ bnx2_set_tso(struct net_device *dev, u32 data)if (data) { dev->features |=NETIF_F_TSO |NETIF_F_TSO_ECN ; -if (CHIP_NUM (bp) ==CHIP_NUM_5709 ) +vlan_features_add (dev,NETIF_F_TSO |NETIF_F_TSO_ECN ); +if (CHIP_NUM (bp) ==CHIP_NUM_5709 ) { dev->features |=NETIF_F_TSO6 ; - }else +vlan_features_add (dev,NETIF_F_TSO6 ); + } + }else { dev->features &= ~(NETIF_F_TSO |NETIF_F_TSO6 |NETIF_F_TSO_ECN ); +vlan_features_del (dev,NETIF_F_TSO |NETIF_F_TSO6 | +NETIF_F_TSO_ECN ); + }return 0 ; }
@@ -8064,16 +8084,20 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)memcpy (dev->perm_addr, bp->mac_addr,6 ); dev->features |=NETIF_F_IP_CSUM |NETIF_F_SG ; -if (CHIP_NUM (bp) ==CHIP_NUM_5709 ) +vlan_features_add (dev,NETIF_F_IP_CSUM |NETIF_F_SG ); +if (CHIP_NUM (bp) ==CHIP_NUM_5709 ) { dev->features |=NETIF_F_IPV6_CSUM ; - +vlan_features_add (dev,NETIF_F_IPV6_CSUM ); + }#ifdef BCM_VLAN dev->features |=NETIF_F_HW_VLAN_TX |NETIF_F_HW_VLAN_RX ;#endif dev->features |=NETIF_F_TSO |NETIF_F_TSO_ECN ; -if (CHIP_NUM (bp) ==CHIP_NUM_5709 ) +vlan_features_add (dev,NETIF_F_TSO |NETIF_F_TSO_ECN ); +if (CHIP_NUM (bp) ==CHIP_NUM_5709 ) { dev->features |=NETIF_F_TSO6 ; - +vlan_features_add (dev,NETIF_F_TSO6 ); + }if ((rc =register_netdev (dev))) {dev_err (&pdev->dev,"Cannot register net device\n" ); goto error;
Re: [PATCH net-next-2.6] bnx2: Update vlan_features
Quoted 63 lines · Eric Dumazet
Quoted 10 lines · Or Gerlitz
Quoted 5 lines · Eric Dumazet
Quoted 2 lines · Jay Vosburgh
Propogate the
vlan_featuresof the slave devices to the bonding master device, using the same logic as for regular features.Seems pretty cool, but I could not test it on my dev machine, since tg3 and bnx2 drivers dont advertize yet
vlan_featuresThe bnx2x maintainer posted yesterday a patch that does so, I assume a similar patch could work for at least one of tg3 or bnx2. I copied both maintainers on this email, in the hope they can come up with a patch.
Here is the bnx2 patch I cooked to test this
vlan_featurespropagation on bonding.Everything fine so far !
# cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.5.0 (November 4, 2008)Bonding Mode: fault-tolerance (active-backup) Primary Slave: None
Currently Active Slave: eth1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0Slave Interface: eth1 (bnx2 driver)
MII Status: up
Link Failure Count: 2 Permanent HW addr: 00:1e:0b:ec:d3:d2Slave Interface: eth2 (tg3 driver)
MII Status: up
Link Failure Count: 0 Permanent HW addr: 00:1e:0b:92:78:50# ethtool -k bond0 Offload parameters for bond0: Cannot get device rx csum settings: Operation not supported rx-checksumming: off tx-checksumming: on scatter-gather: on tcp-segmentation-offload: on udp-fragmentation-offload: off generic-segmentation-offload: off generic-receive-offload: off large-receive-offload: off# ip link add link bond0 vlan.103 type vlan id 103 # ethtool -k vlan.103 Offload parameters for vlan.103: rx-checksumming: off tx-checksumming: on scatter-gather: on tcp-segmentation-offload: on udp-fragmentation-offload: off generic-segmentation-offload: on generic-receive-offload: off large-receive-offload: off
Quoted 2 lines
Thanks Or & Jay
Updated to take into account Patrick feedback : We dont need to change vlan_features in bnx2_set_tso()
Quoting Patrick from another thread :
"vlan_features doesn't need to be updated, the resulting dev->features of the VLAN device is computed as the intersection of dev->features and dev->vlan_features."
[PATCH net-next-2.6] bnx2: Update vlan_features
In order to get full use of some advanced features of BNX2, we now need to fill dev->vlan_features.
Patch successfully tested with vlan devices built on top of bonding. (bond0 : one bnx2 slave, one tg3 slave (not yet vlan_features enabled)
--- drivers/net/bnx2.c | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-)
drivers/net/bnx2.c +15 -4
@@ -8023,6 +8023,13 @@ static const struct net_device_ops bnx2_netdev_ops = {#endif }; +static void inline vlan_features_add (struct net_device *dev,unsigned long flags) +{ +#ifdef BCM_VLAN + dev->vlan_features |= flags; +#endif +} +static int __devinit bnx2_init_one (struct pci_dev *pdev,const struct pci_device_id *ent) {
@@ -8064,16 +8071,20 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)memcpy (dev->perm_addr, bp->mac_addr,6 ); dev->features |=NETIF_F_IP_CSUM |NETIF_F_SG ; -if (CHIP_NUM (bp) ==CHIP_NUM_5709 ) +vlan_features_add (dev,NETIF_F_IP_CSUM |NETIF_F_SG ); +if (CHIP_NUM (bp) ==CHIP_NUM_5709 ) { dev->features |=NETIF_F_IPV6_CSUM ; - +vlan_features_add (dev,NETIF_F_IPV6_CSUM ); + }#ifdef BCM_VLAN dev->features |=NETIF_F_HW_VLAN_TX |NETIF_F_HW_VLAN_RX ;#endif dev->features |=NETIF_F_TSO |NETIF_F_TSO_ECN ; -if (CHIP_NUM (bp) ==CHIP_NUM_5709 ) +vlan_features_add (dev,NETIF_F_TSO |NETIF_F_TSO_ECN ); +if (CHIP_NUM (bp) ==CHIP_NUM_5709 ) { dev->features |=NETIF_F_TSO6 ; - +vlan_features_add (dev,NETIF_F_TSO6 ); + }if ((rc =register_netdev (dev))) {dev_err (&pdev->dev,"Cannot register net device\n" ); goto error;
David Miller
maintainerRe: [PATCH net-next-2.6] bnx2: Update vlan_features
From: Eric Dumazet <[email protected]>
Date: Thu, 23 Jul 2009 14:01:38 +0200
Quoted 9 lines
[PATCH net-next-2.6] bnx2: Update
vlan_featuresIn order to get full use of some advanced features of BNX2, we now need to fill
dev->vlan_features.Patch successfully tested with vlan devices built on top of bonding. (bond0 : one bnx2 slave, one tg3 slave (not yet
vlan_featuresenabled)Signed-off-by Eric Dumazet <[email protected]>
Can I get some Broadcom ACKs for this?
Thanks.
Michael Chan
Acked-byRe: [PATCH net-next-2.6] bnx2: Update vlan_features
Quoted 8 lines · David Miller
From: Eric Dumazet <[email protected]>
Date: Thu, 23 Jul 2009 14:01:38 +0200Quoted 5 lines
[PATCH net-next-2.6] bnx2: Update
vlan_featuresIn order to get full use of some advanced features of BNX2, we now need to fill
dev->vlan_features.
Quoted 7 lines
Quoted 4 lines
Patch successfully tested with vlan devices built on top of bonding. (bond0 : one bnx2 slave, one tg3 slave (not yet
vlan_featuresenabled)Signed-off-by Eric Dumazet <[email protected]>Can I get some Broadcom ACKs for this?
I've reviewed and tested Eric's 2nd patch. Thanks.
PATCH 1/1 bnx2x: Dont update vlan_features in bnx2x_set_tso()
Quoted 12 lines · Michael Chan
Quoted 11 lines · David Miller
From: Eric Dumazet <[email protected]>
Date: Thu, 23 Jul 2009 14:01:38 +0200Quoted 8 lines
[PATCH net-next-2.6] bnx2: Update
vlan_featuresIn order to get full use of some advanced features of BNX2, we now need to fill
dev->vlan_features.Patch successfully tested with vlan devices built on top of bonding. (bond0 : one bnx2 slave, one tg3 slave (not yet
vlan_featuresenabled)
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Eric Dumazet <[email protected]>Can I get some Broadcom ACKs for this?
I've reviewed and tested Eric's 2nd patch. Thanks.
Acked-by Michael Chan <[email protected]>
Thanks
Based on Patrick feedback, I believe we can add this followup too
[PATCH net-next-2.6] bnx2x: Dont update vlan_features in bnx2x_set_tso()
Patrick said : "vlan_features doesn't need to be updated, the resulting dev->features of the VLAN device is computed as the intersection of dev->features and dev->vlan_features."
---
drivers/net/bnx2x_main.c +0 -8
@@ -9349,17 +9349,9 @@ static int bnx2x_set_tso(struct net_device *dev, u32 data)if (data) { dev->features |= (NETIF_F_TSO |NETIF_F_TSO_ECN ); dev->features |=NETIF_F_TSO6 ; -#ifdef BCM_VLAN - dev->vlan_features |= (NETIF_F_TSO |NETIF_F_TSO_ECN ); - dev->vlan_features |=NETIF_F_TSO6 ; -#endif }else { dev->features &= ~(NETIF_F_TSO |NETIF_F_TSO_ECN ); dev->features &= ~NETIF_F_TSO6 ; -#ifdef BCM_VLAN - dev->vlan_features &= ~(NETIF_F_TSO |NETIF_F_TSO_ECN ); - dev->vlan_features &= ~NETIF_F_TSO6 ; -#endif }return 0 ;
Re: [PATCH net-next-2.6] bnx2x: Dont update vlan_features in bnx2x_set_tso()
Quoted 8 lines · Eric Dumazet
Based on Patrick feedback, I believe we can add this followup too
[PATCH net-next-2.6] bnx2x: Dont update
vlan_featuresinbnx2x_set_tso()Patrick said : "
vlan_featuresdoesn't need to be updated, the resultingdev->featuresof the VLAN device is computed as the intersection ofdev->featuresanddev->vlan_features."
Thanks Eric
Quoted 1 line
Signed-off-by Eric Dumazet <[email protected]>
Re: [PATCH net-next-2.6] bnx2x: Dont update vlan_features in bnx2x_set_tso()
From: "Eilon Greenstein" <[email protected]>
Date: Sun, 26 Jul 2009 13:53:43 +0300
Quoted 5 lines · Eric Dumazet
Quoted 4 lines
Based on Patrick feedback, I believe we can add this followup too
[PATCH net-next-2.6] bnx2x: Dont update
vlan_featuresinbnx2x_set_tso()
Quoted 8 lines
Quoted 4 lines
Patrick said : "
vlan_featuresdoesn't need to be updated, the resultingdev->featuresof the VLAN device is computed as the intersection ofdev->featuresanddev->vlan_features."Thanks Eric
Quoted 1 line
Signed-off-by Eric Dumazet <[email protected]>Acked-by Eilon Greenstein <[email protected]>
Applied, thanks.
Re: [PATCH net-next-2.6] bnx2: Update vlan_features
In reply to Michael ChanFrom: "Michael Chan" <[email protected]>
Date: Thu, 23 Jul 2009 17:12:59 -0700
Quoted 13 lines · David Miller
Quoted 11 lines
From: Eric Dumazet <[email protected]>
Date: Thu, 23 Jul 2009 14:01:38 +0200Quoted 8 lines
[PATCH net-next-2.6] bnx2: Update
vlan_featuresIn order to get full use of some advanced features of BNX2, we now need to fill
dev->vlan_features.Patch successfully tested with vlan devices built on top of bonding. (bond0 : one bnx2 slave, one tg3 slave (not yet
vlan_featuresenabled)
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Eric Dumazet <[email protected]>Can I get some Broadcom ACKs for this?
I've reviewed and tested Eric's 2nd patch. Thanks.
Acked-by Michael Chan <[email protected]>
Applied.
Re: [PATCH net-next-2.6] bonding: propogate vlan_features to bonding master
In reply to Jay VosburghQuoted 11 lines · Jay Vosburgh
Propogate the
vlan_featuresof the slave devices to the bonding
master device, using the same logic as for regular features.Tested by Or Gerlitz <[email protected]>, who also removed
the debug logic from the original test patch.drivers/net/bonding/bond_main.c +0
-0
drivers/net/bonding/bond_main.c static int bond_compute_features(struct bonding *bond) · line 1362
Quoted 4 lines
drivers/net/bonding/bond_main.c +1
-0@@ -1354,6 +1359,7 @@ 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 );
You need to call netdev_features_change() to make sure the VLAN code notices the change.