IB驱动安装

1. 查看有没有IB

  lspci |grep Mell

  

  即说明服务器上有IB卡

2. 下载IB 驱动包

官网地址:https://cn.mellanox.com/products/infiniband-drivers/linux/mlnx_ofed

很有可能下载不下来

可使用:https://www.pianshen.com/article/21971554062/

进行下载对应版本,这里下载的是Ubuntu18.04版本的tar包

3. 解压运行

tar -xvf MLNX_OFED_LINUX-5.0-2.1.8.0-ubuntu18.04-x86_64.tgz

sudo ./mlnxofedinstall --force

 

即安装成功,提醒重新加载驱动

sudo /etc/init.d/openibd restart

 

4. 查看IB

成功安装IB驱动之后,使用命令ifocnfig,可以看见ib0

 

配置IB的ip

sudo vim /etc/network/interfaces

 

ibstat 查看信息:

 

或者使用ibstatus查看ib网卡信息:

 

5. 测试IB

 

 

或者:

服务器1:ib_write_bw -a -d mlx5_0

服务器2:ib_write_bw -a -F 服务器1的ip -d mlx5_0 --report_gbits

ib_write_bw -a -F 192.168.207.12 -d mlx5_0 --report_gbits

一些其它查看网卡信息的命令:

ibstat

ibstatus

ibv_devinfo

ibv_devices  #查看本主机的infiniband设备

ibnodes  #查看网络中的infiniband设备

RDMA编程示例:https://github.com/animeshtrivedi/rdma-example

参考文档:

https://www.jianshu.com/p/31a6808aa79c

https://blog.csdn.net/ljlfather/article/details/102833847

https://blog.csdn.net/xztjhs/article/details/51487467

https://www.freesion.com/article/8178539487/

https://blog.csdn.net/t1506376703/article/details/106911631

原文地址:https://www.cnblogs.com/yu121/p/13449132.html