Thread (12 messages) flat view 12 messages, 5 authors, 3d ago

Re: [PATCH net-next v2 2/3] netdev: avoid skipping objects on race with device disappearance

From: Hangbin Liu <hidden>
Date: 2026-09-02 01:42:16

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:
quoted
quoted
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help