• CentOS7 Soft RoCE v2


    https://github.com/SoftRoCE/rxe-dev/wiki/rxe-dev:-Home

    Kernel Space Driver

    Github: https://github.com/SoftRoCE/rxe-dev.git (this repository)

    Active Branch: rxe_submission_v18

    User Space Library

    Github: https://github.com/SoftRoCE/librxe-dev.git

    Current Version: librxe-1.0.0

    构建说明

    安装依赖包

    yum install epel-release -y 

    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

    编译并安装内核

    (1)Clone kernel git:      

    1. cd /usr/local/src/
    2. git clone https://github.com/SoftRoCE/rxe-dev.git

    Checkout branch 'rxe_submission_v18'

    (2)Compile kernel: Enter the source directory

    1. cd rxe-dev
    2. git checkout rxe_submission_v18
    3. cp /boot/config-$(uname -r) .config

    内核版本为

    vim Makefile

    make menuconfig

    会出现选择界面(如果没出现,需要安装 ncurse-devel)

    输入 "/" ,然后输入 rxe,按下 enter,会查找有关 rxe 的选择项

    输入数字 1,就会选择到“Software RDMA over Ethernet (ROCE) driver”的设置,输入 "M" ,选中 RDMA 的配置,如果 输不了 M,那就输入空格。

    移动到保存按钮,回车,装保存到.config中,退出安装界面(exit)。

    然后 vi .config 来确认

    Need to enable CONFIG_RDMA_RXE=m

    Need to enable CONFIG_INFINIBAND_ADDR_TRANS=y

    Need to enable CONFIG_INFINIBAND_ADDR_TRANS_CONFIGFS=y in new config file .config

     

    1. make -j 4 LOCALVERSION=
    2. make modules_install
    3. make install
    4. make headers_install INSTALL_HDR_PATH=/usr

    验证是否添加了新的内核条目(例如,添加到grub);如果没有,则需要手动添加。

    使用新内核启动。

    卸载通过yum安装的内核

    #列出所有的kernel

    $rpm -qa|grep kernel

    #然后卸载对应的rpm就行

    $sudo yum remove xxxxx

    卸载编译安装的内核

    (1)首先从待删除内核以外的内核启动,然后删除/lib/modules下对应的文件夹

    (2)删除/boot/下面对应的项

    (3)删除grub开机残留项

    grub2-mkconfig -o /boot/grub2/grub.cfg

    安装用户空间库(librxe)(不需要)

    rxe-dev和librxe_dev这两个存储库缺乏维护。RDMA核心已经限制了所有RXE实用程序。因此,请使用RDMA-core而不是librxe-dev。

    (1)安装以下软件包(使用RedHat显示的示例):

    yum install perl-Switch (name might vary according to distribution)

    (2)确保安装了以下上游用户空间库:

    libibverbs  libibverbs-devel  libibverbs-utils  librdmacm  librdmacm-devel

    librdmacm-utils ( For ubuntu libibverbs-dev libswitch-perl rdmacm-utils ibverbs-utils )

    (3)编译并安装用户空间库librxe:

    git clone GitHub - SoftRoCE/librxe-dev: Development repository for RXE user space code.

    cd librxe-dev

    ./configure --libdir=/usr/lib64/ --prefix=

    make

    make install

    Configure Soft-RoCE (RXE)

    (1)使用librxe RPM中包含的rxe_cfg脚本加载ib_rxe内核模块:rxe_cfg start(这可能需要sudo或root权限)

    (2)通过网络接口创建RXE设备(例如eth0):rxe_cfg add eth0

    (3)使用status命令显示当前配置:rxe_cfg status

    (4)如果配置成功,您将看到类似于以下内容的输出:

    如果您使用的是Mellanox HCA:需要确保在软RoCE机器中未加载mlx4_ib内核模块(modprobe–rv mlx4_ ib)。

    现在,您有一个名为“rxe0”的Infiniband设备,可以用于运行任何RoCE应用程序。

  • 相关阅读:
    mybatis-plus自动填充
    字符集编码(二):字符编码模型
    【iOS】——分类、扩展和关联对象
    Java调用ffmpeg把rtsp视频流保存为MP4文件,并播放
    基于径向基函数RBF网络的手写数字分类(Matlab代码实现)
    RHCE---正则表达式
    Xilinx ISE系列教程(1):ISE开发环境下载、安装、注册(Windows 10 64位系统)
    vue 对axios进行封装
    uniapp+vue3使用pinia,安卓端报错白屏
    【时序数据库InfluxDB】Windows环境下配置InfluxDB+数据可视化,以及使用 C#进行简单操作的代码实例...
  • 原文地址:https://blog.csdn.net/weixin_39094034/article/details/127724014