|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
25 #define AF_XDP_NUM_RX_QUEUES_ALL ((u16)-1)
27 #define af_xdp_log(lvl, dev, f, ...) \
28 vlib_log(lvl, af_xdp_main.log_class, "%v: " f, (dev)->name, ##__VA_ARGS__)
30 #define foreach_af_xdp_device_flags \
31 _ (0, INITIALIZED, "initialized") \
32 _ (1, ERROR, "error") \
33 _ (2, ADMIN_UP, "admin-up") \
34 _ (3, LINK_UP, "link-up") \
35 _ (4, ZEROCOPY, "zero-copy") \
36 _ (5, SYSCALL_LOCK, "syscall-lock")
40 #define _(a, b, c) AF_XDP_DEVICE_F_##b = (1 << a),
45 #define af_xdp_device_error(dev, fmt, ...) \
48 clib_error_t *err_ = clib_error_return_unix (0, fmt, ## __VA_ARGS__); \
49 if (!clib_atomic_bool_cmp_and_swap (&(dev)->error, 0, err_)) \
50 clib_error_free(err_); \
58 } __clib_packed af_xdp_rxq_mode_t;
67 struct xsk_ring_cons rx;
68 struct xsk_ring_prod fq;
86 struct xsk_ring_prod tx;
87 struct xsk_ring_cons cq;
186 #define foreach_af_xdp_tx_func_error \
187 _ (NO_FREE_SLOTS, "no free tx slots") \
188 _ (SYSCALL_REQUIRED, "syscall required") \
189 _ (SYSCALL_FAILURES, "syscall failures")
193 #define _(f,s) AF_XDP_TX_ERROR_##f,
af_xdp_create_flag_t flags
struct _vnet_device_class vnet_device_class_t
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
format_function_t format_af_xdp_device_name
af_xdp_device_t * devices
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vnet_device_class_t af_xdp_device_class
format_function_t format_af_xdp_input_trace
void af_xdp_delete_if(vlib_main_t *vm, af_xdp_device_t *ad)
clib_spinlock_t syscall_lock
@ AF_XDP_RXQ_MODE_UNKNOWN
vlib_buffer_t * buffer_template
vlib_log_class_t log_class
af_xdp_main_t af_xdp_main
clib_spinlock_t syscall_lock
struct bpf_object * bpf_obj
struct _vlib_node_registration vlib_node_registration_t
unformat_function_t unformat_af_xdp_create_if_args
@ AF_XDP_RXQ_MODE_INTERRUPT
void af_xdp_device_input_refill(af_xdp_device_t *ad)
void af_xdp_create_if(vlib_main_t *vm, af_xdp_create_if_args_t *args)
#define foreach_af_xdp_device_flags
format_function_t format_af_xdp_device
vlib_node_registration_t af_xdp_input_node
(constructor) VLIB_REGISTER_NODE (af_xdp_input_node)
u32 per_interface_next_index
#define foreach_af_xdp_tx_func_error
@ AF_XDP_RXQ_MODE_POLLING
@ AF_XDP_CREATE_FLAGS_NO_SYSCALL_LOCK
VLIB buffer representation.