From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
"Jay Vosburgh" <fubar@us.ibm.com>,
"Maciej Żenczykowski" <maze@google.com>,
"Andy Gospodarek" <andy@greyhouse.net>,
"Tom Herbert" <therbert@google.com>,
"Neal Cardwell" <ncardwell@google.com>,
"Yuchung Cheng" <ycheng@google.com>
Subject: [PATCH] bonding: allow TSO being set on bonding master
Date: Wed, 15 May 2013 14:41:05 -0700 [thread overview]
Message-ID: <1368654065.4519.53.camel@edumazet-glaptop> (raw)
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);
next reply other threads:[~2013-05-15 21:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-15 21:41 Eric Dumazet [this message]
2013-05-15 22:55 ` [PATCH] bonding: allow TSO being set on bonding master 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1368654065.4519.53.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=fubar@us.ibm.com \
--cc=maze@google.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.com \
--cc=ycheng@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox