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>]",
97 if (
unformat (line_input,
"sw_if_index %d", &sw_if_index))
108 if (sw_if_index == ~0)
110 "please specify interface name or sw_if_index");
125 .path =
"delete interface avf",
126 .short_help =
"delete interface avf " 127 "{<interface> | sw_if_index <sw_idx>}",
142 int test_irq = 0, enable_elog = 0, disable_elog = 0;
150 if (
unformat (line_input,
"sw_if_index %d", &sw_if_index))
152 else if (
unformat (line_input,
"irq"))
154 else if (
unformat (line_input,
"elog-on"))
156 else if (
unformat (line_input,
"elog-off"))
167 if (sw_if_index == ~0)
169 "please specify interface name or sw_if_index");
178 ad->
flags |= AVF_DEVICE_F_ELOG;
181 ad->
flags &= ~AVF_DEVICE_F_ELOG;
192 .short_help =
"test avf [<interface> | sw_if_index <sw_idx>] [irq] " 193 "[elog-on] [elog-off]",
vnet_main_t * vnet_get_main(void)
static clib_error_t * avf_test_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
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_delete_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)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
unformat_function_t unformat_vlib_pci_addr
clib_error_t * avf_cli_init(vlib_main_t *vm)
#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)
#define VLIB_CLI_COMMAND(x,...)
static void avf_reg_write(avf_device_t *ad, u32 addr, u32 val)
void avf_delete_if(vlib_main_t *vm, avf_device_t *ad)
static clib_error_t * avf_create_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)