|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
73 #define foreach_urpf_error \
74 _(DROP, "uRPF Drop") \
78 #define _(a,b) URPF_ERROR_##a,
109 u32 pass0, lb_index0, pass1, lb_index1;
111 u32 fib_index0, fib_index1;
147 &lb_index0, &lb_index1);
177 if (URPF_MODE_STRICT ==
mode)
202 pass0 |=
b[0]->
flags & VNET_BUFFER_F_LOCALLY_ORIGINATED;
203 pass1 |=
b[1]->
flags & VNET_BUFFER_F_LOCALLY_ORIGINATED;
227 if (
b[0]->
flags & VLIB_BUFFER_IS_TRACED)
234 if (
b[1]->
flags & VLIB_BUFFER_IS_TRACED)
249 u32 pass0, lb_index0, fib_index0;
288 if (URPF_MODE_STRICT ==
mode)
299 pass0 |=
b[0]->
flags & VNET_BUFFER_F_LOCALLY_ORIGINATED;
313 if (
b[0]->
flags & VLIB_BUFFER_IS_TRACED)
327 return frame->n_vectors;
static u8 * format_urpf_trace(u8 *s, va_list *va)
vlib_buffer_t * bufs[VLIB_FRAME_SIZE]
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
ip4_main_t ip4_main
Global ip4 main structure.
static int fib_urpf_check_size(index_t ui)
Data-Plane function to check the size of an uRPF list, (i.e.
vlib_get_buffers(vm, from, b, n_left_from)
vlib_main_t vlib_node_runtime_t * node
vl_api_tunnel_mode_t mode
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vlib_buffer_enqueue_to_next(vm, node, from,(u16 *) nexts, frame->n_vectors)
static uword ip4_address_is_global_broadcast(const ip4_address_t *a)
u32 * fib_index_by_sw_if_index
Table index indexed by software interface.
static uword ip4_address_is_multicast(const ip4_address_t *a)
static uword ip6_address_is_multicast(const ip6_address_t *a)
vlib_error_t error
Error code for buffers to be enqueued to error handler.
static_always_inline void vnet_feature_next_u16(u16 *next0, vlib_buffer_t *b0)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
#define static_always_inline
enum urpf_error_t_ urpf_error_t
u32 * fib_index_by_sw_if_index
static_always_inline void ip4_fib_forwarding_lookup_x2(u32 fib_index0, u32 fib_index1, const ip4_address_t *addr0, const ip4_address_t *addr1, index_t *lb0, index_t *lb1)
static u32 ip6_fib_table_fwding_lookup(u32 fib_index, const ip6_address_t *dst)
#define foreach_urpf_error
description fragment has unexpected format
enum urpf_mode_t_ urpf_mode_t
static load_balance_t * load_balance_get(index_t lbi)
static_always_inline uword urpf_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, ip_address_family_t af, vlib_dir_t dir, urpf_mode_t mode)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
u16 nexts[VLIB_FRAME_SIZE]
static index_t ip4_fib_forwarding_lookup(u32 fib_index, const ip4_address_t *addr)
index_t lb_urpf
This is the index of the uRPF list for this LB.
vl_api_interface_index_t sw_if_index
#define vlib_prefetch_buffer_data(b, type)
static int fib_urpf_check(index_t ui, u32 sw_if_index)
Data-Plane function to check an input interface against an uRPF list.
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,...
enum ip_address_family_t_ ip_address_family_t
VLIB buffer representation.
vl_api_wireguard_peer_flags_t flags