49 #define RTE_ACL_MAX_CATEGORIES 16
51 #define RTE_ACL_RESULTS_MULTIPLIER (XMM_SIZE / sizeof(uint32_t))
53 #define RTE_ACL_MAX_LEVELS 64
54 #define RTE_ACL_MAX_FIELDS 64
56 union rte_acl_field_types {
64 RTE_ACL_FIELD_TYPE_MASK = 0,
65 RTE_ACL_FIELD_TYPE_RANGE,
66 RTE_ACL_FIELD_TYPE_BITMASK
117 RTE_ACL_TYPE_SHIFT = 29,
118 RTE_ACL_MAX_INDEX =
RTE_LEN2MASK(RTE_ACL_TYPE_SHIFT, uint32_t),
119 RTE_ACL_MAX_PRIORITY = RTE_ACL_MAX_INDEX,
120 RTE_ACL_MIN_PRIORITY = 0,
123 #define RTE_ACL_INVALID_USERDATA 0
125 #define RTE_ACL_MASKLEN_TO_BITMASK(v, s) \
126 ((v) == 0 ? (v) : (typeof(v))((uint64_t)-1 << ((s) * CHAR_BIT - (v))))
142 #define RTE_ACL_RULE_DEF(name, fld_num) struct name {\
143 struct rte_acl_rule_data data; \
144 struct rte_acl_field field[fld_num]; \
149 #define RTE_ACL_RULE_SZ(fld_num) \
150 (sizeof(struct rte_acl_rule) + sizeof(struct rte_acl_field) * (fld_num))
154 #define RTE_ACL_NAMESIZE 32
269 RTE_ACL_CLASSIFY_DEFAULT = 0,
307 const uint8_t **data,
308 uint32_t *results, uint32_t num,
309 uint32_t categories);
347 const uint8_t **data,
348 uint32_t *results, uint32_t num,
365 rte_acl_set_ctx_classify(
struct rte_acl_ctx *ctx,
409 RTE_ACL_IPV4VLAN_PROTO_FIELD,
410 RTE_ACL_IPV4VLAN_VLAN1_FIELD,
411 RTE_ACL_IPV4VLAN_VLAN2_FIELD,
412 RTE_ACL_IPV4VLAN_SRC_FIELD,
413 RTE_ACL_IPV4VLAN_DST_FIELD,
414 RTE_ACL_IPV4VLAN_SRCP_FIELD,
415 RTE_ACL_IPV4VLAN_DSTP_FIELD,
416 RTE_ACL_IPV4VLAN_NUM_FIELDS
422 #define RTE_ACL_IPV4VLAN_RULE_SZ \
423 RTE_ACL_RULE_SZ(RTE_ACL_IPV4VLAN_NUM_FIELDS)
434 RTE_ACL_IPV4VLAN_PROTO,
435 RTE_ACL_IPV4VLAN_VLAN,
436 RTE_ACL_IPV4VLAN_SRC,
437 RTE_ACL_IPV4VLAN_DST,
438 RTE_ACL_IPV4VLAN_PORTS,
483 const uint32_t layout[RTE_ACL_IPV4VLAN_NUM],
484 uint32_t num_categories);