35 memset(sd, 0,
sizeof(*sd));
43 return (sd - sixrd_dpo_pool);
72 return (
format(s,
"sixrd:[%d]:%U domain:%d",
dpo_lock_fn_t dv_lock
A reference counting lock function.
static index_t sixrd_dpo_get_index(sixrd_dpo_t *sd)
A virtual function table regisitered for a DPO type.
void sixrd_dpo_create(dpo_proto_t dproto, u32 domain_index, dpo_id_t *dpo)
dpo_type_t sixrd_dpo_type
The register SIXRD DPO type.
static void sixrd_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...
u32 sd_domain
the SIXRD domain index
static const char *const sixrd_ip6_nodes[]
enum dpo_type_t_ dpo_type_t
Common types of data-path objects New types can be dynamically added using dpo_register_new_type() ...
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
static void sixrd_dpo_unlock(dpo_id_t *dpo)
dpo_type_t dpo_register_new_type(const dpo_vft_t *vft, const char *const *const *nodes)
Create and register a new DPO type.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
static const char *const sixrd_ip4_nodes[]
sixrd_dpo_t * sixrd_dpo_pool
pool of all MPLS Label DPOs
#define pool_put(P, E)
Free an object E in pool P.
static sixrd_dpo_t * sixrd_dpo_get(index_t index)
dpo_proto_t sd_proto
The dat-plane protocol.
#define pool_get_aligned(P, E, A)
Allocate an object E from a pool P (general version).
u8 * format_sixrd_dpo(u8 *s, va_list *args)
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.
static sixrd_dpo_t * sixrd_dpo_alloc(void)
index_t dpoi_index
the index of objects of that type
A representation of a 6RD DPO.
u8 * format_dpo_proto(u8 *s, va_list *args)
format a DPO protocol
static const char *const *const sixrd_nodes[DPO_PROTO_NUM]
u16 sd_locks
Number of locks/users of the label.
#define CLIB_CACHE_LINE_BYTES
void sixrd_dpo_module_init(void)