~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/rdma/rdmavt_cq.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
  2 /*
  3  * Copyright(c) 2016 - 2018 Intel Corporation.
  4  */
  5 
  6 #ifndef DEF_RDMAVT_INCCQ_H
  7 #define DEF_RDMAVT_INCCQ_H
  8 
  9 #include <linux/kthread.h>
 10 #include <rdma/ib_user_verbs.h>
 11 #include <rdma/ib_verbs.h>
 12 
 13 /*
 14  * Define an ib_cq_notify value that is not valid so we know when CQ
 15  * notifications are armed.
 16  */
 17 #define RVT_CQ_NONE      (IB_CQ_NEXT_COMP + 1)
 18 
 19 /*
 20  * Define read macro that apply smp_load_acquire memory barrier
 21  * when reading indice of circular buffer that mmaped to user space.
 22  */
 23 #define RDMA_READ_UAPI_ATOMIC(member) smp_load_acquire(&(member).val)
 24 
 25 /*
 26  * Define write macro that uses smp_store_release memory barrier
 27  * when writing indice of circular buffer that mmaped to user space.
 28  */
 29 #define RDMA_WRITE_UAPI_ATOMIC(member, x) smp_store_release(&(member).val, x)
 30 #include <rdma/rvt-abi.h>
 31 
 32 /*
 33  * This structure is used to contain the head pointer, tail pointer,
 34  * and completion queue entries as a single memory allocation so
 35  * it can be mmap'ed into user space.
 36  */
 37 struct rvt_k_cq_wc {
 38         u32 head;               /* index of next entry to fill */
 39         u32 tail;               /* index of next ib_poll_cq() entry */
 40         struct ib_wc kqueue[];
 41 };
 42 
 43 /*
 44  * The completion queue structure.
 45  */
 46 struct rvt_cq {
 47         struct ib_cq ibcq;
 48         struct work_struct comptask;
 49         spinlock_t lock; /* protect changes in this struct */
 50         u8 notify;
 51         u8 triggered;
 52         u8 cq_full;
 53         int comp_vector_cpu;
 54         struct rvt_dev_info *rdi;
 55         struct rvt_cq_wc *queue;
 56         struct rvt_mmap_info *ip;
 57         struct rvt_k_cq_wc *kqueue;
 58 };
 59 
 60 static inline struct rvt_cq *ibcq_to_rvtcq(struct ib_cq *ibcq)
 61 {
 62         return container_of(ibcq, struct rvt_cq, ibcq);
 63 }
 64 
 65 bool rvt_cq_enter(struct rvt_cq *cq, struct ib_wc *entry, bool solicited);
 66 
 67 #endif          /* DEF_RDMAVT_INCCQH */
 68 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php