Jakub Kicinski
2019-Feb-28 00:52 UTC
[virtio-dev] Re: net_failover slave udev renaming (was Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework)
On Wed, 27 Feb 2019 19:41:32 -0500, Michael S. Tsirkin wrote:> > As this scheme adds much complexity to the kernel naming convention > > (currently it's just ethX names) that no userspace can understand. > > Anything that pokes at slaves needs to be specially designed anyway. > Naming seems like a minor issue.Can the users who care about the naming put net_failover into "user space will do the bond enslavement" mode, and do the bond creation/management themselves from user space (in systemd/ Network Manager) based on the failover flag?
Michael S. Tsirkin
2019-Feb-28 01:26 UTC
[virtio-dev] Re: net_failover slave udev renaming (was Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework)
On Wed, Feb 27, 2019 at 04:52:05PM -0800, Jakub Kicinski wrote:> On Wed, 27 Feb 2019 19:41:32 -0500, Michael S. Tsirkin wrote: > > > As this scheme adds much complexity to the kernel naming convention > > > (currently it's just ethX names) that no userspace can understand. > > > > Anything that pokes at slaves needs to be specially designed anyway. > > Naming seems like a minor issue. > > Can the users who care about the naming put net_failover into > "user space will do the bond enslavement" mode, and do the bond > creation/management themselves from user space (in systemd/ > Network Manager) based on the failover flag?Putting issues of compatibility aside (userspace tends to be confused if you give it two devices with same MAC), how would you have it work in practice? Timer based hacks like netvsc where if userspace didn't respond within X seconds we assume it won't and do everything ourselves? -- MST
Jakub Kicinski
2019-Feb-28 01:52 UTC
[virtio-dev] Re: net_failover slave udev renaming (was Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework)
On Wed, 27 Feb 2019 20:26:02 -0500, Michael S. Tsirkin wrote:> On Wed, Feb 27, 2019 at 04:52:05PM -0800, Jakub Kicinski wrote: > > On Wed, 27 Feb 2019 19:41:32 -0500, Michael S. Tsirkin wrote: > > > > As this scheme adds much complexity to the kernel naming convention > > > > (currently it's just ethX names) that no userspace can understand. > > > > > > Anything that pokes at slaves needs to be specially designed anyway. > > > Naming seems like a minor issue. > > > > Can the users who care about the naming put net_failover into > > "user space will do the bond enslavement" mode, and do the bond > > creation/management themselves from user space (in systemd/ > > Network Manager) based on the failover flag? > > Putting issues of compatibility aside (userspace tends to be confused if > you give it two devices with same MAC), how would you have it work in > practice? Timer based hacks like netvsc where if userspace didn't > respond within X seconds we assume it won't and do everything ourselves?Well, what I'm saying is basically if user space knows how to deal with the auto-bonding, we can put aside net_failover for the most part. It can either be blacklisted or it can have some knob which will effectively disable the auto-enslavement. Auto-bonding capable user space can do the renames, spawn the bond, etc. all by itself. I'm basically going back to my initial proposal here :) There is a RedHat bugzilla for the NetworkManager team to do this, but we merged net_failover before those folks got around to implementing it. IOW if NM/systemd is capable of doing the auto-bonding itself it can disable the kernel mechanism and take care of it all. If kernel is booted with an old user space which doesn't have capable NM/systemd - net_failover will kick in and do its best.