From: Hangbin Liu <hangbin.liu@linux.dev>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
daniel@iogearbox.net, razor@blackwall.org,
bobbyeshleman@meta.com, sdf@fomichev.me
Subject: Re: [PATCH net-next v2 2/3] netdev: avoid skipping objects on race with device disappearance
Date: Wed, 2 Sep 2026 09:42:00 +0800 [thread overview]
Message-ID: <apd-6C1lJDI0ZVNI@fedora> (raw)
In-Reply-To: <20260901080234.522d1921@kernel.org>
On Tue, Sep 01, 2026 at 08:02:34AM -0700, Jakub Kicinski wrote:
> On Tue, 1 Sep 2026 17:15:14 +0800 Hangbin Liu wrote:
> > > @@ -312,11 +312,14 @@ int netdev_nl_napi_get_dumpit(struct sk_buff *skb, struct netlink_callback *cb)
> > > err = -ENODEV;
> > > }
> > > } else {
> > > + unsigned long start_ifindex = ctx->ifindex;
> >
> > The NETDEV_A_QUEUE_IFINDEX policy is u32. And all ifindex getting/setting
> > in 6b6171db7fc8 ("netdev-genl: Add netlink framework functions for queue")
> > is u32. Why the ifindex is defined to unsigned long?
>
> Off the top of my head - because it's am xarray iterator
Oh, thanks for the info. I find it.
#define for_each_netdev_dump(net, d, ifindex) \
for (; (d = xa_find(&(net)->dev_by_index, &ifindex, \
ULONG_MAX, XA_PRESENT)); ifindex++)
Thanks
Hangbin
next prev parent reply other threads:[~2026-09-02 1:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 16:41 [PATCH net-next v2 0/3] netdev: address a handful of nit picks Jakub Kicinski
2026-08-31 16:41 ` [PATCH net-next v2 1/3] netdev: correct error code in netdev_nl_queue_fill_lease() Jakub Kicinski
2026-09-01 6:58 ` Nikolay Aleksandrov
2026-08-31 16:41 ` [PATCH net-next v2 2/3] netdev: avoid skipping objects on race with device disappearance Jakub Kicinski
2026-09-01 6:58 ` Nikolay Aleksandrov
2026-09-01 9:15 ` Hangbin Liu
2026-09-01 15:02 ` Jakub Kicinski
2026-09-02 1:42 ` Hangbin Liu [this message]
2026-09-02 19:43 ` [net-next,v2,2/3] " netdev-bot+sashiko
2026-08-31 16:41 ` [PATCH net-next v2 3/3] netdev: don't use dev->flags for IFF_UP Jakub Kicinski
2026-09-01 6:59 ` Nikolay Aleksandrov
2026-09-03 2:20 ` [PATCH net-next v2 0/3] netdev: address a handful of nit picks patchwork-bot+netdevbpf
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=apd-6C1lJDI0ZVNI@fedora \
--to=hangbin.liu@linux.dev \
--cc=andrew+netdev@lunn.ch \
--cc=bobbyeshleman@meta.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
--cc=sdf@fomichev.me \
/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).