25
2025
04
10:35:42

HPC 23.0.0 安装指南 09

网卡IB模式切换为RoCE模式

当业务需要采用RoCE模式,但实际网卡为IB模式时,需要手动切换为RoCE模式。

前提条件

  • 当前环境中有Mellanox ConnectX网卡。

    用户可执行以下命令,确认当前环境上是否有Mellanox ConnectX网卡。

    lspci | grep Mell

    以下回显表明环境有一张Mellanox ConnectX-6网卡。
    82:00.0 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6]
  • 已参见安装Mellanox网卡驱动完成Mellanox ConnectX网卡驱动的安装。

操作步骤

  1. 执行以下命令,启动网卡驱动。


    mst start

    Starting MST (Mellanox Software Tools) driver set
    Loading MST PCI module - Success
    Loading MST PCI configuration module - Success
    Create devices
    Unloading MST PCI module (unused) - Success


  2. 执行以下命令,查询当前网卡设备。


    mst status

    MST modules:
    ------------
        MST PCI module is not loaded
        MST PCI configuration module loaded
    MST devices:
    ------------/dev/mst/mt4123_pciconf0         - PCI configuration cycles access.
                                       domain:bus:dev.fn=0000:82:00.0 addr.reg=88 data.reg=92 cr_bar.gw_offset=-1
                                       Chip revision is: 00

    /dev/mst/mt4123_pciconf0:表示一张Mellanox ConnectX网卡。


  3. 执行以下命令,查询当前网卡可支持的模式。


    mlxconfig -d <mst_dev> q | grep Description

    回显信息如下:

     ConnectX-6 VPI adapter card; 100Gb/s (HDR100; EDR IB and 100GbE); single-port QSFP56; PCIe3.0 x16; tall bracket; ROHS R6

    <mst_dev>:表示2中查询到的Mellanox ConnectX网卡设备。


    • 回显中包含“EDR IB and 100GbE”表明支持IB模式和RoCE模式,需执行后续操作切换为RoCE模式。

    • 回显中包含“100GbE”不包含“EDR IB”,表明当前为RoCE模式,请跳过后续步骤。

  4. 执行以下命令,切换网卡模式。


    mlxconfig -y -d <mst_dev> s LINK_TYPE_P1=<mode>

    Device #1:
    ----------
    Device type:    ConnectX6       
    Name:           MCX653105A-ECA_Ax
    Description:    ConnectX-6 VPI adapter card; 100Gb/s (HDR100; EDR IB and 100GbE); single-port QSFP56; PCIe3.0 x16; tall bracket; ROHS R6
    Device:         /dev/mst/mt4123_pciconf0Configurations:                              Next Boot       New
             LINK_TYPE_P1                        IB(1)           ETH(2)          
     Apply new Configuration? (y/n) [n] :

    输入“y”,应用新的配置。

    Applying... Done!
    -I- Please reboot machine to load new configurations.


    • <mst_dev>:表示2中查询到的Mellanox ConnectX网卡设备。

    • <mode>:表示网卡模式的数字(1代表IB,2代表RoCE)。

  5. 执行以下命令,使修改生效。


    reboot


  6. 查看网卡模式是否切换。


    mlxconfig -d <mst_dev> q | grep LINK_TYPE

    LINK_TYPE_P1                        ETH(2)




推荐本站淘宝优惠价购买喜欢的宝贝:

image.png

本文链接:https://www.hqyman.cn/post/10915.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到:
打赏





休息一下~~


« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

请先 登录 再评论,若不是会员请先 注册

您的IP地址是: