19 #include <sys/ioctl.h> 47 else if (
unformat (line_input,
"elog"))
49 else if (
unformat (line_input,
"rx-queue-size %u", &tmp))
51 else if (
unformat (line_input,
"tx-queue-size %u", &tmp))
53 else if (
unformat (line_input,
"num-rx-queues %u", &tmp))
72 .path =
"create interface avf",
73 .short_help =
"create interface avf <pci-address> " 74 "[rx-queue-size <size>] [tx-queue-size <size>] " 75 "[num-rx-queues <size>]",
95 if (
unformat (line_input,
"sw_if_index %d", &sw_if_index))
106 if (sw_if_index == ~0)
108 "please specify interface name or sw_if_index");
122 .path =
"delete interface avf",
123 .short_help =
"delete interface avf " 124 "{<interface> | sw_if_index <sw_idx>}",
139 int test_irq = 0, enable_elog = 0, disable_elog = 0;
147 if (
unformat (line_input,
"sw_if_index %d", &sw_if_index))
149 else if (
unformat (line_input,
"irq"))
151 else if (
unformat (line_input,
"elog-on"))
153 else if (
unformat (line_input,
"elog-off"))
164 if (sw_if_index == ~0)
166 "please specify interface name or sw_if_index");
175 ad->
flags |= AVF_DEVICE_F_ELOG;
178 ad->
flags &= ~AVF_DEVICE_F_ELOG;
189 .short_help =
"test avf [<interface> | sw_if_index <sw_idx>] [irq] " 190 "[elog-on] [elog-off]",
clib_error_t * avf_cli_init(vlib_main_t *vm)
vnet_main_t * vnet_get_main(void)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
unformat_function_t unformat_vnet_sw_interface
vnet_device_class_t avf_device_class
#define VLIB_INIT_FUNCTION(x)
#define clib_error_return(e, args...)
static clib_error_t * avf_test_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
void avf_create_if(vlib_main_t *vm, avf_create_if_args_t *args)
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
unformat_function_t unformat_vlib_pci_addr
vlib_node_registration_t avf_process_node
(constructor) VLIB_REGISTER_NODE (avf_process_node)
#define vec_free(V)
Free vector's memory (no header).
static vnet_hw_interface_t * vnet_get_sup_hw_interface_api_visible_or_null(vnet_main_t *vnm, u32 sw_if_index)
static_always_inline avf_device_t * avf_get_device(u32 dev_instance)
#define VLIB_CLI_COMMAND(x,...)
static void avf_reg_write(avf_device_t *ad, u32 addr, u32 val)
static clib_error_t * avf_delete_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * avf_create_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vl_api_interface_index_t sw_if_index