summaryrefslogtreecommitdiff
path: root/tools/virtio
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2016-06-30 09:45:33 +0300
committerDavid S. Miller <davem@davemloft.net>2016-07-01 12:32:17 +0300
commit59e6ae53248a72d83cec77dd704b6990b2394479 (patch)
tree6978c2c81e9c807a544304ea2c28ce49696d3ad4 /tools/virtio
parentfd68adec9de3104c236ffbcb3bd829d3e635a444 (diff)
downloadlinux-59e6ae53248a72d83cec77dd704b6990b2394479.tar.xz
ptr_ring: support resizing multiple queues
Sometimes, we need support resizing multiple queues at once. This is because it was not easy to recover to recover from a partial failure of multiple queues resizing. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/virtio')
-rw-r--r--tools/virtio/ringtest/ptr_ring.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/virtio/ringtest/ptr_ring.c b/tools/virtio/ringtest/ptr_ring.c
index 74abd746ae91..68e4f9f0da3a 100644
--- a/tools/virtio/ringtest/ptr_ring.c
+++ b/tools/virtio/ringtest/ptr_ring.c
@@ -17,6 +17,11 @@
typedef pthread_spinlock_t spinlock_t;
typedef int gfp_t;
+static void *kmalloc(unsigned size, gfp_t gfp)
+{
+ return memalign(64, size);
+}
+
static void *kzalloc(unsigned size, gfp_t gfp)
{
void *p = memalign(64, size);