From: Rich Lane Date: Tue, 5 Apr 2016 02:11:01 +0000 (-0700) Subject: virtio: use zeroed memory for simple Tx header X-Git-Tag: spdx-start~7072 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=610e0a8b628bd33ee8276da8d7dc36b970d9b73e;p=dpdk.git virtio: use zeroed memory for simple Tx header For simple TX the virtio-net header must be zeroed, but it was using memory that had been initialized with indirect descriptor tables. This resulted in "unsupported gso type" errors from librte_vhost. We can use the same memory for every descriptor to save cachelines in the vswitch. Fixes: 6dc5de3a ("virtio: use indirect ring elements") Signed-off-by: Rich Lane Acked-by: Yuanhan Liu Acked-by: Jianfeng Tan --- diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 2b88efddd9..ef21d8e343 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -377,7 +377,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 + - i * vq->hw->vtnet_hdr_size; + offsetof(struct virtio_tx_region, tx_hdr); vq->vq_ring.desc[i + mid_idx].len = vq->hw->vtnet_hdr_size; vq->vq_ring.desc[i + mid_idx].flags =