From: "Michael S. Tsirkin" <mst@redhat.com>
To: si-wei liu <si-wei.liu@oracle.com>
Cc: Jiri Pirko <jiri@resnulli.us>, Jakub Kicinski <kubakici@wp.pl>,
Sridhar Samudrala <sridhar.samudrala@intel.com>,
virtualization@lists.linux-foundation.org, liran.alon@oracle.com,
Netdev <netdev@vger.kernel.org>,
boris.ostrovsky@oracle.com, David Miller <davem@davemloft.net>
Subject: Re: [RFC PATCH net-next] failover: allow name change on IFF_UP slave interfaces
Date: Wed, 6 Mar 2019 01:43:18 -0500 [thread overview]
Message-ID: <20190306013255-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <fde572b3-e342-b37f-0e3d-e16599f1ee81@oracle.com>
On Tue, Mar 05, 2019 at 04:51:00PM -0800, si-wei liu wrote:
>
>
> On 3/5/2019 4:36 PM, Michael S. Tsirkin wrote:
> > On Tue, Mar 05, 2019 at 04:20:50PM -0800, si-wei liu wrote:
> > >
> > > On 3/5/2019 4:06 PM, Michael S. Tsirkin wrote:
> > > > 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 <si-wei.liu@oracle.com> 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)?
> > > >
> > > Any different? This has small footprint for the kernel change for sure,
> > > while the discrepancy is still there. Anyone who writes code for IFF_UP will
> > > not notice IFF_FAILOVER_SLAVE.
> > >
> > > Not to mention more userspace "fixup" work has to be done due to this
> > > change.
> > >
> > > -Siwei
> > >
> > >
> > Point is it's ok since most userspace should just ignore slaves
> > - hopefully it will just ignore it since it already
> > ignores interfaces that are down.
> Admin script thought the interface could be bright up and do further
> operations without checking the UP flag.
These scripts then would be broken on any box with multiple interfaces
since not all of these would have carrier.
> It doesn't look to be a reliable
> way of prohibit userspace from operating against slaves.
>
> -Siwei
>
>
This does not mean we shouldn't make an effort to disable broken
configurations.
I am not arguing against your patch. Not at all. I see better
hiding of slaves as a separate enhancement.
Acked-by: Michael S. Tsirkin <mst@redhat.com>
--
MST
WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: si-wei liu <si-wei.liu@oracle.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Sridhar Samudrala <sridhar.samudrala@intel.com>,
Jakub Kicinski <kubakici@wp.pl>, Jiri Pirko <jiri@resnulli.us>,
David Miller <davem@davemloft.net>,
Netdev <netdev@vger.kernel.org>,
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
Date: Wed, 6 Mar 2019 01:43:18 -0500 [thread overview]
Message-ID: <20190306013255-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <fde572b3-e342-b37f-0e3d-e16599f1ee81@oracle.com>
On Tue, Mar 05, 2019 at 04:51:00PM -0800, si-wei liu wrote:
>
>
> On 3/5/2019 4:36 PM, Michael S. Tsirkin wrote:
> > On Tue, Mar 05, 2019 at 04:20:50PM -0800, si-wei liu wrote:
> > >
> > > On 3/5/2019 4:06 PM, Michael S. Tsirkin wrote:
> > > > 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 <si-wei.liu@oracle.com> 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)?
> > > >
> > > Any different? This has small footprint for the kernel change for sure,
> > > while the discrepancy is still there. Anyone who writes code for IFF_UP will
> > > not notice IFF_FAILOVER_SLAVE.
> > >
> > > Not to mention more userspace "fixup" work has to be done due to this
> > > change.
> > >
> > > -Siwei
> > >
> > >
> > Point is it's ok since most userspace should just ignore slaves
> > - hopefully it will just ignore it since it already
> > ignores interfaces that are down.
> Admin script thought the interface could be bright up and do further
> operations without checking the UP flag.
These scripts then would be broken on any box with multiple interfaces
since not all of these would have carrier.
> It doesn't look to be a reliable
> way of prohibit userspace from operating against slaves.
>
> -Siwei
>
>
This does not mean we shouldn't make an effort to disable broken
configurations.
I am not arguing against your patch. Not at all. I see better
hiding of slaves as a separate enhancement.
Acked-by: Michael S. Tsirkin <mst@redhat.com>
--
MST
next prev parent reply other threads:[~2019-03-06 6:43 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-05 0:50 [RFC PATCH net-next] failover: allow name change on IFF_UP slave interfaces Si-Wei Liu
2019-03-05 2:33 ` Michael S. Tsirkin
2019-03-05 2:33 ` Michael S. Tsirkin
2019-03-05 19:19 ` si-wei liu
2019-03-05 19:24 ` Stephen Hemminger
2019-03-05 19:24 ` Stephen Hemminger
2019-03-05 19:35 ` si-wei liu
2019-03-06 0:06 ` Michael S. Tsirkin
2019-03-06 0:06 ` Michael S. Tsirkin
2019-03-06 0:20 ` si-wei liu
2019-03-06 0:36 ` Michael S. Tsirkin
2019-03-06 0:36 ` Michael S. Tsirkin
2019-03-06 0:51 ` si-wei liu
2019-03-06 6:43 ` Michael S. Tsirkin [this message]
2019-03-06 6:43 ` Michael S. Tsirkin
2019-03-06 7:15 ` si-wei liu
2019-03-06 7:23 ` Michael S. Tsirkin
2019-03-06 7:23 ` Michael S. Tsirkin
2019-03-06 8:20 ` si-wei liu
2019-03-05 20:28 ` Michael S. Tsirkin
2019-03-05 22:49 ` si-wei liu
2019-03-05 20:28 ` Michael S. Tsirkin
2019-03-06 12:04 ` Jiri Pirko
[not found] ` <7d1e79f6-01ff-413d-dac0-ee34258aafec@oracle.com>
2019-03-06 21:36 ` Samudrala, Sridhar
[not found] ` <7bc9dc90-6597-4223-c192-55a314ff079f@oracle.com>
2019-03-06 23:36 ` Liran Alon
2019-03-06 23:36 ` Liran Alon
2019-03-06 12:04 ` Jiri Pirko
-- strict thread matches above, loose matches on Subject: below --
2019-03-05 0:36 Si-Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190306013255-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=boris.ostrovsky@oracle.com \
--cc=davem@davemloft.net \
--cc=jiri@resnulli.us \
--cc=kubakici@wp.pl \
--cc=liran.alon@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=si-wei.liu@oracle.com \
--cc=sridhar.samudrala@intel.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.