History

misc: mic: SCIF RMA header file and IOCTL changes

This patch updates the SCIF header file and IOCTL interface with the changes required to support RMAs. APIs added include the ability to pin pages and register those pages with SCIF. SCIF kernel clients can also add references to remote registered pages and access them via the CPU. The user space IOCTL interface has been updated to enable SCIF registration, RDMA/CPU copies and fence APIs for RDMA synchronization.

Sudeep Dutt committed 11 years ago

Commit a44f2631 parent f4a66c22 files · +309 −10Browse files

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

Unified · Split

include/uapi/linux/scif_ioctl.h+85−0
@@ -106,6 +106,82 @@ struct scifioctl_msg { · 105 unmodified lines
106106 __s32 out_len;
107107 };
108108
109+/**
110+ * struct scifioctl_reg - used for SCIF_REG IOCTL
111+ * @addr: starting virtual address
112+ * @len: length of range
113+ * @offset: offset of window
114+ * @prot: read/write protection
115+ * @flags: flags
116+ * @out_offset: offset returned
117+ */
118+struct scifioctl_reg {
119+ __u64 addr;
120+ __u64 len;
121+ __s64 offset;
122+ __s32 prot;
123+ __s32 flags;
124+ __s64 out_offset;
125+};
126+
127+/**
128+ * struct scifioctl_unreg - used for SCIF_UNREG IOCTL
129+ * @offset: start of range to unregister
130+ * @len: length of range to unregister
131+ */
132+struct scifioctl_unreg {
133+ __s64 offset;
134+ __u64 len;
135+};
136+
137+/**
138+ * struct scifioctl_copy - used for SCIF DMA copy IOCTLs
139+ *
140+ * @loffset: offset in local registered address space to/from
141+ * which to copy
142+ * @len: length of range to copy
143+ * @roffset: offset in remote registered address space to/from
144+ * which to copy
145+ * @addr: user virtual address to/from which to copy
146+ * @flags: flags
147+ *
148+ * This structure is used for SCIF_READFROM, SCIF_WRITETO, SCIF_VREADFROM
149+ * and SCIF_VREADFROM IOCTL's.
150+ */
151+struct scifioctl_copy {
152+ __s64 loffset;
153+ __u64 len;
154+ __s64 roffset;
155+ __u64 addr;
156+ __s32 flags;
157+};
158+
159+/**
160+ * struct scifioctl_fence_mark - used for SCIF_FENCE_MARK IOCTL
161+ * @flags: flags
162+ * @mark: fence handle which is a pointer to a __s32
163+ */
164+struct scifioctl_fence_mark {
165+ __s32 flags;
166+ __u64 mark;
167+};
168+
169+/**
170+ * struct scifioctl_fence_signal - used for SCIF_FENCE_SIGNAL IOCTL
171+ * @loff: local offset
172+ * @lval: value to write to loffset
173+ * @roff: remote offset
174+ * @rval: value to write to roffset
175+ * @flags: flags
176+ */
177+struct scifioctl_fence_signal {
178+ __s64 loff;
179+ __u64 lval;
180+ __s64 roff;
181+ __u64 rval;
182+ __s32 flags;
183+};
184+
109185 /**
110186 * struct scifioctl_node_ids - used for SCIF_GET_NODEIDS IOCTL
111187 * @nodes: pointer to an array of node_ids
@@ -125,6 +201,15 @@ struct scifioctl_node_ids { · 13 unmodified lines
125201 #define SCIF_ACCEPTREG _IOWR('s', 5, __u64)
126202 #define SCIF_SEND _IOWR('s', 6, struct scifioctl_msg)
127203 #define SCIF_RECV _IOWR('s', 7, struct scifioctl_msg)
204+#define SCIF_REG _IOWR('s', 8, struct scifioctl_reg)
205+#define SCIF_UNREG _IOWR('s', 9, struct scifioctl_unreg)
206+#define SCIF_READFROM _IOWR('s', 10, struct scifioctl_copy)
207+#define SCIF_WRITETO _IOWR('s', 11, struct scifioctl_copy)
208+#define SCIF_VREADFROM _IOWR('s', 12, struct scifioctl_copy)
209+#define SCIF_VWRITETO _IOWR('s', 13, struct scifioctl_copy)
128210 #define SCIF_GET_NODEIDS _IOWR('s', 14, struct scifioctl_node_ids)
211+#define SCIF_FENCE_MARK _IOWR('s', 15, struct scifioctl_fence_mark)
212+#define SCIF_FENCE_WAIT _IOWR('s', 16, __s32)
213+#define SCIF_FENCE_SIGNAL _IOWR('s', 17, struct scifioctl_fence_signal)
129214
130215 #endif /* SCIF_IOCTL_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