Oracle® VM Server for SPARC 3.3 管理ガイド

印刷ビューの終了

更新: 2015 年 10 月
 
 

InfiniBand 仮想機能の作成および破棄

InfiniBand 仮想機能を作成する方法

この手順では、InfiniBand SR-IOV 仮想機能を作成する方法について説明します。

  1. ルートドメインで遅延再構成を開始します。
    primary# ldm start-reconf root-domain-name
  2. iov=on を設定して I/O 仮想化を有効にします。

    この手順は、物理機能を持つバスに対して、I/O 仮想化がすでに有効にされていない場合にのみ実行します。

    primary# ldm set-io iov=on bus
  3. そのルートドメインから物理機能に関連付けられている 1 つ以上の仮想機能を作成します。
    primary# ldm create-vf pf-name

    このコマンドは、作成する仮想機能ごとに実行できます。–n オプションを使用すると、1 回のコマンドで同じ物理機能から複数の仮想機能を作成することもできます。Example 7–6 および ldm(1M) のマニュアルページを参照してください。

  4. ルートドメインをリブートします。

    次のいずれかのコマンドを実行します。

    • primary 以外のルートドメインをリブートします。
      primary# ldm stop-domain -r root-domain
    • primary ルートドメインをリブートします。
      primary# shutdown -i6 -g0 -y
使用例 7-14  InfiniBand 仮想機能の作成

    次の例に、/SYS/MB/RISER1/PCIE4/IOVIB.PF0 物理機能に関する情報を示します。

  • この物理機能は PCIE スロット 4 にあります。

  • 文字列 IOVIB は、物理機能が InfiniBand SR-IOV デバイスであることを示します。

primary# ldm list-io
NAME                                      TYPE   BUS      DOMAIN   STATUS
----                                      ----   ---      ------   ------
pci_0                                     BUS    pci_0    primary
niu_0                                     NIU    niu_0    primary
/SYS/MB/RISER0/PCIE0                      PCIE   pci_0    primary  EMP
/SYS/MB/RISER1/PCIE1                      PCIE   pci_0    primary  EMP
/SYS/MB/RISER2/PCIE2                      PCIE   pci_0    primary  EMP
/SYS/MB/RISER0/PCIE3                      PCIE   pci_0    primary  OCC
/SYS/MB/RISER1/PCIE4                      PCIE   pci_0    primary  OCC
/SYS/MB/RISER2/PCIE5                      PCIE   pci_0    primary  EMP
/SYS/MB/SASHBA0                           PCIE   pci_0    primary  OCC
/SYS/MB/SASHBA1                           PCIE   pci_0    primary  OCC
/SYS/MB/NET0                              PCIE   pci_0    primary  OCC
/SYS/MB/NET2                              PCIE   pci_0    primary  OCC
/SYS/MB/RISER0/PCIE3/IOVIB.PF0            PF     pci_0    primary
/SYS/MB/RISER1/PCIE4/IOVIB.PF0            PF     pci_0    primary
/SYS/MB/NET0/IOVNET.PF0                   PF     pci_0    primary
/SYS/MB/NET0/IOVNET.PF1                   PF     pci_0    primary
/SYS/MB/NET2/IOVNET.PF0                   PF     pci_0    primary
/SYS/MB/NET2/IOVNET.PF1                   PF     pci_0    primary

次のコマンドは、指定された物理機能についての詳細を表示します。値 maxvfs は、デバイスがサポートする仮想機能の最大数を示しています。

primary# ldm list-io -l /SYS/MB/RISER1/PCIE4/IOVIB.PF0
NAME                                      TYPE   BUS      DOMAIN   STATUS
----                                      ----   ---      ------   ------
/SYS/MB/RISER1/PCIE4/IOVIB.PF0            PF     pci_0    primary
[pci@400/pci@1/pci@0/pci@0/pciex15b3,673c@0]
    maxvfs = 64

次の例は、静的仮想機能を作成する方法を示しています。まず、primary ドメインで遅延再構成を開始し、pci_0 PCIe バスで I/O 仮想化を有効にします。pci_0 バスはすでに primary ルートドメインに割り当てられているため、ldm set-io コマンドを使用して、I/O 仮想化を有効にします。

primary# ldm start-reconf primary
Initiating a delayed reconfiguration operation on the primary domain.
All configuration changes for other domains are disabled until the primary
domain reboots, at which time the new configuration for the primary domain
will also take effect.

primary# ldm set-io iov=on pci_0
-----------------------------------------------------------------------
Notice: The primary domain is in the process of a delayed reconfiguration.
Any changes made to the primary domain will only take effect after it reboots.
-----------------------------------------------------------------------

これで、ldm create-vf コマンドを使用して、/SYS/MB/RISER1/PCIE4/IOVIB.PF0 物理機能から仮想機能を作成できます。

primary# ldm create-vf /SYS/MB/RISER1/PCIE4/IOVIB.PF0
-----------------------------------------------------------------------
Notice: The primary domain is in the process of a delayed reconfiguration.
Any changes made to the primary domain will only take effect after it reboots.
----------------------------------------------------------------------
Created new vf: /SYS/MB/RISER1/PCIE4/IOVIB.PF0.VF0

同じ遅延再構成中に複数の仮想機能を作成できます。次のコマンドは、2 つ目の仮想機能を作成します。

primary# ldm create-vf /SYS/MB/RISER1/PCIE4/IOVIB.PF0
-----------------------------------------------------------------------
Notice: The primary domain is in the process of a delayed reconfiguration.
Any changes made to the primary domain will only take effect after it reboots.
-----------------------------------------------------------------------
Created new vf: /SYS/MB/RISER1/PCIE4/IOVIB.PF0.VF1

最後に、primary ルートドメインをリブートして、変更を有効にします。

primary# shutdown -i6 -g0 -y
Shutdown started.

Changing to init state 6 - please wait
...

InfiniBand 仮想機能を破棄する方法

この手順では、InfiniBand SR-IOV 仮想機能を破棄する方法について説明します。

仮想機能が現在ドメインに割り当てられていない場合は、その仮想機能を破棄できます。仮想機能は作成した逆の順序でしか破棄できないため、破棄できるのは最後に作成した仮想機能だけです。結果として作成される構成は、物理機能ドライバによって検証されます。

  1. ルートドメインで遅延再構成を開始します。
    primary# ldm start-reconf root-domain-name
  2. そのルートドメインから物理機能に関連付けられている 1 つ以上の仮想機能を破棄します。
    primary# ldm destroy-vf vf-name

    このコマンドは、破棄する仮想機能ごとに実行できます。–n オプションを使用すると、1 回のコマンドで同じ物理機能から複数の仮想機能を破棄することもできます。Example 7–8 および ldm(1M) のマニュアルページを参照してください。

  3. ルートドメインをリブートします。

    次のいずれかのコマンドを実行します。

    • primary 以外のルートドメインをリブートします。
      primary# ldm stop-domain -r root-domain
    • primary ルートドメインをリブートします。
      primary# shutdown -i6 -g0 -y
使用例 7-15  InfiniBand 仮想機能の破棄

次の例に、静的 InfiniBand 仮想機能 /SYS/MB/RISER1/PCIE4/IOVIB.PF0.VF1 を破棄する方法を示します。

ldm list-io コマンドは、バス、物理機能、および仮想機能に関する情報を表示します。

primary# ldm list-io
NAME                                      TYPE   BUS      DOMAIN STATUS
----                                      ----   ---      ------ ------
pci_0                                     BUS    pci_0    primary  IOV
...
/SYS/MB/RISER1/PCIE4/IOVIB.PF0            PF     pci_0    primary
...
/SYS/MB/RISER1/PCIE4/IOVIB.PF0.VF0        VF     pci_0
/SYS/MB/RISER1/PCIE4/IOVIB.PF0.VF1        VF     pci_0

ldm list-io -l コマンドを使用して、物理機能と関連する仮想機能の詳細を取得できます。

primary# ldm list-io -l /SYS/MB/RISER1/PCIE4/IOVIB.PF0
NAME                                      TYPE   BUS      DOMAIN STATUS
----                                      ----   ---      ------ ------
/SYS/MB/RISER1/PCIE4/IOVIB.PF0            PF     pci_0    primary
[pci@400/pci@1/pci@0/pci@0/pciex15b3,673c@0]
    maxvfs = 64
/SYS/MB/RISER1/PCIE4/IOVIB.PF0.VF0        VF     pci_0
[pci@400/pci@1/pci@0/pci@0/pciex15b3,673c@0,1]
/SYS/MB/RISER1/PCIE4/IOVIB.PF0.VF1        VF     pci_0
[pci@400/pci@1/pci@0/pci@0/pciex15b3,673c@0,2]

仮想機能は、ドメインに割り当てられていない場合にのみ破棄できます。ldm list-io -l 出力の DOMAIN 列に、仮想機能が割り当てられているドメインの名前が表示されます。また、仮想機能は、作成した逆の順序で破棄する必要があります。そのため、この例では、/SYS/MB/RISER1/PCIE4/IOVIB.PF0.VF0 仮想機能を破棄する前に、/SYS/MB/RISER1/PCIE4/IOVIB.PF0.VF1 仮想機能を破棄する必要があります。

適切な機能を識別したら、それを破棄できます。まず、遅延再構成を開始します。

primary# ldm start-reconf primary
Initiating a delayed reconfiguration operation on the primary domain.
All configuration changes for other domains are disabled until the primary
domain reboots, at which time the new configuration for the primary domain
will also take effect.

primary# ldm destroy-vf /SYS/MB/RISER1/PCIE4/IOVIB.PF0.VF1
-----------------------------------------------------------------------
Notice: The primary domain is in the process of a delayed reconfiguration.
Any changes made to the primary domain will only take effect after it reboots.
-----------------------------------------------------------------------

遅延再構成中に 1 つ以上の ldm destroy-vf コマンドを発行できます。したがって、/SYS/MB/RISER1/PCIE4/IOVIB.PF0.VF0 も破棄できます。

最後に、primary ルートドメインをリブートして、変更を有効にします。

primary# shutdown -i6 -g0 -y
Shutdown started.

Changing to init state 6 - please wait
...