Build DPDK 20.11

tags: ORAN

tags: CHT Technical Document

Version

  • For O-DU Emerald version, can use DPDK 19.11
  • For O-DU F Version, use DPDK 20.11

DPDK 20.11

1. Install python3 & pip3

  • Python3 is used to install DPDK 20.11
$ yum install epel-release -y $ yum install python36 -y $ yum install -y python3-pip

2. Install meson & ninja

  • DPDK 20.11 used Ninja build file
  • The Meson program is used to configure the source directory and generates either a Ninja build file or Visual Studio® build files
$ sudo pip3 install meson $ sudo yum -y install ninja-build

3. Download DPDK

## Download DPDK $ wget http://static.dpdk.org/rel/dpdk-20.11.3.tar.xz ## Extract tar file $ tar -xf dpdk-20.11.3.tar.xz -C

4. Set up the environment variable

  • Add dpdk path to bashrc so that linux can recognize installed DPDK
## Set the environment variable and append them into ~/.bashrc $ vim ~/.bashrc $ export RTE_TARGET=x86_64-native-linuxapp-icx $ export RTE_SDK=<DPDK_Path>/dpdk-stable-20.11.3 $ export WIRELESS_SDK_TOOLCHAIN=icx $ export SDK_BUILD=build-avx512-icc $ export PATH=$PATH:/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/

5. Modify the meson_options.txt

$ cd <Intallation_DIR>/dpdk-stable-20.11.3 $ vim meson_options.txt

In meson_options.txt

Before:

option('machine', type: 'string', value: 'native', description: 'set the target machine type')

After:

option('machine', type: 'string', value: 'default', description: 'set the target machine type')

6. Patch some files

  • Some files are patched as guided by intel to run O-DU more efficiently

1. Edit i40e_ethdev.c

[oai@ee705-7-ip120 DPDK]$ sudo vi dpdk-20.11.3/drivers/net/i40e/i40e_ethdev.c
  • Change i40e_vsi_queues_bind_intr(main_vsi, I40E_ITR_INDEX_DEFAULT); into i40e_vsi_queues_bind_intr(main_vsi, I40E_ITR_INDEX_NONE); (in about line 2207)
  • Add some lines in about line 2220
i40e_aq_debug_write_global_register(hw,
                        0x0012A504,
                        0, NULL);

2. Edit i40e_ethdev_vf.c

[oai@ee705-7-ip120 DPDK]$ sudo vi dpdk-20.11.3/drivers/net/i40e/i40e_ethdev_vf.c
  • Change map_info->vecmap[0].rxitr_idx = I40E_ITR_INDEX_DEFAULT; into map_info->vecmap[0].rxitr_idx = I40E_ITR_INDEX_NONE; (in about line 640)

3. Edit ixgbe_ethdev.c

[oai@ee705-7-ip120 DPDK]$ sudo vi dpdk-20.11.3/drivers/net/ixgbe/ixgbe_ethdev.c
  • Change hw->mac.type != ixgbe_mac_82598EB) into hw->mac.type != ixgbe_mac_82598EB && hw->mac.type != ixgbe_mac_82599EB) (in about line 3705)

7. Build DPDK

  • Build DPDK using meson and ninja
$ meson build $ cd build $ ninja $ ninja install

Install IGB_UIO driver

  • If you need to bind some devices to IGB_UIO
  • Install driver from other sources
cd /DPDK yum install git git clone git://dpdk.org/dpdk-kmods dpdk_igb_uio_driver cd ./dpdk_igb_uio_driver/linux/igb_uio make clean && make # Load IGB_UIO module sudo modprobe uio cd /dpdk_igb_uio_driver/linux/igb_uio $ sudo insmod igb_uio.ko