LoginSignup
0
0

RHEL8でDPDK22(LTS) SDKを試す ①インストール

Last updated at Posted at 2023-09-02

はじめに

我が家のNATサーバとなっている、ベアメタルのRHEL8.8機にDPDK対応のNIC(Intel I350)が入っているので、DPDK SDKの最新LTS(22.11.2)を入れてみました。そのときのメモです。

注:本記事記載の操作はrootアカウントで行っています。十分ご注意ください。

# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.8 (Ootpa)
# lspci | grep Ethernet
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-V
01:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
01:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)

まず、python3.8のインストール

DPDK22はpython3.6ではビルドできず、python3.7以降にする必要があります。

# python3 -V
Python 3.6.8
# yum install python38
# python3 -V
Python 3.8.16
# pip3 -V
pip 19.3.1 from /usr/lib/python3.8/site-packages/pip (python 3.8)

つづいてMeson/Ninjaのインストール

# pip3 install pyelftools
# pip3 install meson ninja
# meson --version
1.2.1
# ninja --version
1.11.1.git.kitware.jobserver-1

DPDK22のソースをダウンロードしてビルド/インストール

LTS(long term support)バージョンを入れないと余計な苦労をするハメになるので、ちゃんとここから最新LTSバージョンをダウンロードします。

なお、2023/9/1時点のLTSは22.11.2となっています。

# cd /home
# wget https://fast.dpdk.org/rel/dpdk-22.11.2.tar.xz
# tar xJvf dpdk-22.11.2.tar.xz

Meson/Ninjaでビルド/インストールします。

# cd dpdk-stable-22.11.2/
# meson build
# cd build
# ninja
# ninja install

以上でビルドとインストールは完了。恐ろしく簡単でした(時間はかかります)。/usr/local/binや
/usr/local/includeにSDKの各種ファイルがちゃんとインストールされています。

# modprobe vfio-pci
# modprobe uio_pci_generic
# /usr/local/bin/dpdk-devbind.py -s

Network devices using kernel driver
===================================
0000:00:1f.6 'Ethernet Connection (2) I219-V 15b8' if=eno1 drv=e1000e unused=vfio-pci,uio_pci_generic *Active*
0000:01:00.0 'I350 Gigabit Network Connection 1521' if=enp1s0f0 drv=igb unused=vfio-pci,uio_pci_generic *Active*
0000:01:00.1 'I350 Gigabit Network Connection 1521' if=enp1s0f1 drv=igb unused=vfio-pci,uio_pci_generic *Active*
(後略)

DPDK対応ドライバのvfio-pciやuio_pci_genericも使えそうです。

今後

dpdk-devbindとかDPDK22の各種ツールを試してみたいと思います。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0