]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net_failover: delay taking over primary device to accommodate udevd renaming
authorSi-Wei Liu <si-wei.liu@oracle.com>
Thu, 17 Jan 2019 23:44:48 +0000 (18:44 -0500)
committerBrian Maly <brian.maly@oracle.com>
Tue, 12 Mar 2019 20:22:46 +0000 (16:22 -0400)
commit0922f5a05d500520f42ba6434be8cfdf370bb010
treead5188f332f95bcab7edc3add1d8c2a9295c6e85
parentebf7150f5a293290cb147e82c5de10da905a0eee
net_failover: delay taking over primary device to accommodate udevd renaming

There is an inherent race with udev rename in userspace due to the exposure
of two lower slave devices while kernel attempts to manage the creation
for failover bonding itself automatically. The existing userspace naming
logic in udevd was not specifically written for this in-kernel
automagic.

The clean fix for the problem is either to update the udevd to not try
rename the 3-netdev (ideally rename the device in a coordinated manner),
or to fix the kernel to hide the 2 lower devices which does not have to
be shown to userspace unless needed (1-netdev model).

However, our pursuance of 1-netdev model had not been acknowledged by
upstream, and there's no motivation in the systemd/udevd community at
this point to refactor the rename logic and make it work well with
3-netdev.

Hyper-V's netvsc mitigated this by postponing the VF's dev_open() to
allow a userspace thread to rename the device within a 100ms worth of
window. For the interim, we follow the same as done by netvsc to avoid
the renaming failure, until we move to the point where a clean solution
is available in upstream.

OraBug: 29281273

Signed-off-by: Si-Wei Liu <si-wei.liu@oracle.com>
Acked-by: John Haxby <john.haxby@oracle.com>
Reviewed-by: Vijay Balakrishna <vijay.balakrishna@oracle.com>
Tested-by: Vijay Balakrishna <vijay.balakrishna@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/net_failover.c
include/net/net_failover.h