X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=vnet%2Fvnet%2Fdevices%2Fvirtio%2Fvhost-user.h;h=3083b6140168c04798dbf7193f0d9daa25ead61a;hb=d3eb90ecfc1711805deab241a63edd2da2203ef8;hp=ab0128aad48be9fc8cb397935e8eaa68fc19e349;hpb=f3bd5716c1e2dfb1063a0abb0b2fdaf0bccf159f;p=vpp.git diff --git a/vnet/vnet/devices/virtio/vhost-user.h b/vnet/vnet/devices/virtio/vhost-user.h index ab0128aad48..3083b614016 100644 --- a/vnet/vnet/devices/virtio/vhost-user.h +++ b/vnet/vnet/devices/virtio/vhost-user.h @@ -257,14 +257,42 @@ typedef struct u16 qid; } vhost_iface_and_queue_t; +typedef struct +{ + uword dst; + uword src; + u32 len; +} vhost_copy_t; + +typedef struct +{ + u16 qid; /** The interface queue index (Not the virtio vring idx) */ + u16 device_index; /** The device index */ + u32 virtio_ring_flags; /** Runtime queue flags **/ + u16 first_desc_len; /** Length of the first data descriptor **/ + virtio_net_hdr_mrg_rxbuf_t hdr; /** Virtio header **/ +} vhost_trace_t; + + +#define VHOST_USER_RX_BUFFERS_N (2 * VLIB_FRAME_SIZE + 2) +#define VHOST_USER_COPY_ARRAY_N (4 * VLIB_FRAME_SIZE) + typedef struct { vhost_iface_and_queue_t *rx_queues; + u32 rx_buffers_len; + u32 rx_buffers[VHOST_USER_RX_BUFFERS_N]; + + virtio_net_hdr_mrg_rxbuf_t tx_headers[VLIB_FRAME_SIZE]; + vhost_copy_t copy[VHOST_USER_COPY_ARRAY_N]; + + /* This is here so it doesn't end-up + * using stack or registers. */ + vhost_trace_t *current_trace; } vhost_cpu_t; typedef struct { - u32 **rx_buffers; u32 mtu_bytes; vhost_user_intf_t *vhost_user_interfaces; u32 *show_dev_instance_by_real_dev_instance;