From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [RFC PATCH net-next] failover: allow name change on IFF_UP slave interfaces Date: Tue, 5 Mar 2019 19:06:35 -0500 Message-ID: <20190305190325-mutt-send-email-mst@kernel.org> References: <1551747059-11831-1-git-send-email-si-wei.liu@oracle.com> <20190304213032-mutt-send-email-mst@kernel.org> <20190305112427.1a23822e@shemminger-XPS-13-9360> <9448ae8f-c4e0-58a4-ff46-2f2951113d1e@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <9448ae8f-c4e0-58a4-ff46-2f2951113d1e@oracle.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: si-wei liu Cc: Jiri Pirko , Jakub Kicinski , Sridhar Samudrala , virtualization@lists.linux-foundation.org, liran.alon@oracle.com, Netdev , boris.ostrovsky@oracle.com, David Miller List-Id: virtualization@lists.linuxfoundation.org On Tue, Mar 05, 2019 at 11:35:50AM -0800, si-wei liu wrote: > > > On 3/5/2019 11:24 AM, Stephen Hemminger wrote: > > On Tue, 5 Mar 2019 11:19:32 -0800 > > si-wei liu wrote: > > > > > > I have a vague idea: would it work to *not* set > > > > IFF_UP on slave devices at all? > > > Hmm, I ever thought about this option, and it appears this solution is > > > more invasive than required to convert existing scripts, despite the > > > controversy of introducing internal netdev state to differentiate user > > > visible state. Either we disallow slave to be brought up by user, or to > > > not set IFF_UP flag but instead use the internal one, could end up with > > > substantial behavioral change that breaks scripts. Consider any admin > > > script that does `ip link set dev ... up' successfully just assumes the > > > link is up and subsequent operation can be done as usual. How would it work when carrier is off? > While it *may* > > > work for dracut (yet to be verified), I'm a bit concerned that there are > > > more scripts to be converted than those that don't follow volatile > > > failover slave names. It's technically doable, but may not worth the > > > effort (in terms of porting existing scripts/apps). > > > > > > Thanks > > > -Siwei > > Won't work for most devices. Many devices turn off PHY and link layer > > if not IFF_UP > True, that's what I said about introducing internal state for those driver > and other kernel component. Very invasive change indeed. > > -Siwei Well I did say it's vague. How about hiding IFF_UP from dev_get_flags (and probably __dev_change_flags)?