31 memset(cd, 0,
sizeof(*cd));
39 return (cd - classify_dpo_pool);
44 u32 classify_table_index)
64 return (
format(s,
"%U-classify:[%d]:table:%d",
dpo_lock_fn_t dv_lock
A reference counting lock function.
A virtual function table regisitered for a DPO type.
static void classify_dpo_lock(dpo_id_t *dpo)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
static classify_dpo_t * classify_dpo_alloc(void)
#define pool_len(p)
Number of elements in pool vector.
static const char *const *const classify_nodes[DPO_PROTO_NUM]
memset(h->entries, 0, sizeof(h->entries[0])*entries)
void dpo_register(dpo_type_t type, const dpo_vft_t *vft, const char *const *const *nodes)
For a given DPO type Register:
void fib_show_memory_usage(const char *name, u32 in_use_elts, u32 allocd_elts, size_t size_elt)
Show the memory usage for a type.
A representation of an MPLS label for imposition in the data-path.
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
static const char *const classify_ip4_nodes[]
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
index_t classify_dpo_create(dpo_proto_t proto, u32 classify_table_index)
void classify_dpo_module_init(void)
#define pool_put(P, E)
Free an object E in pool P.
#define pool_get_aligned(P, E, A)
Allocate an object E from a pool P (general version).
static void classify_dpo_mem_show(void)
u8 * format_classify_dpo(u8 *s, va_list *args)
static const char *const classify_ip6_nodes[]
classify_dpo_t * classify_dpo_pool
index_t dpoi_index
the index of objects of that type
u8 * format_dpo_proto(u8 *s, va_list *args)
format a DPO protocol
static classify_dpo_t * classify_dpo_get(index_t index)
u16 cd_locks
Number of locks/users of the label.
static void classify_dpo_unlock(dpo_id_t *dpo)
#define CLIB_CACHE_LINE_BYTES
static index_t classify_dpo_get_index(classify_dpo_t *cd)
static uword pool_elts(void *v)
Number of active elements in a pool.