20 #define foreach_wg_handoff_error \ 21 _(CONGESTION_DROP, "congestion drop") 25 #define _(sym,str) WG_HANDOFF_ERROR_##sym, 32 #define _(sym,string) string, 69 u32 n_enq, n_left_from, *from;
80 while (n_left_from > 0)
124 if (n_enq < frame->n_vectors)
126 WG_HANDOFF_ERROR_CONGESTION_DROP,
165 .name =
"wg-handshake-handoff",
166 .vector_size =
sizeof (
u32),
179 .name =
"wg-input-data-handoff",
180 .vector_size =
sizeof (
u32),
193 .name =
"wg-output-tun-handoff",
194 .vector_size =
sizeof (
u32),
static u8 * format_wg_handoff_trace(u8 *s, va_list *args)
vlib_node_registration_t wg_handshake_handoff
(constructor) VLIB_REGISTER_NODE (wg_handshake_handoff)
vl_api_wireguard_peer_flags_t flags
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
vlib_node_registration_t wg_output_tun_handoff
(constructor) VLIB_REGISTER_NODE (wg_output_tun_handoff)
#define VLIB_NODE_FN(node)
#define static_always_inline
static index_t wg_peer_get_by_adj_index(index_t ai)
vlib_node_registration_t wg_input_data_handoff
(constructor) VLIB_REGISTER_NODE (wg_input_data_handoff)
description fragment has unexpected format
vl_api_fib_path_type_t type
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
u32 node_index
Node index.
vl_api_tunnel_mode_t mode
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
#define VLIB_REGISTER_NODE(x,...)
#define foreach_wg_handoff_error
vlib_main_t vlib_node_runtime_t * node
wg_index_table_t index_table
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
VLIB buffer representation.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
static_always_inline u32 vlib_buffer_enqueue_to_thread(vlib_main_t *vm, u32 frame_queue_index, u32 *buffer_indices, u16 *thread_indices, u32 n_packets, int drop_on_congestion)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static_always_inline uword wg_handoff(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u32 fq_index, wg_handoff_mode_t mode)
static_always_inline void vlib_get_buffers(vlib_main_t *vm, u32 *bi, vlib_buffer_t **b, int count)
Translate array of buffer indices into buffer pointers.
static wg_peer_t * wg_peer_get(index_t peeri)
static char * wg_handoff_error_strings[]
u32 * wg_index_table_lookup(const wg_index_table_t *table, u32 key)
struct wg_handoff_trace_t_ wg_handoff_trace_t