|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef SRC_VNET_SESSION_MMA_TEMPLATE_H_
17 #define SRC_VNET_SESSION_MMA_TEMPLATE_H_
22 #error MMA_RT_TYPE not defined
25 #define _rt(a,b) a##_##b
26 #define __rt(a, b) _rt(a,b)
27 #define RT(a) __rt(a, MMA_RT_TYPE)
29 #define _rtt(a,b) a##_##b##_t
30 #define __rtt(a, b) _rtt(a,b)
31 #define RTT(a) __rtt(a, MMA_RT_TYPE)
33 #define MMA_TABLE_INVALID_INDEX ((u32)~0)
38 }
RTT (mma_mask_or_match);
46 RTT (mma_mask_or_match) match;
47 RTT (mma_mask_or_match) max_match;
51 typedef int (*
RTT (rule_cmp_fn)) (
RTT (mma_rule) * rule1,
52 RTT (mma_rule) * rule2);
61 RTT (rule_cmp_fn) rule_cmp_fn;
62 }
RTT (mma_rules_table);
66 RTT (mma_mask_or_match) *
key,
u32 rule_index);
69 RTT (mma_mask_or_match) *
key,
u32 rule_index);
74 RTT (mma_rule) * rule,
u32 rule_index);
76 RT (mma_rules_table_rule_alloc) (
RTT (mma_rules_table) * srt);
78 RT (session_rule_free) (
RTT (mma_rules_table) * srt,
RTT (mma_rule) * rule);
u32 RT() mma_table_lookup(RTT(mma_rules_table) *srt, RTT(mma_mask_or_match) *key, u32 rule_index)
u32 RT() mma_table_lookup_rule(RTT(mma_rules_table) *srt, RTT(mma_mask_or_match) *key, u32 rule_index)
int RT() mma_table_add_rule(RTT(mma_rules_table) *srt, RTT(mma_rule) *rule)
u32 root_index
Root for rules tree.
Fixed length block allocator. Pools are built from clib vectors and bitmaps. Use pools when repeatedl...
u32 RT() mma_rules_table_rule_index(RTT(mma_rules_table) *srt, RTT(mma_rule) *sr)
vl_api_gbp_rule_t rules[n_rules]
int RT() mma_table_del_rule(RTT(mma_rules_table) *srt, RTT(mma_rule) *rule, u32 rule_index)