From 3aa1b7af0f5fbfdf1b4759658e1445bda680b40d Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Fri, 22 Jan 2021 19:00:29 +0100 Subject: pvrdma: wean code off pvrdma_ring.h kernel header The pvrdma code relies on the pvrdma_ring.h kernel header for some basic ring buffer handling. The content of that header isn't very exciting, but contains some (q)atomic_*() invocations that (a) cause manual massaging when doing a headers update, and (b) are an indication that we probably should not be importing that header at all. Let's reimplement the ring buffer handling directly in the pvrdma code instead. This arguably also improves readability of the code. Importing the header can now be dropped. Signed-off-by: Cornelia Huck Reviewed-by: Paolo Bonzini Reviewed-by: Yuval Shaia Tested-by: Yuval Shaia Signed-off-by: Jason Wang --- hw/rdma/vmw/pvrdma.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'hw/rdma/vmw/pvrdma.h') diff --git a/hw/rdma/vmw/pvrdma.h b/hw/rdma/vmw/pvrdma.h index 1d36a76f1e..d08965d3e2 100644 --- a/hw/rdma/vmw/pvrdma.h +++ b/hw/rdma/vmw/pvrdma.h @@ -26,7 +26,6 @@ #include "../rdma_backend_defs.h" #include "../rdma_rm_defs.h" -#include "standard-headers/drivers/infiniband/hw/vmw_pvrdma/pvrdma_ring.h" #include "standard-headers/drivers/infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h" #include "pvrdma_dev_ring.h" #include "qom/object.h" @@ -64,10 +63,10 @@ typedef struct DSRInfo { union pvrdma_cmd_req *req; union pvrdma_cmd_resp *rsp; - struct pvrdma_ring *async_ring_state; + PvrdmaRingState *async_ring_state; PvrdmaRing async; - struct pvrdma_ring *cq_ring_state; + PvrdmaRingState *cq_ring_state; PvrdmaRing cq; } DSRInfo; -- cgit v1.2.3