Subject: Re: [PATCH v5 net-next 02/12] net-shapers: implement NL get operation

From: Jakub Kicinski <[email-masked]>
Date: Fri, 30 Aug 2024 16:42:46 -0700

On Fri, 30 Aug 2024 11:39:00 -0700 Jakub Kicinski wrote:
> > There is a misunderstanding. This helper will be used in a following 
> > patch (7/12) with a different 'type' argument: 
> > NET_SHAPER_A_BINDING_IFINDEX. I've put a note in the commit message, but 
> > was unintentionally dropped in one of the recent refactors. I'll add 
> > that note back.  
> 
> What I'm saying is that if you want to prep the ground for more
> "binding" types you should also add:
> 
> 	if (type != ...IFINDEX) {
> 		/* other binding types are TBD */
> 		return -EINVAL;
> 	}

Ah, the part I missed is that there are two different types for ifindex:

NET_SHAPER_A_IFINDEX
NET_SHAPER_A_CAPABILITIES_IFINDEX

Got it now.