All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mahesh Bandewar (महेश बंडेवार)" <maheshb@google.com>
To: Ido Schimmel <idosch@idosch.org>
Cc: Jakub Kicinski <kuba@kernel.org>, David Ahern <dsahern@gmail.com>,
	Jian Yang <jianyang.kernel@gmail.com>,
	David Miller <davem@davemloft.net>,
	linux-netdev <netdev@vger.kernel.org>,
	Jian Yang <jianyang@google.com>,
	Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next] net-loopback: allow lo dev initial state to be controlled
Date: Tue, 17 Nov 2020 12:53:12 -0800	[thread overview]
Message-ID: <CAF2d9jhJq76KWaMGZLTTX4rLGvLDp+jLxCG9cTvv6jWZCtcFAA@mail.gmail.com> (raw)
In-Reply-To: <20201117171830.GA286718@shredder.lan>

On Tue, Nov 17, 2020 at 9:18 AM Ido Schimmel <idosch@idosch.org> wrote:
>
> On Mon, Nov 16, 2020 at 01:03:32PM -0800, Mahesh Bandewar (महेश बंडेवार) wrote:
> > On Mon, Nov 16, 2020 at 12:34 PM Jakub Kicinski <kuba@kernel.org> wrote:
> > >
> > > On Mon, 16 Nov 2020 12:02:48 -0800 Mahesh Bandewar (महेश बंडेवार) wrote:
> > > > > > diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
> > > > > > index a1c77cc00416..76dc92ac65a2 100644
> > > > > > --- a/drivers/net/loopback.c
> > > > > > +++ b/drivers/net/loopback.c
> > > > > > @@ -219,6 +219,13 @@ static __net_init int loopback_net_init(struct net *net)
> > > > > >
> > > > > >       BUG_ON(dev->ifindex != LOOPBACK_IFINDEX);
> > > > > >       net->loopback_dev = dev;
> > > > > > +
> > > > > > +     if (sysctl_netdev_loopback_state) {
> > > > > > +             /* Bring loopback device UP */
> > > > > > +             rtnl_lock();
> > > > > > +             dev_open(dev, NULL);
> > > > > > +             rtnl_unlock();
> > > > > > +     }
> > > > >
> > > > > The only concern I have here is that it breaks notification ordering.
> > > > > Is there precedent for NETDEV_UP to be generated before all pernet ops
> > > > > ->init was called?
> > > > I'm not sure if any and didn't see any issues in our usage / tests.
> > > > I'm not even sure anyone is watching/monitoring for lo status as such.
> > >
> > > Ido, David, how does this sound to you?
> > >
> > > I can't think of any particular case where bringing the device up (and
> > > populating it's addresses) before per netns init is finished could be
> > > problematic. But if this is going to make kernel coding harder the
> > > minor convenience of the knob is probably not worth it.
> >
> > +Eric Dumazet
> >
> > I'm not sure why kernel coding should get harder, but happy to listen
> > to the opinions.
>
> Hi,
>
> Sorry for the delay. Does not occur to me as a problematic change. I ran
> various tests with 'sysctl -qw net.core.netdev_loopback_state=1' and a
> debug config. Looks OK.

Thanks for the confirmation Ido. I think Jian is getting powerpc
config build fixed to address the build-bots findings and then he can
push the updated version.

  reply	other threads:[~2020-11-17 20:53 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11 20:43 [PATCH net-next] net-loopback: allow lo dev initial state to be controlled Jian Yang
2020-11-12 16:08 ` Andrew Lunn
2020-11-12 19:54   ` Dan Williams
2020-11-14 18:17 ` Jakub Kicinski
2020-11-16 20:02   ` Mahesh Bandewar (महेश बंडेवार)
2020-11-16 20:17     ` Jakub Kicinski
2020-11-16 20:50       ` Mahesh Bandewar (महेश बंडेवार)
2020-11-16 21:20         ` Jakub Kicinski
2020-11-16 21:42           ` Mahesh Bandewar (महेश बंडेवार)
2020-11-16 20:34     ` Jakub Kicinski
2020-11-16 21:03       ` Mahesh Bandewar (महेश बंडेवार)
2020-11-17 17:18         ` Ido Schimmel
2020-11-17 20:53           ` Mahesh Bandewar (महेश बंडेवार) [this message]
2020-11-18  1:12             ` David Ahern
2020-11-18 16:58               ` Nicolas Dichtel
2020-11-18 17:39                 ` Mahesh Bandewar (महेश बंडेवार)
2020-11-18 18:04                   ` David Ahern
2020-11-18 19:54                     ` Mahesh Bandewar (महेश बंडेवार)
2020-11-19  8:03                   ` Nicolas Dichtel
2020-11-20  3:55                     ` Mahesh Bandewar (महेश बंडेवार)
2020-11-20  4:56                       ` Jakub Kicinski
2020-12-01 20:24                         ` Mahesh Bandewar (महेश बंडेवार)
2020-12-02  2:38                           ` Jakub Kicinski
2020-12-02 20:53                             ` Mahesh Bandewar (महेश बंडेवार)
2020-11-17  4:50 ` kernel test robot
2020-11-17  4:50   ` kernel test robot

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=CAF2d9jhJq76KWaMGZLTTX4rLGvLDp+jLxCG9cTvv6jWZCtcFAA@mail.gmail.com \
    --to=maheshb@google.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=edumazet@google.com \
    --cc=idosch@idosch.org \
    --cc=jianyang.kernel@gmail.com \
    --cc=jianyang@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.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.