|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
21 #include <tracedump/graph.api_enum.h>
22 #include <tracedump/graph.api_types.h>
24 #define REPLY_MSG_ID_BASE gmp->msg_id_base
33 #define MIN(x,y) (((x) < (y)) ? (x) : (y))
67 rmp->_vl_msg_id = htons (VL_API_GRAPH_NODE_GET_REPLY + gmp->
msg_id_base);
69 rmp->
retval = clib_host_to_net_u32 (retval);
70 rmp->
cursor = htonl (cursor);
85 msg_size =
sizeof (*mp);
95 mp->_vl_msg_id = htons (VL_API_GRAPH_NODE_DETAILS + gmp->
msg_id_base);
158 cursor = ntohl (mp->
cursor);
172 VNET_API_ERROR_NO_SUCH_ENTRY, ~0);
183 if (cursor == ~0 && mp->
name[0] != 0)
189 VNET_API_ERROR_NO_SUCH_ENTRY, ~0);
214 u32 first_index = (cursor == ~0) ? 0 : cursor;
218 u32 queue_slots_available = q->maxsize - q->cursize;
219 int chunk = (queue_slots_available > 0) ? queue_slots_available - 1 : 0;
222 for (
i = first_index;
i <
vec_len (nodes); ++
i)
245 #include <tracedump/graph.api.c>
255 am->is_mp_safe[gmp->
msg_id_base + VL_API_GRAPH_NODE_GET] = 1;
#define clib_strncpy(d, s, n)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
Details for each graph node.
static void send_graph_node_details(vlib_node_main_t *nm, vl_api_registration_t *reg, u32 context, vlib_node_t *n, bool want_arcs)
static clib_error_t * graph_api_hookup(vlib_main_t *vm)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
vlib_node_t ** sorted_node_vec
struct _svm_queue svm_queue_t
vlib_node_main_t node_main
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
svm_queue_t * vl_input_queue
shared memory only: pointer to client input queue
#define vec_cmp(v1, v2)
Compare two vectors (only applicable to vectors of signed numbers).
void graph_node_invalid_cache(void)
VL_MSG_API_REAPER_FUNCTION(graph_node_cache_reaper)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define vec_dup(V)
Return copy of vector (no header, no alignment)
An API client registration, only in vpp/vlib.
static void setup_message_id_table(api_main_t *am)
graph_node_get - Get nodes of the packet processing graph In order: if index != ~0,...
static api_main_t * vlibapi_get_main(void)
static vlib_node_t * vlib_get_node(vlib_main_t *vm, u32 i)
Get vlib node by index.
static void send_graph_node_reply(vl_api_registration_t *rp, u32 context, u32 retval, u32 cursor)
API main structure, used by both vpp and binary API clients.
#define vec_free(V)
Free vector's memory (no header).
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
static void vl_api_graph_node_get_t_handler(vl_api_graph_node_get_t *mp)
#define VLIB_INIT_FUNCTION(x)
static int node_cmp(void *a1, void *a2)
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static vlib_main_t * vlib_get_main(void)
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
static clib_error_t * graph_node_cache_reaper(u32 client_index)
void * vl_msg_api_alloc(int nbytes)
vl_api_wireguard_peer_flags_t flags