29 #include <vmxnet3/vmxnet3.api_enum.h> 30 #include <vmxnet3/vmxnet3.api_types.h> 60 rmp->sw_if_index = ntohl (args.sw_if_index);
71 vl_api_vmxnet3_delete_reply_t *rmp;
81 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
110 mp->_vl_msg_id = htons (VL_API_VMXNET3_DETAILS + vmxm->
msg_id_base);
128 vl_api_vmxnet3_rx_list_t *rx_list = &mp->
rx_list[qid];
131 rx_list->rx_qsize = htons (rxq->
size);
136 rx_list->rx_fill[rid] = htons (ring->
fill);
137 rx_list->rx_produce[rid] = htons (ring->
produce);
138 rx_list->rx_consume[rid] = htons (ring->
consume);
146 vl_api_vmxnet3_tx_list_t *tx_list = &mp->
tx_list[qid];
149 tx_list->tx_qsize = htons (txq->
size);
179 swif = vnet_get_sw_interface (vnm, vd->sw_if_index);
180 if_name = format (if_name,
"%U%c", format_vnet_sw_interface_name, vnm,
182 send_vmxnet3_details (reg, vd, swif, if_name, mp->context);
183 _vec_len (if_name) = 0;
191 #include <vmxnet3/vmxnet3.api.c>
void vmxnet3_delete_if(vlib_main_t *vm, vmxnet3_device_t *vd)
#define vec_foreach_index(var, v)
Iterate over vector indices.
Dump all vmxnet3 interfaces.
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)
#define REPLY_MACRO2(t, body)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
static void send_vmxnet3_details(vl_api_registration_t *reg, vmxnet3_device_t *vd, vnet_sw_interface_t *swif, u8 *interface_name, u32 context)
vmxnet3_main_t vmxnet3_main
void vmxnet3_create_if(vlib_main_t *vm, vmxnet3_create_if_args_t *args)
void * vl_msg_api_alloc(int nbytes)
static void vl_api_vmxnet3_create_t_handler(vl_api_vmxnet3_create_t *mp)
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
Memory interface details structure.
vmxnet3_rx_comp_ring rx_comp_ring
vmxnet3_tx_comp_ring tx_comp_ring
vl_api_vmxnet3_rx_list_t rx_list[16]
#define VMXNET3_RX_RING_SIZE
vnet_sw_interface_flags_t flags
vl_api_interface_index_t sw_if_index
vl_api_interface_index_t sw_if_index
An API client registration, only in vpp/vlib.
vl_api_vmxnet3_tx_list_t tx_list[8]
#define vec_free(V)
Free vector's memory (no header).
vl_api_mac_address_t hw_addr
static vnet_hw_interface_t * vnet_get_sup_hw_interface_api_visible_or_null(vnet_main_t *vnm, u32 sw_if_index)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
static void vl_api_vmxnet3_delete_t_handler(vl_api_vmxnet3_delete_t *mp)
clib_error_t * vmxnet3_plugin_api_hookup(vlib_main_t *vm)
static vlib_main_t * vlib_get_main(void)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vnet_device_class_t vmxnet3_device_class
vmxnet3_rx_ring rx_ring[VMXNET3_RX_RING_SIZE]
vmxnet3_device_t * devices
static void setup_message_id_table(snat_main_t *sm, api_main_t *am)
static void vl_api_vmxnet3_dump_t_handler(vl_api_vmxnet3_dump_t *mp)
Message handler for vmxnet3_dump API.