* Re: bonding (IEEE 802.3ad) not working with qemu/virtio [not found] ` <28285.1454103900@famine> @ 2016-01-29 21:48 ` Nikolay Aleksandrov [not found] ` <56ABDE2A.7010301@cumulusnetworks.com> 1 sibling, 0 replies; 7+ messages in thread From: Nikolay Aleksandrov @ 2016-01-29 21:48 UTC (permalink / raw) To: Jay Vosburgh Cc: Jiri Pirko, Michael S. Tsirkin, netdev, virtualization, Bjørnar Ness, Veaceslav Falico, Andy Gospodarek On 01/29/2016 10:45 PM, Jay Vosburgh wrote: > Nikolay Aleksandrov <nikolay@cumulusnetworks.com> wrote: > >> 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. > > Should virtio instead provide an arbitrary speed and full duplex > to ethtool, as veth does? > > Creating a magic whitelist of devices deep inside the 802.3ad > implementation seems less desirable. > TBH, I absolutely agree. In fact here's what we've been doing: add set_settings which allows the user to set any speed/duplex and get_settings of course to retrieve that. This is also useful for testing other stuff that requires speed and duplex, not only for the bonding case. I'll add the virtio_net maintainers to the discussion, see if it's okay with everyone and I'll move to send patches once net-next opens up. Thanks! > -J > > --- > -Jay Vosburgh, jay.vosburgh@canonical.com > _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <56ABDE2A.7010301@cumulusnetworks.com>]
* Re: bonding (IEEE 802.3ad) not working with qemu/virtio [not found] ` <56ABDE2A.7010301@cumulusnetworks.com> @ 2016-01-30 6:59 ` David Miller 2016-01-30 11:34 ` Jiri Pirko ` (3 more replies) 2016-01-31 14:58 ` Michael S. Tsirkin 1 sibling, 4 replies; 7+ messages in thread From: David Miller @ 2016-01-30 6:59 UTC (permalink / raw) To: nikolay Cc: jiri, mst, gospo, virtualization, bjornar.ness, vfalico, netdev, jay.vosburgh From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Date: Fri, 29 Jan 2016 22:48:26 +0100 > On 01/29/2016 10:45 PM, Jay Vosburgh wrote: >> Nikolay Aleksandrov <nikolay@cumulusnetworks.com> wrote: >> >>> 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. >> >> Should virtio instead provide an arbitrary speed and full duplex >> to ethtool, as veth does? >> >> Creating a magic whitelist of devices deep inside the 802.3ad >> implementation seems less desirable. >> > TBH, I absolutely agree. In fact here's what we've been doing: > add set_settings which allows the user to set any speed/duplex > and get_settings of course to retrieve that. This is also useful > for testing other stuff that requires speed and duplex, not only > for the bonding case. I also agree. Having a whitelist is just rediculous. There should be a default speed/duplex setting for such devices as well. We can pick one that will be use universally for these kinds of devices. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bonding (IEEE 802.3ad) not working with qemu/virtio 2016-01-30 6:59 ` David Miller @ 2016-01-30 11:34 ` Jiri Pirko 2016-01-30 11:41 ` Nikolay Aleksandrov ` (2 subsequent siblings) 3 siblings, 0 replies; 7+ messages in thread From: Jiri Pirko @ 2016-01-30 11:34 UTC (permalink / raw) To: David Miller Cc: mst, nikolay, gospo, virtualization, bjornar.ness, vfalico, netdev, jay.vosburgh Sat, Jan 30, 2016 at 07:59:24AM CET, davem@davemloft.net wrote: >From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> >Date: Fri, 29 Jan 2016 22:48:26 +0100 > >> On 01/29/2016 10:45 PM, Jay Vosburgh wrote: >>> Nikolay Aleksandrov <nikolay@cumulusnetworks.com> wrote: >>> >>>> 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. >>> >>> Should virtio instead provide an arbitrary speed and full duplex >>> to ethtool, as veth does? >>> >>> Creating a magic whitelist of devices deep inside the 802.3ad >>> implementation seems less desirable. >>> >> TBH, I absolutely agree. In fact here's what we've been doing: >> add set_settings which allows the user to set any speed/duplex >> and get_settings of course to retrieve that. This is also useful >> for testing other stuff that requires speed and duplex, not only >> for the bonding case. > >I also agree. Having a whitelist is just rediculous. > >There should be a default speed/duplex setting for such devices as well. >We can pick one that will be use universally for these kinds of devices. Exposing made up speed for veth and virtio_net sounds odd to me. User see 10000Mb/s but it makes no sense at all. It is just confusing. I believe this is bonding bug and should be fixed in there. Team works fine with virtio_net device and lacp runner. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bonding (IEEE 802.3ad) not working with qemu/virtio 2016-01-30 6:59 ` David Miller 2016-01-30 11:34 ` Jiri Pirko @ 2016-01-30 11:41 ` Nikolay Aleksandrov [not found] ` <56ACA15C.1080403@cumulusnetworks.com> 2016-02-01 18:49 ` Rick Jones 3 siblings, 0 replies; 7+ messages in thread From: Nikolay Aleksandrov @ 2016-01-30 11:41 UTC (permalink / raw) To: David Miller Cc: jiri, mst, gospo, virtualization, bjornar.ness, vfalico, netdev, jay.vosburgh On 01/30/2016 07:59 AM, David Miller wrote: > From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> > Date: Fri, 29 Jan 2016 22:48:26 +0100 > >> On 01/29/2016 10:45 PM, Jay Vosburgh wrote: >>> Nikolay Aleksandrov <nikolay@cumulusnetworks.com> wrote: >>> >>>> 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. >>> >>> Should virtio instead provide an arbitrary speed and full duplex >>> to ethtool, as veth does? >>> >>> Creating a magic whitelist of devices deep inside the 802.3ad >>> implementation seems less desirable. >>> >> TBH, I absolutely agree. In fact here's what we've been doing: >> add set_settings which allows the user to set any speed/duplex >> and get_settings of course to retrieve that. This is also useful >> for testing other stuff that requires speed and duplex, not only >> for the bonding case. > > I also agree. Having a whitelist is just rediculous. > > There should be a default speed/duplex setting for such devices as well. > We can pick one that will be use universally for these kinds of devices. > Yes, that's the other thing - the default setting, from a brief grepping I see that veth uses 10Gbps, tun uses 10Mbps and batman-adv uses 10Mbps. If we add a default get_settings that can be used by virtual devices in ethtool that returns 10Gbps with the settings set like veth does sounds good to me. What do you think ? In fact they all set the same settings (apart from speed) so we can consolidate them in a single default setting init function and for the ones using different speed do something like: __ethtool_init_settings(); <- sets everything like veth would with 10Mbps speed __ethtool_cmd_speed_set(cmd, SPEED_10000); And we're done. ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <56ACA15C.1080403@cumulusnetworks.com>]
* Re: bonding (IEEE 802.3ad) not working with qemu/virtio [not found] ` <56ACA15C.1080403@cumulusnetworks.com> @ 2016-01-31 14:50 ` Michael S. Tsirkin 0 siblings, 0 replies; 7+ messages in thread From: Michael S. Tsirkin @ 2016-01-31 14:50 UTC (permalink / raw) To: Nikolay Aleksandrov Cc: jiri, gospo, virtualization, bjornar.ness, vfalico, netdev, jay.vosburgh, David Miller On Sat, Jan 30, 2016 at 12:41:16PM +0100, Nikolay Aleksandrov wrote: > On 01/30/2016 07:59 AM, David Miller wrote: > > From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> > > Date: Fri, 29 Jan 2016 22:48:26 +0100 > > > >> On 01/29/2016 10:45 PM, Jay Vosburgh wrote: > >>> Nikolay Aleksandrov <nikolay@cumulusnetworks.com> wrote: > >>> > >>>> 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. > >>> > >>> Should virtio instead provide an arbitrary speed and full duplex > >>> to ethtool, as veth does? > >>> > >>> Creating a magic whitelist of devices deep inside the 802.3ad > >>> implementation seems less desirable. > >>> > >> TBH, I absolutely agree. In fact here's what we've been doing: > >> add set_settings which allows the user to set any speed/duplex > >> and get_settings of course to retrieve that. This is also useful > >> for testing other stuff that requires speed and duplex, not only > >> for the bonding case. > > > > I also agree. Having a whitelist is just rediculous. > > > > There should be a default speed/duplex setting for such devices as well. > > We can pick one that will be use universally for these kinds of devices. > > > Yes, that's the other thing - the default setting, from a brief grepping > I see that veth uses 10Gbps, tun uses 10Mbps and batman-adv uses 10Mbps. > > If we add a default get_settings that can be used by virtual devices > in ethtool that returns 10Gbps with the settings set like veth does > sounds good to me. What do you think ? > > In fact they all set the same settings (apart from speed) so we can > consolidate them in a single default setting init function and for the > ones using different speed do something like: > __ethtool_init_settings(); <- sets everything like veth would with 10Mbps speed > __ethtool_cmd_speed_set(cmd, SPEED_10000); > And we're done. > I think leaving speed alone would be preferable if possible. Faking speed might cause strange effects e.g. bonding prefering virtio over a real device unexpectedly. Also, wouldn't it break same link speed requirements? Same applies to duplex really. We could easily extend virtio with ability to pass speed/duplex info from host, but that's not always known to host and there are existing hypervisors, so we are still left with the question of what to do when this info is not available. Is virtio somehow special that we want LACP for it if duplex state and speed are unknown, but don't want it for other devices? If no, let's allow it for all such devices? --> bond_3ad: allow LACP when duplex is unknown Devices would sometimes set speed and duplex as unknown. It seem reasonable to allow LACP in this case. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> -- diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 4cbb8b2..92639ef 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c @@ -342,12 +342,12 @@ static u8 __get_duplex(struct port *port) if (slave->link == BOND_LINK_UP) { switch (slave->duplex) { case DUPLEX_FULL: + default: retval = 0x1; netdev_dbg(slave->bond->dev, "Port %d Received status full duplex update from adapter\n", port->actor_port_number); break; case DUPLEX_HALF: - default: retval = 0x0; netdev_dbg(slave->bond->dev, "Port %d Received status NOT full duplex update from adapter\n", port->actor_port_number); -- MST ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: bonding (IEEE 802.3ad) not working with qemu/virtio 2016-01-30 6:59 ` David Miller ` (2 preceding siblings ...) [not found] ` <56ACA15C.1080403@cumulusnetworks.com> @ 2016-02-01 18:49 ` Rick Jones 3 siblings, 0 replies; 7+ messages in thread From: Rick Jones @ 2016-02-01 18:49 UTC (permalink / raw) To: David Miller, nikolay Cc: jiri, mst, gospo, virtualization, bjornar.ness, vfalico, netdev, jay.vosburgh On 01/29/2016 10:59 PM, David Miller wrote: > There should be a default speed/duplex setting for such devices as well. > We can pick one that will be use universally for these kinds of devices. There is at least one monitoring tool - collectl - which gets a trifle upset when the actual speed through an interface is significantly greater than the reported link speed. I have to wonder how unique it is in that regard. Doesn't mean there can't be a default, but does suggest it should be rather high. rick jones ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bonding (IEEE 802.3ad) not working with qemu/virtio [not found] ` <56ABDE2A.7010301@cumulusnetworks.com> 2016-01-30 6:59 ` David Miller @ 2016-01-31 14:58 ` Michael S. Tsirkin 1 sibling, 0 replies; 7+ messages in thread From: Michael S. Tsirkin @ 2016-01-31 14:58 UTC (permalink / raw) To: Nikolay Aleksandrov Cc: Jiri Pirko, Andy Gospodarek, virtualization, Bjørnar Ness, Veaceslav Falico, netdev, Jay Vosburgh On Fri, Jan 29, 2016 at 10:48:26PM +0100, Nikolay Aleksandrov wrote: > On 01/29/2016 10:45 PM, Jay Vosburgh wrote: > > Nikolay Aleksandrov <nikolay@cumulusnetworks.com> wrote: > > > >> 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. > > > > Should virtio instead provide an arbitrary speed and full duplex > > to ethtool, as veth does? > > > > Creating a magic whitelist of devices deep inside the 802.3ad > > implementation seems less desirable. > > > TBH, I absolutely agree. In fact here's what we've been doing: > add set_settings which allows the user to set any speed/duplex > and get_settings of course to retrieve that. This is also useful > for testing other stuff that requires speed and duplex, not only > for the bonding case. This looks like a very reasonable thing to do: user might have knowledge of the actual speed through some side-channel. We might also propagate it to hypervisor in the future. And this sound useful even if bonding is changed to allow DUPLEX_UNKNOWN. So please post this patch. > I'll add the virtio_net maintainers to the discussion, see if it's > okay with everyone and I'll move to send patches once net-next opens up. > > Thanks! > > > > -J > > > > --- > > -Jay Vosburgh, jay.vosburgh@canonical.com > > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-02-01 18:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAJO99TmB3957Wq3Cse7azgBxKeZ2BV6QihoyAsjUjyvzc-V8dQ@mail.gmail.com>
[not found] ` <56ABDA3D.8040100@cumulusnetworks.com>
[not found] ` <28285.1454103900@famine>
2016-01-29 21:48 ` bonding (IEEE 802.3ad) not working with qemu/virtio Nikolay Aleksandrov
[not found] ` <56ABDE2A.7010301@cumulusnetworks.com>
2016-01-30 6:59 ` David Miller
2016-01-30 11:34 ` Jiri Pirko
2016-01-30 11:41 ` Nikolay Aleksandrov
[not found] ` <56ACA15C.1080403@cumulusnetworks.com>
2016-01-31 14:50 ` Michael S. Tsirkin
2016-02-01 18:49 ` Rick Jones
2016-01-31 14:58 ` Michael S. Tsirkin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).