monitor/qmp: Update comment for commit 4eaca8de268
[qemu/armbru.git] / hw / rdma / vmw / pvrdma_dev_ring.h
blob5f2a0cf9b9fa85b8b288fc325ce6d11dc94ff8ac
1 /*
2 * QEMU VMWARE paravirtual RDMA ring utilities
4 * Copyright (C) 2018 Oracle
5 * Copyright (C) 2018 Red Hat Inc
7 * Authors:
8 * Yuval Shaia <yuval.shaia@oracle.com>
9 * Marcel Apfelbaum <marcel@redhat.com>
11 * This work is licensed under the terms of the GNU GPL, version 2 or later.
12 * See the COPYING file in the top-level directory.
16 #ifndef PVRDMA_DEV_RING_H
17 #define PVRDMA_DEV_RING_H
20 #define MAX_RING_NAME_SZ 32
22 typedef struct PvrdmaRing {
23 char name[MAX_RING_NAME_SZ];
24 PCIDevice *dev;
25 uint32_t max_elems;
26 size_t elem_sz;
27 struct pvrdma_ring *ring_state; /* used only for unmap */
28 int npages;
29 void **pages;
30 } PvrdmaRing;
32 int pvrdma_ring_init(PvrdmaRing *ring, const char *name, PCIDevice *dev,
33 struct pvrdma_ring *ring_state, uint32_t max_elems,
34 size_t elem_sz, dma_addr_t *tbl, uint32_t npages);
35 void *pvrdma_ring_next_elem_read(PvrdmaRing *ring);
36 void pvrdma_ring_read_inc(PvrdmaRing *ring);
37 void *pvrdma_ring_next_elem_write(PvrdmaRing *ring);
38 void pvrdma_ring_write_inc(PvrdmaRing *ring);
39 void pvrdma_ring_free(PvrdmaRing *ring);
41 #endif