virtio: fix descriptors pointing to the same buffer
The virtio_net_hdr desc all pointed to the same buffer. It doesn't cause
issue because in the simple TX mode we don't use the header. This patch
makes the header desc point to different buffer.
Fixes: b4ae9c505f
("virtio: optimize ring layout")
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
This commit is contained in:
parent
c680a4a88c
commit
3b1e3e4e36
@ -353,7 +353,7 @@ virtio_dev_vring_start(struct virtqueue *vq, int queue_type)
|
||||
vq->vq_ring.desc[i + mid_idx].next = i;
|
||||
vq->vq_ring.desc[i + mid_idx].addr =
|
||||
vq->virtio_net_hdr_mem +
|
||||
mid_idx * vq->hw->vtnet_hdr_size;
|
||||
i * vq->hw->vtnet_hdr_size;
|
||||
vq->vq_ring.desc[i + mid_idx].len =
|
||||
vq->hw->vtnet_hdr_size;
|
||||
vq->vq_ring.desc[i + mid_idx].flags =
|
||||
|
Loading…
Reference in New Issue
Block a user