virtio-net: remove layout assumptions for ctrl vq
commit921ac5d0f3a0df869db5ce4edf752f51d8b1596a
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 22 Jan 2013 15:44:44 +0000 (22 23:44 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 29 Jan 2013 23:31:09 +0000 (30 01:31 +0200)
tree30295f501eac391ac28dc914bc7f2080fc1753c8
parent41dc8a67c7dcecdf7ae1cd25db3c46f2b42a221f
virtio-net: remove layout assumptions for ctrl vq

Virtio-net code makes assumption about virtqueue descriptor layout
(e.g. sg[0] is the header, sg[1] is the data buffer).

This patch makes code not rely on the layout of descriptors.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio-net.c