Re: [PATCH rdma-next 10/11] RDMA/erdma: Add the ABI definitions
From: Yanjun Zhu <hidden>
Date: 2021-12-25 00:03:25
在 2021/12/25 2:19, Leon Romanovsky 写道:
On Fri, Dec 24, 2021 at 03:12:35PM +0800, Cheng Xu wrote:quoted
On 12/24/21 6:55 AM, Yanjun Zhu wrote:quoted
在 2021/12/24 2:45, Leon Romanovsky 写道:quoted
On Thu, Dec 23, 2021 at 11:46:03PM +0800, Yanjun Zhu wrote:quoted
在 2021/12/21 10:48, Cheng Xu 写道:quoted
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.hdiff --git a/include/uapi/rdma/erdma-abi.hb/include/uapi/rdma/erdma-abi.h new file mode 100644 index 000000000000..6bcba10c1e41--- /dev/null +++ b/include/uapi/rdma/erdma-abi.h@@ -0,0 +1,49 @@ +/* SPDX-License-Identifier: ((GPL-2.0 WITHLinux-syscall-note) OR Linux-OpenIB) */ +/* + * Copyright (c) 2020-2021, Alibaba Group. + */ + +#ifndef __ERDMA_USER_H__ +#define __ERDMA_USER_H__ + +#include <linux/types.h> + +#define ERDMA_ABI_VERSION 1ERDMA_ABI_VERSION should be 2?Why? This field is for rdma-core and we don't have erdma provider in that library yet. It always starts from 1 for new drivers.Please check this link: http://mail.spinics.net/lists/linux-rdma/msg63012.html Jason mentioned in this link: " /* * For 64 bit machines ABI version 1 and 2 are the same. Otherwise 32 * bit machines require ABI version 2 which guarentees the user and * kernel use the same ABI. */ " Zhu YanjunEven though I do not understand the reason, but as mentioned above, I think ERDMA_ABI_VERSION = 1 is fine, because ERDMA can only work in 64bit machines.Jason's comment came after we discovered that many of our API structures had problematic layout and weren't aligned to 64bits. This caused to issues when the 32bits software tried to use 64bit kernel.
Got it. Thanks Zhu Yanjun
So we didn't have many choices but bump ABI versions for broken drivers and RXE was one of them. You are proposing new driver, it should start from 1. Thanks