[dpdk-dev] [PATCH v7 3/8] vhost: vring queue setup for multiple queue support

Stephen Hemminger stephen at networkplumber.org
Wed Oct 21 06:45:12 CEST 2015


On Wed, 21 Oct 2015 11:48:09 +0800
Yuanhan Liu <yuanhan.liu at linux.intel.com> wrote:

>  struct virtio_net {
> -	struct vhost_virtqueue	*virtqueue[VIRTIO_QNUM];	/**< Contains all virtqueue information. */
> +	struct vhost_virtqueue	*virtqueue[VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX];	/**< Contains all virtqueue information. */
>  	struct virtio_memory	*mem;		/**< QEMU memory and memory region information. */

Since vhost_virtqueue takes up space, why not put it at end of array,
that way offsets are smaller and all the early fields will be in
adjacent cache lines.


More information about the dev mailing list