19 #include <sys/ioctl.h> 49 .path =
"create interface af_xdp",
50 .short_help =
"create interface af_xdp <host-if linux-ifname> [name ifname] [rx-queue-size size] [tx-queue-size size] [num-rx-queues <num|all>] [prog pathname] [zero-copy|no-zero-copy]",
72 if (
unformat (line_input,
"sw_if_index %d", &sw_if_index))
83 if (sw_if_index == ~0)
85 "please specify interface name or sw_if_index");
100 .path =
"delete interface af_xdp",
101 .short_help =
"delete interface af_xdp " 102 "{<interface> | sw_if_index <sw_idx>}",
vnet_device_class_t af_xdp_device_class
vnet_main_t * vnet_get_main(void)
static vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
static clib_error_t * af_xdp_create_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * af_xdp_delete_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
unformat_function_t unformat_vnet_sw_interface
void af_xdp_delete_if(vlib_main_t *vm, af_xdp_device_t *ad)
af_xdp_device_t * devices
#define VLIB_INIT_FUNCTION(x)
af_xdp_main_t af_xdp_main
#define clib_error_return(e, args...)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
clib_error_t * af_xdp_cli_init(vlib_main_t *vm)
#define vec_free(V)
Free vector's memory (no header).
void af_xdp_create_if(vlib_main_t *vm, af_xdp_create_if_args_t *args)
unformat_function_t unformat_af_xdp_create_if_args
#define VLIB_CLI_COMMAND(x,...)
vl_api_interface_index_t sw_if_index