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=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL 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 B2DD5C63697 for ; Tue, 17 Nov 2020 20:53:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 467E124181 for ; Tue, 17 Nov 2020 20:53:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="sS97j3IR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728251AbgKQUxa (ORCPT ); Tue, 17 Nov 2020 15:53:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726248AbgKQUxa (ORCPT ); Tue, 17 Nov 2020 15:53:30 -0500 Received: from mail-yb1-xb44.google.com (mail-yb1-xb44.google.com [IPv6:2607:f8b0:4864:20::b44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D045DC0613CF for ; Tue, 17 Nov 2020 12:53:29 -0800 (PST) Received: by mail-yb1-xb44.google.com with SMTP id d1so8029154ybr.10 for ; Tue, 17 Nov 2020 12:53:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=8g620uWHc3A5sIgDaR6PVvadzdPJ5gfNnsu6wh4Ljzo=; b=sS97j3IR6shgWceJl31mLuVvsUlbnKG+qtOtRPJrDqPt64B79XI3enfEVPE/ab9clS XKwkYHyUCp+kF+E187DjBdFzkP7yhjWstI1bKNjhqz3fS0uUHlWmruroliFAWTRFv3It HNqoS6CAhbsxjRFIRh48GYL+GaTXm4mxJ56DBCxFj6vtoPI/VxKP3a0yj3UUgs/1YqAh kRTHRxBZwIzX74NbL7SiPU47JP6LN5xVNvb9fg8nR1rHLrkeZ4W+iyDr/gLJr7wOrP1z hST/JbdTx9Ymg9JJF7DVMLtAE1arpecRyycrh7nQ00Vqw58dv78XALoIkfqcfjIgoCP0 VMAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=8g620uWHc3A5sIgDaR6PVvadzdPJ5gfNnsu6wh4Ljzo=; b=cYNyGQiaZb4FRNI3K9ongFkutvnTAma4jOYB+DvOnzLlg4DMGadq2Q2uSuymrBMx7F rpg+sZZtMAg9ZQH4sKLDpL0uiWICc6EDC9Bt5MvERXhaAxHnQtjY3FMfxM1XMqvOLXo3 f2vhMPXmz6WlwNL7UGbpPasTBrUaGZGgETGQPyjC0rxcvsipTIAHfLMcJ2oUD3Ox8s64 Iq1mmOOVOhwdENc6hgiJTz0l0hj7lC8EOsFTxgNe+deUdlxG2SHGNYc3UeqAhV21edEx r7g8/1b5DRmu/Wsk5WUyTUTG6dzn+7BgfvsNRAiYIe8ChSeJlwhsVNM2YFKPJjJ2Abvh m1Gg== X-Gm-Message-State: AOAM530lVpaCBoX8JYY/KL9AoCXIQM37+hS+NziXRrvDx4j01XcReG7o XvJaUJAu+fhnb/1CG7V2uAndk/iyBaatdDHRvLCXXA== X-Google-Smtp-Source: ABdhPJywkBnFQZMNL/N/Swbmj088EfNAfzwoiPCBeddyLSzj12wuoLaKjfTKrSGRGjbwXbDP17DGMZR7a9IG4df+ED0= X-Received: by 2002:a25:f816:: with SMTP id u22mr2144674ybd.505.1605646408684; Tue, 17 Nov 2020 12:53:28 -0800 (PST) MIME-Version: 1.0 References: <20201111204308.3352959-1-jianyang.kernel@gmail.com> <20201114101709.42ee19e0@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20201116123447.2be5a827@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20201117171830.GA286718@shredder.lan> In-Reply-To: <20201117171830.GA286718@shredder.lan> From: =?UTF-8?B?TWFoZXNoIEJhbmRld2FyICjgpK7gpLngpYfgpLYg4KSs4KSC4KSh4KWH4KS14KS+4KSwKQ==?= Date: Tue, 17 Nov 2020 12:53:12 -0800 Message-ID: Subject: Re: [PATCH net-next] net-loopback: allow lo dev initial state to be controlled To: Ido Schimmel Cc: Jakub Kicinski , David Ahern , Jian Yang , David Miller , linux-netdev , Jian Yang , Eric Dumazet Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Nov 17, 2020 at 9:18 AM Ido Schimmel wrote: > > On Mon, Nov 16, 2020 at 01:03:32PM -0800, Mahesh Bandewar (=E0=A4=AE=E0= =A4=B9=E0=A5=87=E0=A4=B6 =E0=A4=AC=E0=A4=82=E0=A4=A1=E0=A5=87=E0=A4=B5=E0= =A4=BE=E0=A4=B0) wrote: > > On Mon, Nov 16, 2020 at 12:34 PM Jakub Kicinski wrote= : > > > > > > On Mon, 16 Nov 2020 12:02:48 -0800 Mahesh Bandewar (=E0=A4=AE=E0=A4= =B9=E0=A5=87=E0=A4=B6 =E0=A4=AC=E0=A4=82=E0=A4=A1=E0=A5=87=E0=A4=B5=E0=A4= =BE=E0=A4=B0) 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(st= ruct net *net) > > > > > > > > > > > > BUG_ON(dev->ifindex !=3D LOOPBACK_IFINDEX); > > > > > > net->loopback_dev =3D 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 order= ing. > > > > > Is there precedent for NETDEV_UP to be generated before all perne= t 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 su= ch. > > > > > > Ido, David, how does this sound to you? > > > > > > I can't think of any particular case where bringing the device up (an= d > > > 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=3D1' 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.