Mellanox Infiniband カード スイッチ IB/イーサネット/VPI 動作モード

Mellanox Infiniband カードで IB/イーサネット/VPI 3 動作モードを切り替える方法

ネットワークカードの現在の動作ステータスを確認します

ibstat を実行すると、ネットワーク カードの動作モードが返されるリンク層情報が返されます。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
knightli@epyc:~$ sudo ibstat
CA 'mlx4_0'
        CA type: MT4103
        Number of ports: 2
        Firmware version: 2.42.5700
        Hardware version: 0
        Node GUID: 0x98f2b3ffffd5c3c0
        System image GUID: 0x98f2b3ffffd5c3c3
        Port 1:
                State: Down
                Physical state: Disabled
                Rate: 40
                Base lid: 0
                LMC: 0
                SM lid: 0
                Capability mask: 0x00010000
                Port GUID: 0x9af2b3fffed5c3c1
                Link layer: Ethernet
        Port 2:
                State: Down
                Physical state: Disabled
                Rate: 40
                Base lid: 0
                LMC: 0
                SM lid: 0
                Capability mask: 0x00010000
                Port GUID: 0x9af2b3fffed5c3c2
                Link layer: Ethernet

作業モードを切り替える

MST ソフトウェアをインストールする

1
root@epyc:/home/knightli# systemctl start mst

デバイス名を問い合わせる

MST デバイスの下には、返されたデバイス名が表示されます。 2 つのポートはデバイス名にも対応していることに注意してください。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
root@epyc-7551p:/home/knightli# mst status
MST modules:
------------
    MST PCI module loaded
    MST PCI configuration module loaded

MST devices:
------------
/dev/mst/mt4103_pciconf0         - PCI configuration cycles access.
                                   domain:bus:dev.fn=0000:28:00.0 addr.reg=88 data.reg=92 cr_bar.gw_offset=-1
                                   Chip revision is: 00
/dev/mst/mt4103_pci_cr0          - PCI direct access.
                                   domain:bus:dev.fn=0000:28:00.0 bar=0xeb700000 size=0x100000
                                   Chip revision is: 00

作業モードを切り替える

mlxconfig -d /dev/mst/mt4103_pciconf0 set LINK_TYPE_P1=1

  • -d デバイス名
  • LINK_TYPE
    LINK_TYPE_P1: ポート 1
    LINK_TYPE_P2: ポート 2
    1 : IB
    2 : Ethernet
    3 : VPI
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
root@epyc:/home/knightli# mlxconfig -d /dev/mst/mt4103_pciconf0 set LINK_TYPE_P1=1

Device #1:
----------

Device type:    ConnectX3Pro    
Device:         /dev/mst/mt4103_pciconf0

Configurations:                              Next Boot       New
         LINK_TYPE_P1                        IB(1)           IB(1)           

 Apply new Configuration? (y/n) [n] : y
Applying... Done!
-I- Please reboot machine to load new configurations.

root@epyc:/home/knightli# mlxconfig -d /dev/mst/mt4103_pciconf0 set LINK_TYPE_P2=1

Device #1:
----------

Device type:    ConnectX3Pro    
Device:         /dev/mst/mt4103_pciconf0

Configurations:                              Next Boot       New
         LINK_TYPE_P2                        IB(1)           IB(1)           

 Apply new Configuration? (y/n) [n] : y
Applying... Done!
-I- Please reboot machine to load new configurations.

ホストを再起動します

1
root@epyc-7551p:/home/knightli# sudo reboot
记录并分享
Hugo で構築されています。
テーマ StackJimmy によって設計されています。