History

RDMA/uverbs: Add uverbs command for dma-buf based MR registration

Implement a new uverbs ioctl method for memory registration with file descriptor as an extra parameter.

Jianxin Xiong committed 5 years ago

Commit bfe0cc61 parent 3bc489e2 files · +129 −2Browse files

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

Unified · Split

include/uapi/rdma/ib_user_ioctl_cmds.h+14−0
@@ -1,5 +1,6 @@
11 /*
22 * Copyright (c) 2018, Mellanox Technologies inc. All rights reserved.
3+ * Copyright (c) 2020, Intel Corporation. All rights reserved.
34 *
45 * This software is available to you under a choice of one of two
56 * licenses. You may choose to be licensed under the terms of the GNU
@@ -251,6 +252,7 @@ enum uverbs_methods_mr { · 245 unmodified lines
251252 UVERBS_METHOD_MR_DESTROY,
252253 UVERBS_METHOD_ADVISE_MR,
253254 UVERBS_METHOD_QUERY_MR,
255+ UVERBS_METHOD_REG_DMABUF_MR,
254256 };
255257
256258 enum uverbs_attrs_mr_destroy_ids {
@@ -272,6 +274,18 @@ enum uverbs_attrs_query_mr_cmd_attr_ids { · 15 unmodified lines
272274 UVERBS_ATTR_QUERY_MR_RESP_IOVA,
273275 };
274276
277+enum uverbs_attrs_reg_dmabuf_mr_cmd_attr_ids {
278+ UVERBS_ATTR_REG_DMABUF_MR_HANDLE,
279+ UVERBS_ATTR_REG_DMABUF_MR_PD_HANDLE,
280+ UVERBS_ATTR_REG_DMABUF_MR_OFFSET,
281+ UVERBS_ATTR_REG_DMABUF_MR_LENGTH,
282+ UVERBS_ATTR_REG_DMABUF_MR_IOVA,
283+ UVERBS_ATTR_REG_DMABUF_MR_FD,
284+ UVERBS_ATTR_REG_DMABUF_MR_ACCESS_FLAGS,
285+ UVERBS_ATTR_REG_DMABUF_MR_RESP_LKEY,
286+ UVERBS_ATTR_REG_DMABUF_MR_RESP_RKEY,
287+};
288+
275289 enum uverbs_attrs_create_counters_cmd_attr_ids {
276290 UVERBS_ATTR_CREATE_COUNTERS_HANDLE,
277291 };