Re: [PATCH net-next V5 07/11] devlink: Extend devlink rate API with traffic classes bandwidth management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 9 Dec 2024 23:03:04 +0200 Tariq Toukan wrote:
> >> +	tc_index = nla_get_u8(tb[DEVLINK_ATTR_RATE_TC_INDEX]);
> >> +
> >> +	if (tc_index >= IEEE_8021QAZ_MAX_TCS) {  
> > 
> > This can't be enforced by the policy?
> >   
> 
> If we enforce by policy we need to use the constant 7, not the macro 
> IEEE_8021QAZ_MAX_TCS-1.
> I'll keep it.

The spec should support using "foreign constants"
Off the top of my head - you can define the ieee-8021qaz-max-tcs contant
as if you were defining a devlink constant, then add a header:
attribute. This will tell C codegen to include that header instead of
generating the definition.




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux