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))
68 .path =
"create interface avf",
69 .short_help =
"create interface avf <pci-address> " 70 "[rx-queue-size <size>] [tx-queue-size <size>] " 71 "[num-rx-queues <size>]",
93 if (
unformat (line_input,
"sw_if_index %d", &sw_if_index))
104 if (sw_if_index == ~0)
106 "please specify interface name or sw_if_index");
121 .path =
"delete interface avf",
122 .short_help =
"delete interface avf " 123 "{<interface> | sw_if_index <sw_idx>}",
138 int test_irq = 0, enable_elog = 0, disable_elog = 0;
146 if (
unformat (line_input,
"sw_if_index %d", &sw_if_index))
148 else if (
unformat (line_input,
"irq"))
150 else if (
unformat (line_input,
"elog-on"))
152 else if (
unformat (line_input,
"elog-off"))
163 if (sw_if_index == ~0)
165 "please specify interface name or sw_if_index");
174 ad->
flags |= AVF_DEVICE_F_ELOG;
177 ad->
flags &= ~AVF_DEVICE_F_ELOG;
188 .short_help =
"test avf [<interface> | sw_if_index <sw_idx>] [irq] " 189 "[elog-on] [elog-off]",
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 * avf_test_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
unformat_function_t unformat_vnet_sw_interface
unformat_function_t unformat_vlib_pci_addr
vnet_device_class_t avf_device_class
memset(h->entries, 0, sizeof(h->entries[0])*entries)
#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.
clib_error_t * avf_cli_init(vlib_main_t *vm)
#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)