Patchwork [23/41] virtio-net: change mergeable_rx_bufs to uint32_t

login
register
mail settings
Submitter Juan Quintela
Date Dec. 2, 2009, 12:04 p.m.
Message ID <2a098e033364c3062f9f33b5aa0395aa6879002a.1259754427.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/40028/
State New
Headers show

Comments

Juan Quintela - Dec. 2, 2009, 12:04 p.m.
It only has values 1 and 0

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/virtio-net.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index fda6a76..4ad5edd 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -40,7 +40,7 @@  typedef struct VirtIONet
         VirtQueueElement elem;
         ssize_t len;
     } async_tx;
-    int mergeable_rx_bufs;
+    uint32_t mergeable_rx_bufs;
     uint8_t promisc;
     uint8_t allmulti;
     uint8_t alluni;
@@ -694,7 +694,7 @@  static void virtio_net_save(QEMUFile *f, void *opaque)

     qemu_put_buffer(f, n->mac, ETH_ALEN);
     qemu_put_be32s(f, &n->tx_timer_active);
-    qemu_put_be32(f, n->mergeable_rx_bufs);
+    qemu_put_be32s(f, &n->mergeable_rx_bufs);
     qemu_put_be16(f, n->status);
     qemu_put_byte(f, n->promisc);
     qemu_put_byte(f, n->allmulti);
@@ -723,7 +723,7 @@  static int virtio_net_load(QEMUFile *f, void *opaque, int version_id)

     qemu_get_buffer(f, n->mac, ETH_ALEN);
     qemu_get_be32s(f, &n->tx_timer_active);
-    n->mergeable_rx_bufs = qemu_get_be32(f);
+    qemu_get_be32s(f, &n->mergeable_rx_bufs);

     if (version_id >= 3)
         n->status = qemu_get_be16(f);