/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* * Copyright(c) 2016 - 2018 Intel Corporation. */ #ifndef DEF_RDMAVT_INCCQ_H #define DEF_RDMAVT_INCCQ_H #include <linux/kthread.h> #include <rdma/ib_user_verbs.h> #include <rdma/ib_verbs.h> /* * Define an ib_cq_notify value that is not valid so we know when CQ * notifications are armed. */ #define RVT_CQ_NONE … /* * Define read macro that apply smp_load_acquire memory barrier * when reading indice of circular buffer that mmaped to user space. */ #define RDMA_READ_UAPI_ATOMIC(member) … /* * Define write macro that uses smp_store_release memory barrier * when writing indice of circular buffer that mmaped to user space. */ #define RDMA_WRITE_UAPI_ATOMIC(member, x) … #include <rdma/rvt-abi.h> /* * This structure is used to contain the head pointer, tail pointer, * and completion queue entries as a single memory allocation so * it can be mmap'ed into user space. */ struct rvt_k_cq_wc { … }; /* * The completion queue structure. */ struct rvt_cq { … }; static inline struct rvt_cq *ibcq_to_rvtcq(struct ib_cq *ibcq) { … } bool rvt_cq_enter(struct rvt_cq *cq, struct ib_wc *entry, bool solicited); #endif /* DEF_RDMAVT_INCCQH */