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))
66 .path =
"create interface avf",
67 .short_help =
"create interface avf <pci-address> " 68 "[rx-queue-size <size>] [tx-queue-size <size>]",
90 if (
unformat (line_input,
"sw_if_index %d", &sw_if_index))
101 if (sw_if_index == ~0)
103 "please specify interface name or sw_if_index");
118 .path =
"delete interface avf",
119 .short_help =
"delete interface avf " 120 "{<interface> | sw_if_index <sw_idx>}",
130 u32 sw_if_index = ~0;
135 int test_irq = 0, enable_elog = 0, disable_elog = 0;
143 if (
unformat (line_input,
"sw_if_index %d", &sw_if_index))
145 else if (
unformat (line_input,
"irq"))
147 else if (
unformat (line_input,
"elog-on"))
149 else if (
unformat (line_input,
"elog-off"))
160 if (sw_if_index == ~0)
162 "please specify interface name or sw_if_index");
171 ad->
flags |= AVF_DEVICE_F_ELOG;
174 ad->
flags &= ~AVF_DEVICE_F_ELOG;
185 .short_help =
"test avf [<interface> | sw_if_index <sw_idx>] [irq] " 186 "[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
#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)