|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
40 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
47 #define foreach_virtio_pci_api_msg \
48 _(VIRTIO_PCI_CREATE, virtio_pci_create) \
49 _(VIRTIO_PCI_CREATE_V2, virtio_pci_create_v2) \
50 _(VIRTIO_PCI_DELETE, virtio_pci_delete) \
51 _(SW_INTERFACE_VIRTIO_PCI_DUMP, sw_interface_virtio_pci_dump)
89 rmp->_vl_msg_id = htons (VL_API_VIRTIO_PCI_CREATE_REPLY);
116 "virtio gso api flag mismatch");
118 (
int) VIRTIO_FLAG_CSUM_OFFLOAD),
119 "virtio checksum offload api flag mismatch");
121 (
int) VIRTIO_FLAG_GRO_COALESCE),
122 "virtio gro coalesce api flag mismatch");
124 "virtio packed api flag mismatch");
126 (
int) VIRTIO_FLAG_IN_ORDER),
127 "virtio in-order api flag mismatch");
129 (
int) VIRTIO_FLAG_BUFFERING),
130 "virtio buffering api flag mismatch");
151 rmp->_vl_msg_id = htons (VL_API_VIRTIO_PCI_CREATE_V2_REPLY);
168 vl_api_virtio_pci_delete_reply_t *rmp;
176 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
190 rmp->_vl_msg_id = htons (VL_API_VIRTIO_PCI_DELETE_REPLY);
192 rmp->retval = htonl (
rv);
207 mp->_vl_msg_id = htons (VL_API_SW_INTERFACE_VIRTIO_PCI_DETAILS);
237 if (vif->
type == VIRTIO_IF_TYPE_PCI)
244 #define vl_msg_name_crc_list
246 #undef vl_msg_name_crc_list
251 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id);
252 foreach_vl_msg_name_crc_virtio;
262 vl_msg_api_set_handlers(VL_API_##N, #n, \
263 vl_api_##n##_t_handler, \
265 vl_api_##n##_t_endian, \
266 vl_api_##n##_t_print, \
267 sizeof(vl_api_##n##_t), 1);
vnet_device_class_t virtio_device_class
void virtio_pci_create_if(vlib_main_t *vm, virtio_pci_create_if_args_t *args)
vl_api_interface_index_t sw_if_index
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
static clib_error_t * virtio_pci_api_hookup(vlib_main_t *vm)
#define clib_memcpy(d, s, n)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
vl_api_pci_address_t pci_addr
Reply for virtio pci create reply.
@ VIRTIO_API_FLAG_CSUM_OFFLOAD
static void vl_api_virtio_pci_create_v2_t_handler(vl_api_virtio_pci_create_v2_t *mp)
vl_api_mac_address_t mac_address
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vl_api_pci_address_t pci_addr
static void vl_api_sw_interface_virtio_pci_dump_t_handler(vl_api_sw_interface_virtio_pci_dump_t *mp)
virtio_main_t virtio_main
#define pool_foreach(VAR, POOL)
Iterate through pool.
@ VIRTIO_API_FLAG_GRO_COALESCE
Initialize a new virtio pci interface with the given parameters.
Dump virtio pci interfaces request.
virtio_vring_t * txq_vrings
int virtio_pci_delete_if(vlib_main_t *vm, virtio_if_t *vif)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
vnet_main_t * vnet_get_main(void)
vl_api_pci_address_t pci_addr
@ VIRTIO_API_FLAG_IN_ORDER
An API client registration, only in vpp/vlib.
static vnet_hw_interface_t * vnet_get_sup_hw_interface_api_visible_or_null(vnet_main_t *vnm, u32 sw_if_index)
void pci_address_encode(const vlib_pci_addr_t *in, vl_api_pci_address_t *out)
u8 checksum_offload_enabled
static api_main_t * vlibapi_get_main(void)
Delete virtio pci interface.
Reply for virtio pci interface dump request.
#define STATIC_ASSERT(truth,...)
API main structure, used by both vpp and binary API clients.
static void vl_api_virtio_pci_delete_t_handler(vl_api_virtio_pci_delete_t *mp)
vl_api_interface_index_t sw_if_index
vl_api_mac_address_t mac_addr
Reply for virtio pci create reply.
vl_api_interface_index_t sw_if_index
static void virtio_pci_send_sw_interface_details(vpe_api_main_t *am, vl_api_registration_t *reg, virtio_if_t *vif, u32 context)
bool checksum_offload_enabled
static void vl_api_virtio_pci_create_t_handler(vl_api_virtio_pci_create_t *mp)
vl_api_interface_index_t sw_if_index
VLIB_API_INIT_FUNCTION(virtio_pci_api_hookup)
virtio_vring_t * rxq_vrings
void pci_address_decode(const vl_api_pci_address_t *in, vlib_pci_addr_t *out)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
#define foreach_virtio_pci_api_msg
vl_api_virtio_flags_t virtio_flags
static vlib_main_t * vlib_get_main(void)
vl_api_mac_address_t mac_address
Initialize a new virtio pci interface with the given parameters.
@ VIRTIO_API_FLAG_BUFFERING
vpe_api_main_t vpe_api_main
void * vl_msg_api_alloc(int nbytes)
static void setup_message_id_table(api_main_t *am)