summaryrefslogtreecommitdiffstats
path: root/tools/virtio/ringtest/ptr_ring.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2016-06-30 08:45:33 +0200
committerDavid S. Miller <davem@davemloft.net>2016-07-01 11:32:17 +0200
commit59e6ae53248a72d83cec77dd704b6990b2394479 (patch)
tree6978c2c81e9c807a544304ea2c28ce49696d3ad4 /tools/virtio/ringtest/ptr_ring.c
parentskb_array: minor tweak (diff)
downloadlinux-59e6ae53248a72d83cec77dd704b6990b2394479.tar.xz
linux-59e6ae53248a72d83cec77dd704b6990b2394479.zip
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/ringtest/ptr_ring.c')
-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);