[PATCH v2] acl: reject rules with inverted range

Konstantin Ananyev konstantin.v.ananyev at yandex.ru
Thu Nov 12 10:54:36 CET 2026




> Hi Konstantin,
>
>> Why not check rules range in rte_acl_add_rules()->acl_check_rule()?
> Because at that point we don't know which fields are RANGE ones:
> rte_acl_param carries only rule_size, and field definitions arrive
> with rte_acl_config in rte_acl_build() (ctx->config is filled there).
You are right, I already forgot about that :)
> The same set of rules can also be built with different configs,
> so a field that is RANGE in one build may be MASK/BITMASK in another,
> where value > mask_range is perfectly valid.
>
> That's why v2 validates them in acl_check_bld_param(), once per
> rte_acl_build(), as Dmitry suggested.
>
> If you'd prefer, I can add a sentence about it to the commit message.
Up to you, no strong opinion here.
> Andrey



More information about the dev mailing list