Commit 794b2533 authored by Darek Stojaczyk's avatar Darek Stojaczyk Committed by Changpeng Liu
Browse files

virtio: shrink the process-local virtqueue structure



We used to ceil the size of the vring structure to the
nearest cache line boundary. That's how the original
DPDK implementation behaved, but I can't find a reason
for this. This patch gets rid of the ceiling.

Change-Id: Iaa40fdb79c60252237901f77023ff2f9e580eece
Signed-off-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450549


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent e05a4871
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -139,9 +139,7 @@ virtio_init_queue(struct virtio_dev *dev, uint16_t vtpci_queue_idx)
		return -EINVAL;
	}

	size = RTE_ALIGN_CEIL(sizeof(*vq) +
			      vq_size * sizeof(struct vq_desc_extra),
			      RTE_CACHE_LINE_SIZE);
	size = sizeof(*vq) + vq_size * sizeof(struct vq_desc_extra);

	vq = spdk_dma_zmalloc(size, RTE_CACHE_LINE_SIZE, NULL);
	if (vq == NULL) {