20 #define RTE_ACL_MAX_CATEGORIES 16 22 #define RTE_ACL_RESULTS_MULTIPLIER (XMM_SIZE / sizeof(uint32_t)) 24 #define RTE_ACL_MAX_LEVELS 64 25 #define RTE_ACL_MAX_FIELDS 64 27 union rte_acl_field_types {
35 RTE_ACL_FIELD_TYPE_MASK = 0,
36 RTE_ACL_FIELD_TYPE_RANGE,
37 RTE_ACL_FIELD_TYPE_BITMASK
76 union rte_acl_field_types value;
78 union rte_acl_field_types mask_range;
88 RTE_ACL_TYPE_SHIFT = 29,
89 RTE_ACL_MAX_INDEX =
RTE_LEN2MASK(RTE_ACL_TYPE_SHIFT, uint32_t),
90 RTE_ACL_MAX_PRIORITY = RTE_ACL_MAX_INDEX,
91 RTE_ACL_MIN_PRIORITY = 1,
94 #define RTE_ACL_MASKLEN_TO_BITMASK(v, s) \ 95 ((v) == 0 ? (v) : (typeof(v))((uint64_t)-1 << ((s) * CHAR_BIT - (v)))) 111 #define RTE_ACL_RULE_DEF(name, fld_num) struct name {\ 112 struct rte_acl_rule_data data; \ 113 struct rte_acl_field field[fld_num]; \ 118 #define RTE_ACL_RULE_SZ(fld_num) \ 119 (sizeof(struct rte_acl_rule) + sizeof(struct rte_acl_field) * (fld_num)) 123 #define RTE_ACL_NAMESIZE 32 239 RTE_ACL_CLASSIFY_DEFAULT = 0,
280 const uint8_t **data,
281 uint32_t *results, uint32_t num,
282 uint32_t categories);
320 const uint8_t **data,
321 uint32_t *results, uint32_t num,
340 rte_acl_set_ctx_classify(
struct rte_acl_ctx *ctx,
struct rte_acl_ctx * rte_acl_create(const struct rte_acl_param *param)
void rte_acl_dump(const struct rte_acl_ctx *ctx)
void rte_acl_reset(struct rte_acl_ctx *ctx)
int rte_acl_build(struct rte_acl_ctx *ctx, const struct rte_acl_config *cfg)
#define RTE_LEN2MASK(ln, tp)
void rte_acl_list_dump(void)
void rte_acl_reset_rules(struct rte_acl_ctx *ctx)
void rte_acl_free(struct rte_acl_ctx *ctx)
struct rte_acl_ctx * rte_acl_find_existing(const char *name)
#define RTE_ACL_RULE_DEF(name, fld_num)
int rte_acl_add_rules(struct rte_acl_ctx *ctx, const struct rte_acl_rule *rules, uint32_t num)
int rte_acl_classify(const struct rte_acl_ctx *ctx, const uint8_t **data, uint32_t *results, uint32_t num, uint32_t categories)