Thread (32 messages) 32 messages, 7 authors, 2025-02-05

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

flat view

From: Carolina Jubran <hidden>
Date: 2025-01-20 11:56:09
Also in: linux-rdma

On 09/12/2024 23:27, Jakub Kicinski wrote:
On Mon, 9 Dec 2024 23:03:04 +0200 Tariq Toukan wrote:
quoted
quoted
quoted
+	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.
Hi Jakub,

I tried implementing this as you suggested, but it seems that the only supported definition types are ['const', 'enum', 'flags', 'struct'], while the max value in checks only accepts patterns matching ^[su](8|16|32|64)-(min|max)$.

From what I see, it doesn’t currently support using a const value for the max or min checks. Let me know if I’m missing something or if there’s an alternative way to achieve this.

Thanks,
Carolina
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help