36 memset(md, 0,
sizeof(*md));
44 return (md - map_dpo_pool);
91 return (
format(s,
"map:[%d]:%U domain:%d",
106 return (
format(s,
"map-t:[%d]:%U domain:%d",
static map_dpo_t * map_dpo_get(index_t index)
dpo_lock_fn_t dv_lock
A reference counting lock function.
static const char *const map_t_ip6_nodes[]
A virtual function table regisitered for a DPO type.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
map_dpo_t * map_dpo_pool
pool of all MPLS Label DPOs
void map_dpo_create(dpo_proto_t dproto, u32 domain_index, dpo_id_t *dpo)
enum dpo_type_t_ dpo_type_t
Common types of data-path objects New types can be dynamically added using dpo_register_new_type() ...
static const char *const map_ip4_nodes[]
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
static map_dpo_t * map_dpo_alloc(void)
dpo_type_t dpo_register_new_type(const dpo_vft_t *vft, const char *const *const *nodes)
Create and register a new DPO type.
u8 * format_map_t_dpo(u8 *s, va_list *args)
dpo_proto_t md_proto
The dat-plane protocol.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
u8 * format_map_dpo(u8 *s, va_list *args)
static void map_dpo_lock(dpo_id_t *dpo)
#define pool_put(P, E)
Free an object E in pool P.
void map_t_dpo_create(dpo_proto_t dproto, u32 domain_index, dpo_id_t *dpo)
static const char *const map_ip6_nodes[]
void map_dpo_module_init(void)
static void map_dpo_unlock(dpo_id_t *dpo)
dpo_type_t map_dpo_type
The register MAP DPO type.
#define pool_get_aligned(P, E, A)
Allocate an object E from a pool P (general version).
u16 md_locks
Number of locks/users of the label.
static const char *const map_t_ip4_nodes[]
void dpo_set(dpo_id_t *dpo, dpo_type_t type, dpo_proto_t proto, index_t index)
Set/create a DPO ID The DPO will be locked.
A representation of a MAP DPO.
static const char *const *const map_t_nodes[DPO_PROTO_NUM]
static const char *const *const map_nodes[DPO_PROTO_NUM]
index_t dpoi_index
the index of objects of that type
dpo_type_t map_t_dpo_type
u8 * format_dpo_proto(u8 *s, va_list *args)
format a DPO protocol
static index_t map_dpo_get_index(map_dpo_t *md)
#define CLIB_CACHE_LINE_BYTES
u32 md_domain
the MAP domain index