Subject: Re: [PATCH v23 net-next 1/6] sched: Struct definition and parsing of dualpi2 qdisc

From: Jakub Kicinski <[email-masked]>
Date: Thu, 17 Jul 2025 06:38:54 -0700

On Thu, 17 Jul 2025 07:16:21 +0000 Chia-Yu Chang (Nokia) wrote:
> Thanks for feedback.
> May I ask is it fine if I put the enum like below?
> 
> enum tc_dualpi2_drop_overload {
>        TC_DUALPI2_DROP_OVERLOAD_OVERFLOW = 0,
>        TC_DUALPI2_DROP_OVERLOAD_DROP = 1,
>        __TCA_DUALPI2_DROP_OVERLOAD_MAX,
> };
> #define TCA_DUALPI2_DROP_OVERLOAD_MAX (__TCA_DUALPI2_DROP_OVERLOAD_MAX - 1)

Missed the TCA_ on the max entry and define?

> enum tc_dualpi2_drop_early {
>        TC_DUALPI2_DROP_EARLY_DROP_DEQUEUE = 0,
>        TC_DUALPI2_DROP_EARLY_DROP_ENQUEUE = 1,
>        __TCA_DUALPI2_DROP_EARLY_MAX,
> };
> #define TCA_DUALPI2_DROP_EARLY_MAX (__TCA_DUALPI2_DROP_EARLY_MAX - 1)
> 
> enum tc_dualpi2_ecn_mask {
>        TC_DUALPI2_ECN_MASK_L4S_ECT = 1,
>        TC_DUALPI2_ECN_MASK_CLA_ECT = 2,
>        TC_DUALPI2_ECN_MASK_ANY_ECT = 3,
>        __TCA_DUALPI2_ECN_MASK_MAX,
> };
> #define TCA_DUALPI2_ECN_MASK_MAX (__TCA_DUALPI2_ECN_MASK_MAX - 1)
> 
> enum tc_dualpi2_split_gso {
>        TC_DUALPI2_SPLIT_GSO_NO_SPLIT_GSO = 0,
>        TC_DUALPI2_SPLIT_GSO_SPLIT_GSO = 1,
>        __TCA_DUALPI2_SPLIT_GSO_MAX,
> };
> #define TCA_DUALPI2_SPLIT_GSO_MAX (__TCA_DUALPI2_SPLIT_GSO_MAX - 1)
>  
>  
> And shall such change also been applied to Dualpi2 attributes below?
> As these are more attribute-like, so I assume no.

Correct, these stay as they are.