| 444 | } |
| 445 | |
| 446 | static int |
| 447 | acl_check_rule(const struct rte_acl_rule_data *rd) |
| 448 | { |
| 449 | if ((RTE_LEN2MASK(RTE_ACL_MAX_CATEGORIES, typeof(rd->category_mask)) & |
| 450 | rd->category_mask) == 0 || |
| 451 | rd->priority > RTE_ACL_MAX_PRIORITY || |
| 452 | rd->priority < RTE_ACL_MIN_PRIORITY) |
| 453 | return -EINVAL; |
| 454 | return 0; |
| 455 | } |
| 456 | |
| 457 | int |
| 458 | rte_acl_add_rules(struct rte_acl_ctx *ctx, const struct rte_acl_rule *rules, |