[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20140502165727.850ECE635B@unicorn.suse.cz>
Date: Fri, 2 May 2014 18:57:27 +0200 (CEST)
From: Michal Kubecek <mkubecek@...e.cz>
To: "David S. Miller" <davem@...emloft.net>
Cc: netdev@...r.kernel.org, Jay Vosburgh <j.vosburgh@...il.com>,
Veaceslav Falico <vfalico@...il.com>,
Andy Gospodarek <andy@...yhouse.net>,
Michal Miroslaw <mirq-linux@...e.qmqm.pl>
Subject: [PATCH net] bonding: fix vlan_features computing
bond_compute_features() uses netdev_increment_features() to
combine vlan_features of slaves into vlan_features of the bond.
As netdev_increment_features() only adds most features and we
start with BOND_VLAN_FEATURES, we may end up with features none
of the slaves provided.
In particular, BOND_VLAN_FEATURES contains NETIF_F_HW_CSUM so
that netdev_increment_features() clears NETIF_F_IP{,V6}_CSUM and
if we only have slaves with NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM
(e.g. ixgbe based cards), the same will be in features of the
bond and a vlan device on top of the bond would support no
checksumming, resulting in significant performance degradation.
If there is at least one slave, initialize vlan_features only
with the flags in NETIF_F_ALL_FOR_ALL. Right now there is none
in BOND_VLAN_FEATURES but stating it explicitely will make the
code more future proof.
Signed-off-by: Michal Kubecek <mkubecek@...e.cz>
---
drivers/net/bonding/bond_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 69aff72..34ca55d 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1038,6 +1038,7 @@ static void bond_compute_features(struct bonding *bond)
if (!bond_has_slaves(bond))
goto done;
+ vlan_features &= NETIF_F_ALL_FOR_ALL;
bond_for_each_slave(bond, slave, iter) {
vlan_features = netdev_increment_features(vlan_features,
--
1.8.1.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists