From: Stephen Hemminger <stephen@networkplumber.org>
To: Sabrina Dubroca <sd@queasysnail.net>
Cc: netdev@vger.kernel.org,
Nicolas Dichtel <nicolas.dichtel@6wind.com>,
Marek Lindner <mareklindner@neomailbox.ch>,
Simon Wunderlich <sw@simonwunderlich.de>,
Antonio Quartulli <a@unstable.cc>,
Sven Eckelmann <sven@narfation.org>,
b.a.t.m.a.n@lists.open-mesh.org, Roopa Prabhu <roopa@nvidia.com>,
Nikolay Aleksandrov <nikolay@nvidia.com>
Subject: Re: [PATCH net 00/12] net: iflink and link-netnsid fixes
Date: Thu, 1 Oct 2020 14:25:38 -0700 [thread overview]
Message-ID: <20201001142538.03f28397@hermes.local> (raw)
In-Reply-To: <cover.1600770261.git.sd@queasysnail.net>
On Thu, 1 Oct 2020 09:59:24 +0200
Sabrina Dubroca <sd@queasysnail.net> wrote:
> In a lot of places, we use this kind of comparison to detect if a
> device has a lower link:
>
> dev->ifindex != dev_get_iflink(dev)
Since this is a common operation, it would be good to add a new
helper function in netdevice.h
In your patch set, you are copying the same code snippet which
seems to indicate that it should be a helper.
Something like:
static inline bool netdev_has_link(const struct net_device *dev)
{
const struct net_device_ops *ops = dev->netdev_ops;
return ops && ops->ndo_get_iflink;
}
next prev parent reply other threads:[~2020-10-01 21:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-01 7:59 [PATCH net 00/12] net: iflink and link-netnsid fixes Sabrina Dubroca
2020-10-01 7:59 ` [PATCH net 01/12] ipvlan: add get_link_net Sabrina Dubroca
2020-10-01 8:19 ` Eric Dumazet
2020-10-01 7:59 ` [PATCH net 02/12] geneve: " Sabrina Dubroca
2020-10-01 7:59 ` [PATCH net 03/12] Revert "rtnetlink: always put IFLA_LINK for links with a link-netnsid" Sabrina Dubroca
2020-10-01 7:59 ` [PATCH net 04/12] rtnetlink: always put IFLA_LINK for links with ndo_get_iflink Sabrina Dubroca
2020-10-01 7:59 ` [PATCH net 05/12] bridge: always put IFLA_LINK for ports " Sabrina Dubroca
2020-10-01 7:59 ` [PATCH net 06/12] bridge: advertise IFLA_LINK_NETNSID when dumping bridge ports Sabrina Dubroca
2020-10-01 7:59 ` [PATCH net 07/12] ipv6: always put IFLA_LINK for devices with ndo_get_iflink Sabrina Dubroca
2020-10-01 7:59 ` [PATCH net 08/12] ipv6: advertise IFLA_LINK_NETNSID when dumping ipv6 addresses Sabrina Dubroca
2020-10-01 15:58 ` Nicolas Dichtel
2020-10-02 9:03 ` Sabrina Dubroca
2020-10-05 15:16 ` Nicolas Dichtel
2020-10-01 7:59 ` [PATCH net 09/12] net: link_watch: fix operstate when the link has the same index as the device Sabrina Dubroca
2020-10-01 11:00 ` Taehee Yoo
2020-10-01 7:59 ` [PATCH net 10/12] net: link_watch: fix detection of urgent events Sabrina Dubroca
2020-10-01 7:59 ` [PATCH net 11/12] batman-adv: fix iflink detection in batadv_is_on_batman_iface Sabrina Dubroca
2022-05-14 10:21 ` Sven Eckelmann
2020-10-01 7:59 ` [PATCH net 12/12] batman-adv: fix detection of lower link in batadv_get_real_netdevice Sabrina Dubroca
2020-10-01 21:25 ` Stephen Hemminger [this message]
2020-10-02 9:07 ` [PATCH net 00/12] net: iflink and link-netnsid fixes Sabrina Dubroca
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=20201001142538.03f28397@hermes.local \
--to=stephen@networkplumber.org \
--cc=a@unstable.cc \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=mareklindner@neomailbox.ch \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=nikolay@nvidia.com \
--cc=roopa@nvidia.com \
--cc=sd@queasysnail.net \
--cc=sven@narfation.org \
--cc=sw@simonwunderlich.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).