aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2013-05-16 03:34:53 -0400
committerDavid S. Miller <davem@davemloft.net>2013-05-16 18:02:01 -0400
commitb0ce3508b25ea6fa10ae3ca254de1d695b521702 (patch)
treed5158ba0fe71d3807c563148c6cddb3757e7f348 /include/linux/netdevice.h
parent3aefe2b4a8003517d6e15112f806fd4069785389 (diff)
bonding: allow TSO being set on bonding master
In some situations, we need to disable TSO on bonding slaves. bonding device automatically unset TSO in bond_fix_features(), and performance is not good because : 1) We consume more cpu cycles. 2) GSO segmentation has some bugs leading to out of order TCP packets if this segmentation is done before virtual device. This particular problem will be addressed in a separate patch. This patch allows TSO being set/unset on the bonding master, so that GSO segmentation is done after bonding layer. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Michał Mirosław <mirqus@gmail.com> Cc: Jay Vosburgh <fubar@us.ibm.com> Cc: Andy Gospodarek <andy@greyhouse.net> Cc: Maciej Żenczykowski <maze@google.com> Cc: Tom Herbert <therbert@google.com> Cc: Neal Cardwell <ncardwell@google.com> Cc: Yuchung Cheng <ycheng@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index a94a5a0ab122..60584b185a0c 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2733,6 +2733,17 @@ static inline netdev_features_t netdev_get_wanted_features(
2733} 2733}
2734netdev_features_t netdev_increment_features(netdev_features_t all, 2734netdev_features_t netdev_increment_features(netdev_features_t all,
2735 netdev_features_t one, netdev_features_t mask); 2735 netdev_features_t one, netdev_features_t mask);
2736
2737/* Allow TSO being used on stacked device :
2738 * Performing the GSO segmentation before last device
2739 * is a performance improvement.
2740 */
2741static inline netdev_features_t netdev_add_tso_features(netdev_features_t features,
2742 netdev_features_t mask)
2743{
2744 return netdev_increment_features(features, NETIF_F_ALL_TSO, mask);
2745}
2746
2736int __netdev_update_features(struct net_device *dev); 2747int __netdev_update_features(struct net_device *dev);
2737void netdev_update_features(struct net_device *dev); 2748void netdev_update_features(struct net_device *dev);
2738void netdev_change_features(struct net_device *dev); 2749void netdev_change_features(struct net_device *dev);