diff mbox

[1/1,net] net: fix bonding advertising offloads it can't support

Message ID 45ec1e78b1bf8934a84e68968a0bb8b747eec6bf.1310682766.git.mirq-linux@rere.qmqm.pl
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Michał Mirosław July 14, 2011, 10:34 p.m. UTC
There is no software fallback implemented for SCTP or FCoE checksumming,
and so it should not be passed on by software devices like bridge or
bonding.

For VLAN devices, this is different. First, the driver for underlying
device should be prepared to get offloaded packets even when the feature
is disabled (especially if it advertises it in vlan_features). Second,
devices under VLANs do not get replaced without tearing down the VLAN
first.

This fixes a mess I accidentally introduced while converting bonding to
ndo_fix_features in b2a103e6d0.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
 drivers/net/bonding/bond_main.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Comments

David Miller July 14, 2011, 10:37 p.m. UTC | #1
From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Date: Fri, 15 Jul 2011 00:34:50 +0200 (CEST)

> There is no software fallback implemented for SCTP or FCoE checksumming,
> and so it should not be passed on by software devices like bridge or
> bonding.
> 
> For VLAN devices, this is different. First, the driver for underlying
> device should be prepared to get offloaded packets even when the feature
> is disabled (especially if it advertises it in vlan_features). Second,
> devices under VLANs do not get replaced without tearing down the VLAN
> first.
> 
> This fixes a mess I accidentally introduced while converting bonding to
> ndo_fix_features in b2a103e6d0.
> 
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>

I already applied this, and the SCTP patch, to net-2.6
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index eafe44a..63c22b0 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1428,9 +1428,9 @@  out:
 	return features;
 }
 
-#define BOND_VLAN_FEATURES	(NETIF_F_ALL_TX_OFFLOADS | \
-				 NETIF_F_SOFT_FEATURES | \
-				 NETIF_F_LRO)
+#define BOND_VLAN_FEATURES	(NETIF_F_ALL_CSUM | NETIF_F_SG | \
+				 NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \
+				 NETIF_F_HIGHDMA | NETIF_F_LRO)
 
 static void bond_compute_features(struct bonding *bond)
 {