RHEL 6: Up and Running with SR-IOV on Dell PowerEdge Servers

TechCenter Blogs

RHEL 6: Up and Running with SR-IOV on Dell PowerEdge Servers

Posted on behalf of Surya Prabhakar, Dell Linux Engineering


RHEL 6 provides SR-IOV functionality on supported hardware which provides near native performance for virtualized guests.

Single-Root I/O Virtualization (SR-IOV) specification, introduced by PCI-SIG details how a single PCIe device can be shared between various guest operating systems. Devices capable of SR-IOV functionality support multiple virtual functions on top of the physical function.  Virtual Function is enabled in hardware as a light weight PCIe function.Operating System cannot discover this function as it does not respond to the PCI bus scan and requires support in the host’s driver.

As in PCIe pass-through, a Virtual function of a SR-IOV capable card can be directly assigned to the guest operating system. A virtual function driver running in the guest manages this device. This however complicates migration. There is the vhost-net approach to using SR-IOV which I will cover in a future blog.

   

Diagrammatic representation of SR-IOV

To get SR-IOV working on RHEL 6, you will require a Dell PowerEdge Server capable of Intel VT-d or AMD-VI hardware with the CPU virtualization and IOMMU enabled in the BIOS. This currently works on the Dell PowerEdge 11G servers and related Network Adapters. SR-IOV is not yet supported by Dell. Kindly refer to dell.com for more details

 

Quick steps to enable an Intel 82576 based SR-IOV card on Dell PowerEdge servers:

1.   Enable IOMMU feature in the kernel

Append the following kernel parameters to the kernel command line (and/or /etc/grub.conf)

 intel_iommu=on   for Intel based systems

 amd_iommu=on for AMD based systems

 

2.   After bootup, ensure the network adapter is detected by the system

# lspci | grep  82576

06:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)

06:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)

 

3.   Depending on the number of virtual functions you want to enable create a file: /etc/modprobe.d/igb.conf

options igb max_vfs=2 #igb is the Linux host driver for Intel 82576 card.
#max_vfs is the maximum virtual functions per physical function.
#This can be changed as per requirement.

 

4.  Reload the kernel module in the host.

# modprobe –r igb      # remove the module
# modprobe igb          # reinsert the module

 
5.  Once this is done ,  you can to confirm if they are enabled
#lspci | grep 82576

06:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)

06:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)

06:10.0 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)

06:10.1 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)

06:10.2 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)

06:10.3 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)


If you have 2 physical cards and you enable 2 virtual functions per physical card the output of lspci shows you 2 physical functions and 4 virtual functions.

6.  Red Hat Documentation on how this can be done.

Now PCI pass-through can be achieved by passing the Virtual functions directly to the guest operating system.  Refer to


7. 
The final step is to enable the driver in the guest operating system.

# lspci | grep 82576   # to check for device availability

# modprobe igbvf      # driver for the guest os

 

Comments
  • By Tim Mattox, VP of Enterprise Product Marketing for Dell Dell is proud to announce the launch of OEM

  • レッドハット社の最新OSであるRHEL6関連の情報をいくつかあげてみました。 動作検証 9G,10G,11G各世代での動作確認済みモデルはこちらになります。 http://www.delltechcenter

  • このブログは米国デル Linuxエンジニアリング担当、Surya Prabhakarのテックセンターでのブログ記事を抄訳したものです。原文は こちら になります。 RHEL 6(Red Hat Enterprise

  • このブログは米国デル Linuxエンジニアリング担当、Surya Prabhakarのテックセンターでのブログ記事を抄訳したものです。原文は こちら になります。

     RHEL 6(Red Hat Enterprise Linux 6) は、サポートされているハードウェアに対し、仮想化されたゲストマシーン上でも本来のパフォーマンスに近い性能を実現する SR-IOV 機能を提供します。

      PCI-SIG により導入されたシングルルートI/O仮想化(SR-IOV)仕様には、さまざまなゲストオペレーティングシステム間で単一のPCI Expressデバイスを共有する方法が詳述されています。 SR-IOV機能に対応したデバイスは、物理機能に加えて複数の仮想機能もサポートしています。 仮想機能は、軽量なPCI Express機能としてハードウェア上で利用可能です。この機能はPCIバススキャンに応答せず、ホストVMMのドライバでサポートが必要になるため、ゲストマシーン上のオペレーティングシステムでは検出できません。

     PCIエクスプレス・パススルーと同様、SR-IOV対応カードの仮想機能は、ゲストオペレーティングシステムに直接割り当てることができます。 ゲストで実行されている仮想機能のドライバが、このデバイスを管理します。 ただし、これによって移行が複雑になります。 SR-IOVの使用には、vhost-netによるアプローチもあります。これについては、今後のブログで取り上げます。

    SR-IOVの図解

    SR-IOVの図解

     SR-IOVをRHEL 6で機能させるには、インテルVT-dまたはAMD-VIハードウェアに対応し、BIOSでCPU仮想化とIOMMUが有効になっているDell PowerEdgeサーバが必要です。 現時点でこれは、ここに記載されているDell PowerEdge 11Gサーバおよび関連するネットワークアダプタ上で機能しますが、デルによる正式サポートはまだ提供されていません。

    インテルCPU搭載の2ソケットシステム: PowerEdge R610、R710、T610

    インテルCPU搭載の4ソケットシステム: PowerEdge R810、R910

    AMD CPU搭載の4ソケットシステム: PowerEdge R715、R815

    インテル82576またはインテル82599搭載SR-IOV対応ネットワークカード

    インテル82576搭載のSR-IOVカードをDell PowerEdgeサーバで有効にするための手順の概要

    1. IOMMU機能をカーネル内で有効にします。 カーネルのコマンドライン(または/etc/grub.conf)で次のカーネルパラメーターを追加します。 intel_iommu=on (インテルCPU搭載システムの場合) amd_iommu=on (AMD CPU搭載システムの場合)

    2. 起動したら、ネットワークアダプタがシステムに検知されていることを確認します。

    # lspci | grep 82576 06:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) 06:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)

    3. 有効にする仮想機能の数に応じてファイルを作成します: /etc/modprobe.d/igb.conf

    options igb max_vfs=2  #igbは、インテル82576カード用のLinuxホストドライバです。

    #max_vfsは、物理機能1つあたりの仮想機能の最大数です。

    #これは要件に合わせて変更することができます。

    4. ホスト内でカーネルモジュールを再ロードします。

    # modprobe –r igb #モジュールを削除

    # modprobe igb #モジュールを再挿入

    5. これが終了したら、有効になっているかどうかを確認できます。

    #lspci | grep 82576 06:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) 06:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) 06:10.0 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 06:10.1 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 06:10.2 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 06:10.3 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)

    物理カードが2枚の場合、物理カード1枚あたり2つの仮想機能を有効にすると、lspciの出力には2つの物理機能と4つの仮想機能が表示されます。

    6. Red Hatの マニュアルの手順 に従って実行します。 これで、仮想機能をゲストオペレーティングシステムに直接提供できるようになり、PCIパススルーが達成されます。 参照先:

    7. 最後に、ゲストオペレーティングシステムでドライバを有効にします。 # lspci | grep 82576 #デバイスの利用可否を確認

    # modprobe igbvf #ゲストOS用のドライバ

    以上です。

  • Dear Susie,

    We have couple 11G machines (R710s and R510s) which come with Broadcom NetXtreme II BCM5716 Gigabit Ethernet controllers.  The BIOS has the option to enable SR-IOV but what kernel module(s) need to be loaded to use the SR-IOV on RHEL 6.1?

    Thanks,

    Bruce

  • How to use the SR-IOV on R510s and R710s with Broadcom network cards?  Thanks.

Page 1 of 1 (6 items)