diff options
author | Luca Boccassi <luca.boccassi@gmail.com> | 2017-07-03 15:11:03 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2017-07-03 15:13:07 +0100 |
commit | bf7567fd2a5b0b28ab724046143c24561d38d015 (patch) | |
tree | d3fecf7bb6da55e6ee81f8d42110bd51c6e93631 /lib/librte_vhost/vhost_user.c | |
parent | 7595afa4d30097c1177b69257118d8ad89a539be (diff) |
New upstream version 17.05.1
Change-Id: I8a23679edd6c9c593ceebecf7d2bf1b489e14ccb
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'lib/librte_vhost/vhost_user.c')
-rw-r--r-- | lib/librte_vhost/vhost_user.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index 5c8058b6..28808815 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -114,6 +114,10 @@ vhost_backend_cleanup(struct virtio_net *dev) rte_free(dev->mem); dev->mem = NULL; } + + free(dev->guest_pages); + dev->guest_pages = NULL; + if (dev->log_addr) { munmap((void *)(uintptr_t)dev->log_addr, dev->log_size); dev->log_addr = 0; @@ -238,8 +242,6 @@ numa_realloc(struct virtio_net *dev, int index) struct vhost_virtqueue *old_vq, *vq; int ret; - enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM}; - old_dev = dev; vq = old_vq = dev->virtqueue[index]; @@ -261,7 +263,7 @@ numa_realloc(struct virtio_net *dev, int index) if (!vq) return dev; - memcpy(vq, old_vq, sizeof(*vq) * VIRTIO_QNUM); + memcpy(vq, old_vq, sizeof(*vq)); rte_free(old_vq); } |