From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH net] failover: eliminate callback hell Date: Thu, 7 Jun 2018 08:23:12 -0700 Message-ID: <20180607082312.7784b0fa@xeon-e3> References: <20180605034231.31610-1-sthemmin@microsoft.com> <20180606072512.GA2289@nanopsycho.orion> <20180606151955-mutt-send-email-mst@kernel.org> <20180606142447.3c5072d8@xeon-e3> <20180607003407-mutt-send-email-mst@kernel.org> <20180606152408.30b9e833@xeon-e3> <20180607172244-mutt-send-email-mst@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Jiri Pirko , kys@microsoft.com, haiyangz@microsoft.com, davem@davemloft.net, sridhar.samudrala@intel.com, netdev@vger.kernel.org, Stephen Hemminger To: "Michael S. Tsirkin" Return-path: Received: from mail-pg0-f65.google.com ([74.125.83.65]:34647 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932836AbeFGPXQ (ORCPT ); Thu, 7 Jun 2018 11:23:16 -0400 Received: by mail-pg0-f65.google.com with SMTP id q4-v6so3860411pgr.1 for ; Thu, 07 Jun 2018 08:23:16 -0700 (PDT) In-Reply-To: <20180607172244-mutt-send-email-mst@kernel.org> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, 7 Jun 2018 17:57:50 +0300 "Michael S. Tsirkin" wrote: > On Wed, Jun 06, 2018 at 03:24:08PM -0700, Stephen Hemminger wrote: > > On Thu, 7 Jun 2018 00:47:52 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Wed, Jun 06, 2018 at 02:24:47PM -0700, Stephen Hemminger wrote: > > > > On Wed, 6 Jun 2018 15:30:27 +0300 > > > > "Michael S. Tsirkin" wrote: > > > > > > > > > On Wed, Jun 06, 2018 at 09:25:12AM +0200, Jiri Pirko wrote: > > > > > > Tue, Jun 05, 2018 at 05:42:31AM CEST, stephen@networkplumber.org wrote: > > > > > > >The net failover should be a simple library, not a virtual > > > > > > >object with function callbacks (see callback hell). > > > > > > > > > > > > Why just a library? It should do a common things. I think it should be a > > > > > > virtual object. Looks like your patch again splits the common > > > > > > functionality into multiple drivers. That is kind of backwards attitude. > > > > > > 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. > > > > > > > > > > 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? > > > > > > > > > > > > > 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. > > > > > > Well failover seems to maintain this invariant with the 3 dev model. > > > > > > > After this history, there is a strong motivation not to change how kernel > > > > behaves. Switching to 3 device model would be perceived as breaking > > > > existing userspace. > > > > > > I feel I'm misunderstood. I was asking whether a 3-rd device can be > > > hidden so that userspace does not know that you switched to a 3 device > > > model. It will think there are 2 devices and will keep working. > > > > > > If you do that, then there won't be anything that > > > would be perceived as breaking existing userspace, will there? > > > > DPDK now knows about the netvsc 2 device model and drivers in userspace > > depend on it. > > Interesting but I'm not sure how this answers the question. How would > DPDK care that there's a hidden device? If you can point out the > code in question, maybe a way can be found to make changes while > keeping it working. See http://dpdk.org/browse/dpdk/tree/drivers/net/vdev_netvsc/vdev_netvsc.c I am working to eliminate the necessity of this complex model in DPDK. Having a 3 device model inside DPDK has just as many problems as in the kernel.