Netdev List
 help / color / mirror / Atom feed
* [PATCH] bonding: allow TSO being set on bonding master
@ 2013-05-15 21:41 Eric Dumazet
  2013-05-15 22:55 ` Michał Mirosław
  2013-05-16 17:34 ` [PATCH v2] " Eric Dumazet
  0 siblings, 2 replies; 12+ messages in thread
From: Eric Dumazet @ 2013-05-15 21:41 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, Jay Vosburgh, Maciej Żenczykowski, Andy Gospodarek,
	Tom Herbert, Neal Cardwell, Yuchung Cheng

From: Eric Dumazet <edumazet@google.com>

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: 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>
---
 drivers/net/bonding/bond_main.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index d0aade0..b429bb8 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1362,6 +1362,11 @@ static netdev_features_t bond_fix_features(struct net_device *dev,
 						     slave->dev->features,
 						     mask);
 	}
+	/* Allow TSO being used on bonding device :
+	 * Performing the GSO segmentation after bonding transmit
+	 * is a performance improvement.
+	 */
+	features |= mask & NETIF_F_ALL_TSO;
 
 out:
 	read_unlock(&bond->lock);

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-05-16 22:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-15 21:41 [PATCH] bonding: allow TSO being set on bonding master Eric Dumazet
2013-05-15 22:55 ` Michał Mirosław
2013-05-15 23:18   ` Eric Dumazet
2013-05-15 23:30     ` Eric Dumazet
2013-05-16  4:31       ` Maciej Żenczykowski
2013-05-16  4:44         ` Eric Dumazet
2013-05-16  5:45       ` Michał Mirosław
2013-05-16  6:09         ` Eric Dumazet
2013-05-16  8:59           ` Michał Mirosław
2013-05-16 17:34 ` [PATCH v2] " Eric Dumazet
2013-05-16 22:02   ` David Miller
2013-05-16 22:16     ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox