aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJay Vosburgh <fubar@us.ibm.com>2006-01-30 18:40:59 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-02-07 02:03:28 -0500
commita0de3adf8f4e5618c5bd62db08ed293042c8e454 (patch)
tree1cdca0a48abfb24d07919bbeb8db5c3a592f6e89 /drivers/net
parentfa8d3549b591b6da943bad2928f994de07eaecef (diff)
[PATCH] bonding: allow bond to use TSO if slaves support it
Add NETIF_F_TSO (NETIF_F_UFO) to BOND_INTERSECT_FEATURES so that it can be used by a bonding device iff all its slave devices support TSO (UFO). Signed-off-by: Arthur Kepner <akepner@sgi.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bonding/bond_main.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 4ff006c37626..e0f51afec778 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1145,7 +1145,8 @@ int bond_sethwaddr(struct net_device *bond_dev, struct net_device *slave_dev)
1145} 1145}
1146 1146
1147#define BOND_INTERSECT_FEATURES \ 1147#define BOND_INTERSECT_FEATURES \
1148 (NETIF_F_SG|NETIF_F_IP_CSUM|NETIF_F_NO_CSUM|NETIF_F_HW_CSUM) 1148 (NETIF_F_SG|NETIF_F_IP_CSUM|NETIF_F_NO_CSUM|NETIF_F_HW_CSUM|\
1149 NETIF_F_TSO|NETIF_F_UFO)
1149 1150
1150/* 1151/*
1151 * Compute the common dev->feature set available to all slaves. Some 1152 * Compute the common dev->feature set available to all slaves. Some
@@ -1168,6 +1169,16 @@ static int bond_compute_features(struct bonding *bond)
1168 NETIF_F_HW_CSUM))) 1169 NETIF_F_HW_CSUM)))
1169 features &= ~NETIF_F_SG; 1170 features &= ~NETIF_F_SG;
1170 1171
1172 /*
1173 * features will include NETIF_F_TSO (NETIF_F_UFO) iff all
1174 * slave devices support NETIF_F_TSO (NETIF_F_UFO), which
1175 * implies that all slaves also support scatter-gather
1176 * (NETIF_F_SG), which implies that features also includes
1177 * NETIF_F_SG. So no need to check whether we have an
1178 * illegal combination of NETIF_F_{TSO,UFO} and
1179 * !NETIF_F_SG
1180 */
1181
1171 features |= (bond_dev->features & ~BOND_INTERSECT_FEATURES); 1182 features |= (bond_dev->features & ~BOND_INTERSECT_FEATURES);
1172 bond_dev->features = features; 1183 bond_dev->features = features;
1173 1184
@@ -4080,6 +4091,8 @@ static void bond_ethtool_get_drvinfo(struct net_device *bond_dev,
4080 4091
4081static struct ethtool_ops bond_ethtool_ops = { 4092static struct ethtool_ops bond_ethtool_ops = {
4082 .get_tx_csum = ethtool_op_get_tx_csum, 4093 .get_tx_csum = ethtool_op_get_tx_csum,
4094 .get_tso = ethtool_op_get_tso,
4095 .get_ufo = ethtool_op_get_ufo,
4083 .get_sg = ethtool_op_get_sg, 4096 .get_sg = ethtool_op_get_sg,
4084 .get_drvinfo = bond_ethtool_get_drvinfo, 4097 .get_drvinfo = bond_ethtool_get_drvinfo,
4085}; 4098};