From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
To: "Bjørnar Ness" <bjornar.ness@gmail.com>,
netdev <netdev@vger.kernel.org>,
"Veaceslav Falico" <vfalico@gmail.com>,
"Andy Gospodarek" <gospo@cumulusnetworks.com>,
"Jay Vosburgh" <j.vosburgh@gmail.com>,
"Jiri Pirko" <jiri@resnulli.us>
Subject: Re: bonding (IEEE 802.3ad) not working with qemu/virtio
Date: Fri, 29 Jan 2016 22:31:41 +0100 [thread overview]
Message-ID: <56ABDA3D.8040100@cumulusnetworks.com> (raw)
In-Reply-To: <CAJO99TmB3957Wq3Cse7azgBxKeZ2BV6QihoyAsjUjyvzc-V8dQ@mail.gmail.com>
On 01/25/2016 05:24 PM, Bjørnar Ness wrote:
> As subject says, 802.3ad bonding is not working with virtio network model.
>
> The only errors I see is:
>
> No 802.3ad response from the link partner for any adapters in the bond.
>
> Dumping the network traffic shows that no LACP packets are sent from the
> host running with virtio driver, changing to for example e1000 solves
> this problem
> with no configuration changes.
>
> Is this a known problem?
>
[Including bonding maintainers for comments]
Hi,
Here's a workaround patch for virtio_net devices that "cheats" the
duplex test (which is the actual problem). I've tested this locally
and it works for me.
I'd let the others comment on the implementation, there're other signs
that can be used to distinguish a virtio_net device so I'm open to suggestions.
Also feedback if this is at all acceptable would be appreciated.
Could you give it a try ?
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 4cbb8b27a891..0578a95e3ade 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -334,6 +334,7 @@ static u16 __get_link_speed(struct port *port)
static u8 __get_duplex(struct port *port)
{
struct slave *slave = port->slave;
+ const struct net_device *slave_dev = slave->dev;
u8 retval = 0x0;
/* handling a special case: when the configuration starts with
@@ -354,6 +355,15 @@ static u8 __get_duplex(struct port *port)
break;
}
}
+ if (!retval && slave_dev->dev.parent &&
+ !strcmp(dev_driver_string(slave_dev->dev.parent),
+ "virtio_net") &&
+ netif_carrier_ok(slave_dev)) {
+ netdev_dbg(slave->bond->dev, "port %d: activating virtio_net workaround\n",
+ port->actor_port_number);
+ retval = 1;
+ }
+
return retval;
}
next prev parent reply other threads:[~2016-01-29 21:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-25 16:24 bonding (IEEE 802.3ad) not working with qemu/virtio Bjørnar Ness
2016-01-28 13:33 ` Jiri Pirko
2016-01-28 13:53 ` Nikolay Aleksandrov
2016-01-28 14:10 ` Nikolay Aleksandrov
2016-01-29 21:31 ` Nikolay Aleksandrov [this message]
2016-01-29 21:45 ` Jay Vosburgh
2016-01-29 21:48 ` Nikolay Aleksandrov
2016-01-30 6:59 ` David Miller
2016-01-30 11:34 ` Jiri Pirko
2016-01-30 11:34 ` Jiri Pirko
2016-01-30 11:41 ` Nikolay Aleksandrov
2016-01-30 11:41 ` Nikolay Aleksandrov
2016-01-31 14:50 ` Michael S. Tsirkin
2016-01-31 14:50 ` Michael S. Tsirkin
2016-02-01 18:49 ` Rick Jones
2016-01-31 14:58 ` Michael S. Tsirkin
2016-01-29 21:48 ` Nikolay Aleksandrov
2016-01-31 14:35 ` Michael S. Tsirkin
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=56ABDA3D.8040100@cumulusnetworks.com \
--to=nikolay@cumulusnetworks.com \
--cc=bjornar.ness@gmail.com \
--cc=gospo@cumulusnetworks.com \
--cc=j.vosburgh@gmail.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=vfalico@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.