virtio-net: use qemu_get_queue() where possible
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 20 Feb 2014 11:14:09 +0000 (12:14 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 25 Feb 2014 13:31:05 +0000 (14:31 +0100)
qemu_get_queue() is a shorthand for qemu_get_subqueue(n->nic, 0).  Use
the shorthand where possible.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/net/virtio-net.c

index 9218a09ffc015783079561359d7c4ce6a36ef6c8..3c0342e17a80b1d5833c2ea847a69a879e0f5313 100644 (file)
@@ -459,7 +459,7 @@ static uint32_t virtio_net_bad_features(VirtIODevice *vdev)
 
 static void virtio_net_apply_guest_offloads(VirtIONet *n)
 {
-    qemu_set_offload(qemu_get_subqueue(n->nic, 0)->peer,
+    qemu_set_offload(qemu_get_queue(n->nic)->peer,
             !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_CSUM)),
             !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_TSO4)),
             !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_TSO6)),