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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450549
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Darek Stojaczyk 2019-04-08 23:14:17 +02:00 committed by Changpeng Liu
parent e05a487129
commit 794b2533de

View File

@ -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) {