From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH net] failover: eliminate callback hell Date: Wed, 6 Jun 2018 15:25:16 -0700 Message-ID: <20180606152516.5edd5893@xeon-e3> References: <20180605034231.31610-1-sthemmin@microsoft.com> <20180606072512.GA2289@nanopsycho.orion> <20180606151955-mutt-send-email-mst@kernel.org> <20180606142447.3c5072d8@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "Michael S. Tsirkin" , Jiri Pirko , kys@microsoft.com, haiyangz@microsoft.com, davem@davemloft.net, netdev@vger.kernel.org, Stephen Hemminger To: "Samudrala, Sridhar" Return-path: Received: from mail-pl0-f66.google.com ([209.85.160.66]:38543 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752295AbeFFWZT (ORCPT ); Wed, 6 Jun 2018 18:25:19 -0400 Received: by mail-pl0-f66.google.com with SMTP id b14-v6so4690204pls.5 for ; Wed, 06 Jun 2018 15:25:19 -0700 (PDT) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Wed, 6 Jun 2018 14:54:04 -0700 "Samudrala, Sridhar" wrote: > On 6/6/2018 2:24 PM, Stephen Hemminger wrote: > > On Wed, 6 Jun 2018 15:30:27 +0300 > > "Michael S. Tsirkin" wrote: > > =20 > >> On Wed, Jun 06, 2018 at 09:25:12AM +0200, Jiri Pirko wrote: =20 > >>> Tue, Jun 05, 2018 at 05:42:31AM CEST, stephen@networkplumber.org wrot= e: =20 > >>>> The net failover should be a simple library, not a virtual > >>>> object with function callbacks (see callback hell). =20 > >>> Why just a library? It should do a common things. I think it should b= e a > >>> virtual object. Looks like your patch again splits the common > >>> functionality into multiple drivers. That is kind of backwards attitu= de. > >>> I don't get it. We should rather focus on fixing the mess the > >>> introduction of netvsc-bonding caused and switch netvsc to 3-netdev > >>> model. =20 > >> So it seems that at least one benefit for netvsc would be better > >> handling of renames. > >> > >> Question is how can this change to 3-netdev happen? Stephen is > >> concerned about risk of breaking some userspace. > >> > >> Stephen, this seems to be the usecase that IFF_HIDDEN was trying to > >> address, and you said then "why not use existing network namespaces > >> rather than inventing a new abstraction". So how about it then? Do you > >> want to find a way to use namespaces to hide the PV device for netvsc > >> compatibility? > >> =20 > > Netvsc can't work with 3 dev model. MS has worked with enough distro's = and > > startups that all demand eth0 always be present. And VF may come and go. > > After this history, there is a strong motivation not to change how kern= el > > behaves. Switching to 3 device model would be perceived as breaking > > existing userspace. =20 >=20 > I think it should be possible for netvsc to work with 3 dev model if the = only > requirement is that eth0 will always be present. With net_failover, you w= ill > see eth0 and eth0nsby OR with older distros eth0 and eth1.=C2=A0 It may b= e an issue > if somehow there is userspace requirement that there can be only 2 netdev= s, not 3 > when VF is plugged. >=20 > eth0 will be the net_failover device and eth0nsby/eth1 will be the netvsc= device > and the IP address gets configured on eth0. Will this be an issue? DPDK drivers in 18.05 depend on 2 device model. Yes it is a bit of mess but that is the way it is.