Re: [PATCH net] failover: eliminate callback hell

From
Michael S. Tsirkin <mst@redhat.com>
Date
2018-06-07 14:57:51
Reply to
Stephen Hemminger, 2018-06-06
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" [off-list ref] wrote:
quoted
On Wed, Jun 06, 2018 at 02:24:47PM -0700, Stephen Hemminger wrote:
quoted
On Wed, 6 Jun 2018 15:30:27 +0300
"Michael S. Tsirkin" [off-list ref] wrote:
  
quoted
On Wed, Jun 06, 2018 at 09:25:12AM +0200, Jiri Pirko wrote:  
quoted
Tue, Jun 05, 2018 at 05:42:31AM CEST, stephen@networkplumber.org wrote:    
quoted
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.
quoted
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.
quoted
quoted
With virtio you can  work it out with the distro's yourself.
There is no pre-existing semantics to deal with.

For the virtio, I don't see the need for IFF_HIDDEN.
With 3-dev model as long as you mark the PV and VF devices
as slaves, then userspace knows to leave them alone. Assuming userspace
is already able to deal with team and bond devices.  
That's clear enough.
quoted
Any time you introduce new UAPI behavior something breaks.  
Not if we do it right.
quoted
On the rename front, I really don't care if VF can be renamed.  
OK that's nice.
quoted
And for
netvsc want to allow the PV device to be renamed.  
That's because of the 2 device model, right?  So that explains why even
if the delayed hack is good for the goose it might not be good for the
gander :)
You are bringing up the VF right away. How does the 3-device initialization
state machine work?  Do you give a window for udev to possibly rename the
VF? Do you rely on that?
quoted
quoted
Udev developers want that
but have not found a stable/persistent value to expose to userspace
to allow it.  
Thread (52 messages) 52 messages, 8 authors, last reply 2018-06-12
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help