From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8527CC43381 for ; Wed, 6 Mar 2019 00:06:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5D33420675 for ; Wed, 6 Mar 2019 00:06:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728675AbfCFAGl (ORCPT ); Tue, 5 Mar 2019 19:06:41 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:37001 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727591AbfCFAGk (ORCPT ); Tue, 5 Mar 2019 19:06:40 -0500 Received: by mail-qt1-f193.google.com with SMTP id a48so10959758qtb.4 for ; Tue, 05 Mar 2019 16:06:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=LHqfh2CTz0VOiyZIb11PHiHOxZcWTJEG0HNsNM2mUtM=; b=uTkR3fwBbYf/PyShvUC7Y2qol46gkZh1DOeJi4ut+DfQtllheDaXZbCjNTqM4za7So CEM1oFJ/Jsz3Pd3BcS2kjkID5zWdIyo3zZOf6FpxE8pAgArgzyi1fAmdZsbwaIDap4mV BuxXrQTouOz2SYXJ7y/KZKWHJzk4wcbjiABwwLB4bromdcVSyE9gwFVzShHNewgHUuhQ p3Q9gpznToL/mi+A2WSCsxvC5ivmw2cnQTkP96HbhdYtE9oYhUB+Q/IlO9n5Ncpgv7um 5jG3l0xbrFCMVNfg1cjccJI0GXSw0KoBsALLV+TAj4y1ZmL6jAK51GYV8dwQ83zQfbwj UvjA== X-Gm-Message-State: APjAAAVcBTRjPKYKUVw5B6WszAbyOnbtVq19/0X0M2so5UIFDR2gCq8U l7oBwYtGxW3V9ORbdjsCfNQEUg== X-Google-Smtp-Source: APXvYqyQqf5w9CtCtX65a7Osl4JZDjXdvNugrKpndMtsCfxfvAJAJO0tnEI6ObGlErBxqiZqzTgz4g== X-Received: by 2002:ac8:327b:: with SMTP id y56mr3612291qta.79.1551830799496; Tue, 05 Mar 2019 16:06:39 -0800 (PST) Received: from redhat.com (107-1-126-142-ip-static.hfc.comcastbusiness.net. [107.1.126.142]) by smtp.gmail.com with ESMTPSA id u25sm54383qkj.96.2019.03.05.16.06.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Mar 2019 16:06:38 -0800 (PST) Date: Tue, 5 Mar 2019 19:06:35 -0500 From: "Michael S. Tsirkin" To: si-wei liu Cc: Stephen Hemminger , Sridhar Samudrala , Jakub Kicinski , Jiri Pirko , David Miller , Netdev , virtualization@lists.linux-foundation.org, liran.alon@oracle.com, boris.ostrovsky@oracle.com, vijay.balakrishna@oracle.com Subject: Re: [RFC PATCH net-next] failover: allow name change on IFF_UP slave interfaces 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-Disposition: inline In-Reply-To: <9448ae8f-c4e0-58a4-ff46-2f2951113d1e@oracle.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.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)?