[LTP] [PATCH] tcindex01: fix compilation errors due to missing TCA_TCINDEX_ constants

Petr Vorel pvorel@suse.cz
Tue Jan 16 13:12:35 CET 2024


Hi Li,,

> The change addresses compilation errors encountered in the tcindex01.c
> test when compiled against kernel-6.7 and above.

"against kernel-6.7". But 82b2545ed9a will be released in 6.8, right?

>   tcindex01.c:67:4: error: ‘TCA_TCINDEX_MASK’ undeclared here (not in a function);
>      did you mean ‘TCA_CODEL_MAX’?
>      {TCA_TCINDEX_MASK, &mask, sizeof(mask), NULL},
>       ^~~~~~~~~~~~~~~~
>       TCA_CODEL_MAX
>   tcindex01.c:68:4: error: ‘TCA_TCINDEX_SHIFT’ undeclared here (not in a function);
>      did you mean ‘TCA_FLOW_RSHIFT’?
>      {TCA_TCINDEX_SHIFT, &shift, sizeof(shift), NULL},
>       ^~~~~~~~~~~~~~~~~
>       TCA_FLOW_RSHIFT
>   CC testcases/cve/cve-2016-7117
>   CC utils/sctp/func_tests/test_getname_v6.o
>   tcindex01.c:69:4: error: ‘TCA_TCINDEX_CLASSID’ undeclared here (not in a function);
>      did you mean ‘TCA_FLOWER_CLASSID’?
>      {TCA_TCINDEX_CLASSID, &clsid, sizeof(clsid), NULL},
>       ^~~~~~~~~~~~~~~~~~~
>       TCA_FLOWER_CLASSID

> The errors were due to the removal of certain TCA_TCINDEX_ constants
> from the kernel's user API (uapi), as indicated by the kernel commit.

>   commit 82b2545ed9a (net/sched: Remove uapi support for tcindex classifier)

> The reason why I didn't add this into LTP library is that the defines
> have been dropped we just need to satisfy this one case.

+1 for adding enum here instead of writing m4 autotools check.

> Notes:
>     We need to merge this patch before the new release.
+1

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr


More information about the ltp mailing list