History

IB/hfi1: Move rvt_cq_wc struct into uapi directory

The rvt_cq_wc struct elements are shared between rdmavt and the providers but not in uapi directory. As per the comment in https://marc.info/?l=linux-rdma&m=152296522708522&w=2 The hfi1 driver and the rdma core driver are not using shared structures in the uapi directory. In that case, move rvt_cq_wc struct into the rvt-abi.h header file and create a rvt_k_cq_w for the kernel completion queue.

Kamenee Arumugam committed 7 years ago

Commit 239b0e51 parent 371bb625 files · +205 −77Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/rdma/rvt-abi.h+32−0
@@ -0,0 +1,32 @@
1+/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2+
3+/*
4+ * This file contains defines, structures, etc. that are used
5+ * to communicate between kernel and user code.
6+ */
7+
8+#ifndef RVT_ABI_USER_H
9+#define RVT_ABI_USER_H
10+
11+#include <linux/types.h>
12+#include <rdma/ib_user_verbs.h>
13+#ifndef RDMA_ATOMIC_UAPI
14+#define RDMA_ATOMIC_UAPI(_type, _name) struct{ _type val; } _name
15+#endif
16+
17+/*
18+ * This structure is used to contain the head pointer, tail pointer,
19+ * and completion queue entries as a single memory allocation so
20+ * it can be mmap'ed into user space.
21+ */
22+struct rvt_cq_wc {
23+ /* index of next entry to fill */
24+ RDMA_ATOMIC_UAPI(__u32, head);
25+ /* index of next ib_poll_cq() entry */
26+ RDMA_ATOMIC_UAPI(__u32, tail);
27+
28+ /* these are actually size ibcq.cqe + 1 */
29+ struct ib_uverbs_wc uqueue[];
30+};
31+
32+#endif /* RVT_ABI_USER_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t