diff mbox series

[for-next,v14,10/11] RDMA/erdma: Add the ABI definitions

Message ID 20220727014927.76564-11-chengyou@linux.alibaba.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show
Series Elastic RDMA Adapter (ERDMA) driver | expand

Commit Message

Cheng Xu July 27, 2022, 1:49 a.m. UTC
Add erdma ABI definitions which will be shared between kernel and
userspace. This commit also fix compile issues reported by lkp.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com>
---
 include/uapi/rdma/erdma-abi.h | 49 +++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 include/uapi/rdma/erdma-abi.h

Comments

Jason Gunthorpe July 28, 2022, 1:03 a.m. UTC | #1
On Wed, Jul 27, 2022 at 09:49:26AM +0800, Cheng Xu wrote:
> Add erdma ABI definitions which will be shared between kernel and
> userspace. This commit also fix compile issues reported by lkp.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com>
> ---
>  include/uapi/rdma/erdma-abi.h | 49 +++++++++++++++++++++++++++++++++++
>  1 file changed, 49 insertions(+)
>  create mode 100644 include/uapi/rdma/erdma-abi.h
> 
> diff --git a/include/uapi/rdma/erdma-abi.h b/include/uapi/rdma/erdma-abi.h
> new file mode 100644
> index 000000000000..fcbaff1d84c3
> --- /dev/null
> +++ b/include/uapi/rdma/erdma-abi.h
> @@ -0,0 +1,49 @@
> +/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
> +/*
> + * Copyright (c) 2020-2022, Alibaba Group.
> + */
> +
> +#ifndef __ERDMA_USER_H__
> +#define __ERDMA_USER_H__
> +
> +#include <linux/types.h>
> +
> +#define ERDMA_ABI_VERSION       1
> +
> +struct erdma_ureq_create_cq {
> +	__u64 db_record_va;
> +	__u64 qbuf_va;

These should all be __aligned_u64, I fixed it

Jason
Cheng Xu July 29, 2022, 6:04 a.m. UTC | #2
On 7/28/22 9:03 AM, Jason Gunthorpe wrote:
> On Wed, Jul 27, 2022 at 09:49:26AM +0800, Cheng Xu wrote:
>> Add erdma ABI definitions which will be shared between kernel and
>> userspace. This commit also fix compile issues reported by lkp.
>>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com>
>> ---
>>  include/uapi/rdma/erdma-abi.h | 49 +++++++++++++++++++++++++++++++++++
>>  1 file changed, 49 insertions(+)
>>  create mode 100644 include/uapi/rdma/erdma-abi.h
>>
>> diff --git a/include/uapi/rdma/erdma-abi.h b/include/uapi/rdma/erdma-abi.h
>> new file mode 100644
>> index 000000000000..fcbaff1d84c3
>> --- /dev/null
>> +++ b/include/uapi/rdma/erdma-abi.h
>> @@ -0,0 +1,49 @@
>> +/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
>> +/*
>> + * Copyright (c) 2020-2022, Alibaba Group.
>> + */
>> +
>> +#ifndef __ERDMA_USER_H__
>> +#define __ERDMA_USER_H__
>> +
>> +#include <linux/types.h>
>> +
>> +#define ERDMA_ABI_VERSION       1
>> +
>> +struct erdma_ureq_create_cq {
>> +	__u64 db_record_va;
>> +	__u64 qbuf_va;
> 
> These should all be __aligned_u64, I fixed it

Thanks, It's fine.

Cheng Xu
diff mbox series

Patch

diff --git a/include/uapi/rdma/erdma-abi.h b/include/uapi/rdma/erdma-abi.h
new file mode 100644
index 000000000000..fcbaff1d84c3
--- /dev/null
+++ b/include/uapi/rdma/erdma-abi.h
@@ -0,0 +1,49 @@ 
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
+/*
+ * Copyright (c) 2020-2022, Alibaba Group.
+ */
+
+#ifndef __ERDMA_USER_H__
+#define __ERDMA_USER_H__
+
+#include <linux/types.h>
+
+#define ERDMA_ABI_VERSION       1
+
+struct erdma_ureq_create_cq {
+	__u64 db_record_va;
+	__u64 qbuf_va;
+	__u32 qbuf_len;
+	__u32 rsvd0;
+};
+
+struct erdma_uresp_create_cq {
+	__u32 cq_id;
+	__u32 num_cqe;
+};
+
+struct erdma_ureq_create_qp {
+	__u64 db_record_va;
+	__u64 qbuf_va;
+	__u32 qbuf_len;
+	__u32 rsvd0;
+};
+
+struct erdma_uresp_create_qp {
+	__u32 qp_id;
+	__u32 num_sqe;
+	__u32 num_rqe;
+	__u32 rq_offset;
+};
+
+struct erdma_uresp_alloc_ctx {
+	__u32 dev_id;
+	__u32 pad;
+	__u32 sdb_type;
+	__u32 sdb_offset;
+	__u64 sdb;
+	__u64 rdb;
+	__u64 cdb;
+};
+
+#endif