[PATCH v2] acl: reject rules with inverted range
Andrey Mokrushin
a.mokrushin at ideco.ru
Thu Nov 12 07:29: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).
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.
Andrey
More information about the dev
mailing list