Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1969692pxk; Mon, 14 Sep 2020 00:43:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeTjS4YKFOcP4F+ROG3Ny155bQ0vmasyzDCyKJ5rAdgxVbnpTJZFKjJBKR3p6kN1McBjDo X-Received: by 2002:a17:906:288d:: with SMTP id o13mr13830488ejd.195.1600069413232; Mon, 14 Sep 2020 00:43:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600069413; cv=none; d=google.com; s=arc-20160816; b=X4nHxHiJSYA+kpFGym5ZS1meMyubvOCFTOIfKAMZl4uOJNBolgdnyFatw7+DCR9zEB 8BGhU0HcWzX2p+2cwiOQ3dBV59tWAbeTtQ29BlbdPzgtoIExtZalyrrcE/iDwFP5igBY ys2PZuHFIsNiZqNSauXslLx2AA1Qg5w8j3CIYc6G+q14CW5/2zJzPC2gTgzcjzonbEMd soO5qTjo8pJr1FwmSBYgekD8HSdhxwIvdqkytnPwm3NR73xKi4ON4GplmgybsPVYLxGF 3rVobvX4+VhdB/rt3SGM51Otgj7xSGxkNPMrIOgW00ufA+b1qAWyxlw/HdlTrkr2PQUQ Nugg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=9OcnKlqgAuX3lmvtPjQSY28ozZnq3T65wzBJcbrmz6o=; b=bNij09W44WNdblfW7DZVHaFnY/CxZu6s37jUiOwk35nyR4z1GrXb33zMGC15pg5J2K ZBN+596FGtoCc/rwDY24xnTJMmvIqIa3xcj2LQhl4qbwu9GUs11oXc7KsEEauoMUTlrQ LlLZMCsHwrzGePK9tenwTThKSUpTQyL6uK8H43qAE5BNY0xjEVWbIZnb+FDwO/WrMW1H 2vRFeHtMcToP5TgF4pcWoRHItrbeelUbucE/V+hn/6F9wU14oYfFbwSz2KXFj462Ki40 10wT8JfxDVQYOmfK/12q4R0xf5t7eocKPwixSm3h6zqdyvC3DAF/wxEhUOgU9HRO+Dif oRiQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp9si6494638ejc.203.2020.09.14.00.43.10; Mon, 14 Sep 2020 00:43:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726106AbgINHkm (ORCPT + 99 others); Mon, 14 Sep 2020 03:40:42 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:38538 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725971AbgINHkZ (ORCPT ); Mon, 14 Sep 2020 03:40:25 -0400 Received: by mail-oi1-f196.google.com with SMTP id y6so16893245oie.5; Mon, 14 Sep 2020 00:40:24 -0700 (PDT) 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; bh=9OcnKlqgAuX3lmvtPjQSY28ozZnq3T65wzBJcbrmz6o=; b=ZLQ8zYfHQJNoKuG+aRZ1H9nnh9a4xDHfqXoJD6QYkDtGc6C8hdiq5hfp0fGNJwzMw+ H1jQzpooQU23mgfHnzcnCcvQZvf3dbmlI5SfBjbLFIhFXh+WBqbUopKYRAwahnrQPvzy VvBfdP4Sc91YRnuIdb4UYpeJy1lmVIcIghG4fhO3yA32SEqMB4PwRzoZvonwHr/3Oegb cAczL01U9gCOabRrv4EPKDNu5LQJuRwn0remRHdtJOK2hrT5+lKbQsXi61s3zt4oHoCC G8Baniz9N6djPruhuaTAWACHKI5IVNZAlzUObe3yt+qLhDG7zswAw/UmOCBVkuIutzzJ ySSw== X-Gm-Message-State: AOAM531x/T1J2g5du09T9lt+RnSSN3fKqCCksE3xypXltREwvPJV99Nc Uzk/MIoXsGPY0moM76cRBYFuNbq3T3kAtCplCpE= X-Received: by 2002:aca:52d6:: with SMTP id g205mr8014808oib.54.1600069223913; Mon, 14 Sep 2020 00:40:23 -0700 (PDT) MIME-Version: 1.0 References: <20200911.174400.306709791543819081.davem@davemloft.net> <20200912.183437.1205152743307947529.davem@davemloft.net> In-Reply-To: <20200912.183437.1205152743307947529.davem@davemloft.net> From: Geert Uytterhoeven Date: Mon, 14 Sep 2020 09:40:12 +0200 Message-ID: Subject: Re: [PATCH] Revert "net: linkwatch: add check for netdevice being present to linkwatch_do_dev" To: David Miller Cc: Heiner Kallweit , Florian Fainelli , Andrew Lunn , Jakub Kicinski , Gaku Inami , Yoshihiro Shimoda , netdev , Linux Kernel Mailing List , Roopa Prabhu , Nikolay Aleksandrov , bridge@lists.linux-foundation.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, CC bridge On Sun, Sep 13, 2020 at 3:34 AM David Miller wrote: > From: Geert Uytterhoeven > Date: Sat, 12 Sep 2020 14:33:59 +0200 > > > "dev" is not the bridge device, but the physical Ethernet interface, which > > may already be suspended during s2ram. > > Hmmm, ok. > > Looking more deeply NETDEV_CHANGE causes br_port_carrier_check() to run which > exits early if netif_running() is false, which is going to be true if > netif_device_present() is false: > > *notified = false; > if (!netif_running(br->dev)) > return; > > The only other work the bridge notifier does is: > > if (event != NETDEV_UNREGISTER) > br_vlan_port_event(p, event); > > and: > > /* Events that may cause spanning tree to refresh */ > if (!notified && (event == NETDEV_CHANGEADDR || event == NETDEV_UP || > event == NETDEV_CHANGE || event == NETDEV_DOWN)) > br_ifinfo_notify(RTM_NEWLINK, NULL, p); > > So some vlan stuff, and emitting a netlink message to any available > listeners. > > Should we really do all of this for a device which is not even > present? > > This whole situation seems completely illogical. The device is > useless, it logically has no link or other state that can be managed > or used, while it is not present. > > So all of these bridge operations should only happen when the device > transitions back to present again. Thanks for your analysis! I'd like to defer this to the bridge people (CC). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds