19 #include <sys/ioctl.h> 46 else if (
unformat (line_input,
"elog"))
62 .path =
"create interface avf",
63 .short_help =
"create interface avf <pci-address>",
85 if (
unformat (line_input,
"sw_if_index %d", &sw_if_index))
96 if (sw_if_index == ~0)
98 "please specify interface name or sw_if_index");
113 .path =
"delete interface avf",
114 .short_help =
"delete interface avf " 115 "{<interface> | sw_if_index <sw_idx>}",
125 u32 sw_if_index = ~0;
130 int test_irq = 0, enable_elog = 0, disable_elog = 0;
138 if (
unformat (line_input,
"sw_if_index %d", &sw_if_index))
140 else if (
unformat (line_input,
"irq"))
142 else if (
unformat (line_input,
"elog-on"))
144 else if (
unformat (line_input,
"elog-off"))
155 if (sw_if_index == ~0)
157 "please specify interface name or sw_if_index");
166 ad->
flags |= AVF_DEVICE_F_ELOG;
169 ad->
flags &= ~AVF_DEVICE_F_ELOG;
180 .short_help =
"test avf [<interface> | sw_if_index <sw_idx>] [irq] " 181 "[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)