Subject: Re: [PATCH net-next 1/2] net: page_pool: support dumping pps of a specific ifindex via Netlink

From: Jakub Kicinski <[email-masked]>
Date: Thu, 19 Mar 2026 13:18:43 -0700

On Thu, 19 Mar 2026 20:56:46 +0100 Maxime Chevallier wrote:
> >  	for_each_netdev_dump(net, netdev, state->ifindex) {
> > +		/* Either the provided ifindex doesn't exist or done dumping */
> > +		if (ifindex_attr &&
> > +		    netdev->ifindex != nla_get_u32(ifindex_attr))
> > +			break;  
> 
> If the passed ifindex doesn't exist, isn't netdev NULL here ?

The for_each will give us the next netdev after or not enter the loop
at all. (the selftest in patch 2 does cover this case FWIW)