From: Eric Dumazet <eric.dumazet@gmail.com>
To: "George B." <georgeb@gmail.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: Question about vlans, bonding, etc.
Date: Tue, 04 May 2010 06:48:26 +0200 [thread overview]
Message-ID: <1272948506.2407.174.camel@edumazet-laptop> (raw)
In-Reply-To: <i2tb65cae941005031706o19a6f1e9zc86b33d73462113f@mail.gmail.com>
Le lundi 03 mai 2010 à 17:06 -0700, George B. a écrit :
> Watching the "Receive issues with bonding and vlans" thread brought a
> question to mind. In what order should things be done for best
> performance?
>
> For example, say I have a pair of ethernet interfaces. Do I slave the
> ethernet interfaces to the bond device and then make the vlans on the
> bond devices?
> Or do I make the vlans on the ethernet devices and then bond the vlan
> interfaces?
>
> In the first case I would have:
>
>
>
> bond0.3--| |------eth0
> bond0
> bond0.5--| |------eth1
>
> The second case would be:
>
> |------------------eth0.5-----|
> | |-------eth0.3---eth0
> bond0 bond1
> | |-------eth1.3---eth1
> |------------------eth1.5-----|
>
> I am using he first method currently as it seemed more intuitive to me
> at the time to bond the ethernets and then put the vlans on the bonds
> but it seems life might be easier for the vlan driver if it is bound
> directly to the hardware. I am using Intel NICs (igb driver) with 4
> queues per NIC.
>
> Would there be a performance difference expected between the two
> configurations? Can the vlan driver "see through" the bond interface
> to the
> hardware and take advantage of multiple queues if the hardware
> supports it in the first configuration?
Unfortunatly, first combination is not multiqueue aware yet.
You'll need to patch bonding driver like this if your nics have 4
queues :
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 85e813c..98cc3c0 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4915,8 +4915,8 @@ int bond_create(struct net *net, const char *name)
rtnl_lock();
- bond_dev = alloc_netdev(sizeof(struct bonding), name ? name : "",
- bond_setup);
+ bond_dev = alloc_netdev_mq(sizeof(struct bonding), name ? name : "",
+ bond_setup, 4);
if (!bond_dev) {
pr_err("%s: eek! can't alloc netdev!\n", name);
rtnl_unlock();
next prev parent reply other threads:[~2010-05-04 4:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 0:06 Question about vlans, bonding, etc George B.
2010-05-04 4:48 ` Eric Dumazet [this message]
2010-05-14 1:10 ` George B.
2010-05-14 1:12 ` Stephen Hemminger
2010-05-14 7:28 ` George B.
2010-05-14 7:53 ` Benny Amorsen
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=1272948506.2407.174.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=georgeb@gmail.com \
--cc=netdev@vger.kernel.org \
/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