19 #include <sys/ioctl.h> 49 .path =
"create interface rdma",
50 .short_help =
"create interface rdma <host-if ifname> [name <name>]" 51 " [rx-queue-size <size>] [tx-queue-size <size>]" 52 " [num-rx-queues <size>] [mode <auto|ibv|dv]",
74 if (
unformat (line_input,
"sw_if_index %d", &sw_if_index))
85 if (sw_if_index == ~0)
87 "please specify interface name or sw_if_index");
102 .path =
"delete interface rdma",
103 .short_help =
"delete interface rdma " 104 "{<interface> | sw_if_index <sw_idx>}",
127 if (
unformat (line_input,
"sw_if_index %d", &sw_if_index))
138 if (sw_if_index == ~0)
140 "please specify interface name or sw_if_index");
148 if ((rd->
flags & RDMA_DEVICE_F_MLX5DV) == 0)
165 .path =
"test rdma dump",
166 .short_help =
"test rdma dump {<interface> | sw_if_index <sw_idx>}",
#define vec_foreach_index(var, v)
Iterate over vector indices.
vnet_main_t * vnet_get_main(void)
static clib_error_t * test_rdma_dump_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vlib_pci_device_info_t * pci
unformat_function_t unformat_vnet_sw_interface
static clib_error_t * rdma_delete_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vl_api_interface_index_t sw_if_index
#define VLIB_INIT_FUNCTION(x)
#define clib_error_return(e, args...)
unformat_function_t unformat_rdma_create_if_args
format_function_t format_rdma_rxq
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
clib_error_t * rdma_cli_init(vlib_main_t *vm)
sll srl srl sll sra u16x4 i
#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,...)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
vnet_device_class_t rdma_device_class
static clib_error_t * rdma_create_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
void rdma_delete_if(vlib_main_t *vm, rdma_device_t *rd)
void rdma_create_if(vlib_main_t *vm, rdma_create_if_args_t *args)
format_function_t format_vlib_pci_addr