34 memset(rd, 0,
sizeof(*rd));
58 const ip46_address_t *nh_addr,
107 return (
format(s,
"dpo-receive DELETED"));
114 return (
format(s,
"dpo-receive: %U on %U",
121 return (
format(s,
"dpo-receive"));
dpo_lock_fn_t dv_lock
A reference counting lock function.
void receive_dpo_add_or_lock(dpo_proto_t proto, u32 sw_if_index, const ip46_address_t *nh_addr, dpo_id_t *dpo)
A virtual function table regisitered for a DPO type.
static void receive_dpo_unlock(dpo_id_t *dpo)
vnet_main_t * vnet_get_main(void)
static u8 * format_receive_dpo(u8 *s, va_list *ap)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
static vnet_sw_interface_t * vnet_get_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
static const char *const receive_ip4_nodes[]
The per-protocol VLIB graph nodes that are assigned to a receive object.
#define pool_len(p)
Number of elements in pool vector.
static receive_dpo_t * receive_dpo_get_from_dpo(const dpo_id_t *dpo)
void dpo_register(dpo_type_t type, const dpo_vft_t *vft, const char *const *const *nodes)
For a given DPO type Register:
void receive_dpo_module_init(void)
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.
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
format_function_t format_vnet_sw_interface_name
dpo_type_t dpoi_type
the type
static const char *const *const receive_nodes[DPO_PROTO_NUM]
#define pool_put(P, E)
Free an object E in pool P.
static void receive_dpo_lock(dpo_id_t *dpo)
#define pool_get_aligned(P, E, A)
Allocate an object E from a pool P (general version).
static receive_dpo_t * receive_dpo_alloc(void)
static const char *const receive_ip6_nodes[]
static receive_dpo_t * receive_dpo_get(index_t index)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
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.
u32 rd_sw_if_index
The Software interface index on which traffic is received.
The data-path object representing receiveing the packet, i.e.
index_t dpoi_index
the index of objects of that type
receive_dpo_t * receive_dpo_pool
The data-path object representing receiveing the packet, i.e.
ip46_address_t rd_addr
The address on the receive interface.
static void receive_dpo_mem_show(void)
u16 rd_locks
number oflocks.
#define CLIB_CACHE_LINE_BYTES
static uword pool_elts(void *v)
Number of active elements in a pool.