build rxe_cfg on OL75 based on 4.14.35-1830

1. yum install gcc gcc-c++ bc openssl-devel automake ncurses-devel libibverbs -y 
yum install libibverbs-devel libibverbs-utils librdmacm librdmacm-devel librdmacm-utils perl-Switch elfutils-libelf-devel  -y

2. git clone https://github.com/SoftRoCE/librxe-dev.git
3. git clone https://github.com/linux-rdma/rdma-core.git
4. cd rdma-core && git checkout -f rdma-core-12 -b rdma-core-12
5. yum install cmake -y
6. yum install libnl-devel -y
7. cd rdma_core && bash build.sh
8. export C_INCLUDE_PATH=/root/rdma-core/build/include/
9. ./configure --libdir=/usr/lib64/ --prefix=
10. yum install patch -y
11.
diff --git a/src/rxe.c b/src/rxe.c
index 94d0de5..385c16c 100644
--- a/src/rxe.c
+++ b/src/rxe.c
@@ -942,11 +942,13 @@ struct ibv_device *openib_driver_init(struct sysfs_class_device *sysdev)
 {
        int abi_ver = 0;
        char value[8];
+       const char *path;
+       path = ibv_get_sysfs_path();

-       if (ibv_read_sysfs_file(sysdev->path, "abi_version",
+       if (ibv_read_sysfs_file(path, "class/infiniband_verbs/abi_version",
                                value, sizeof value) > 0)
                abi_ver = strtol(value, NULL, 10);

-       return rxe_driver_init(sysdev->path, abi_ver);
+       return rxe_driver_init(path, abi_ver);
 }
 #endif /* HAVE_IBV_REGISTER_DRIVER */
12. yum install perl-CPAN
13. cpan; install Switch

阅读更多
换一批

没有更多推荐了,返回首页