How-to: Build VPP FD.IO development environment with Mellanox DPDK PMD.

目录

References

Prerequisite

Installation, Compilation and Configuration


VPP is an open-source Vector Packet Processing (VPP) platform by Cisco. The package supplies a powerful DPDK-based dataplane with a variety of Layer 3 (L3) and Layer 2 (L2) functionalities.

VPP can be integrated with OpenStack and third-party SDN controllers. Red Hat adopted VPP alongside OVS-DPDK as a hypervisor dataplane.

This post shows how to build a VPP development environment over DPDK for ConnectX-4 and ConnectX-5 adapters. The environment can be used to support networking functionalities and performance testing.

The post audience targets Developer/DevOps or a Technical Engineers, who would like to test and evaluate Mellanox ConnectX-4/5's integration with VPP.

References

Prerequisite

1. Install Ubuntu 16.04 operating system.

 2. Install MLNX_OFED rel. 4.1-1.0.2.0  and use the ofed_info command to verify that the version is 4.1-1.0.2.0:

ofed_info -s

3. Set up an account to use the Linux Foundation resources.

To set up the account, refer to The Linux Foundation website: 

 https://identity.linuxfoundation.org.

4. Set up a Gerrit account and apply an ssh public key.

Follow the instructions on the FD.IO wiki web page: https://wiki.fd.io/view/DEV/Setting_up_Gerrit#Log_into_Gerrit

5. Install the following packages:

apt-get -y install git-review git dh-systemd bison libssl-dev libcr-dev libnuma-dev libganglia1-dev libapr1-dev libconfuse-dev debhelper dkms curl nasm 

6. Install Oracle Java 8.

install Oracle Java 8:
apt-get install software-properties-common -y
add-apt-repository ppa:webupd8team/java -y
apt-get update
apt-get install oracle-java8-installer oracle-java8-set-default -y
 JAVA_HOME=/usr/lib/jvm/java-8-oracle

Installation, Compilation and Configuration

1. Download the VPP main master branch.

git clone ssh://<USERNAME>@gerrit.fd.io:29418/vpp.git
git checkout origin/stable/1710

Use your Linux Foundation user name account you created, instead of <USERNAME> as in the from the example above.

 2. Enable the mlx5 PMD driver compilation.

cd /vpp
sed -i '/vpp_uses_dpdk_mlx5_pmd/s/^# //g' build-data/platforms/vpp.mk 

3. Compile

cd /vpp
make dpdk-install-dev DPDK_MLX5_PMD=y
make install-dep
make build-release
make pkg-deb vpp_uses_dpdk_mlx5_pmd=yes
dpkg -i build-root/vpp-lib*
dpkg -i build-root/vpp_17*
dpkg -i build-root/vpp-plugins*

4. Edit the /etc/vpp/startup.conf start file so that it contains the following:

Important: Uncomment no-mulit-seg parameter. It disables jumbo packets handling and improves performances significantly.

unix {
  nodaemon
  log /tmp/vpp.log
  cli-listen localhost:5002
  full-coredump
}

dpdk {
     dev 0000:07:00.0
     dev 0000:07:00.1
     no-multi-seg

     dev default {
           num-rx-queues 2
     }
}

eplace the PCI slot numbers of ConnectX-4/5 interfaces marked in red from the example above with the correct IDs. To verify the correct id use:

lspci -nn | grep -i mel

07:00.0 Ethernet controller [0200]: Mellanox Technologies MT27620 Family [15b3:1013]

07:00.1 Ethernet controller [0200]: Mellanox Technologies MT27620 Family [15b3:1013]

5. Start VPP.

service vpp start

6. Enter the VPP Command Line Interface.


telnet localhost 5002

7. Configure L3 interfaces as shown in the example below:

VPP CLI

    _______    _        _   _____  ___
__/ __/ _ \  (_)__    | | / / _ \/ _ \
_/ _// // / / / _ \   | |/ / ___/ ___/
/_/ /____(_)_/\___/   |___/_/  /_/


vpp#  set int ip address HundredGigabitEthernet7/0/0 1.1.1.1/24
vpp#  set interface state HundredGigabitEthernet7/0/0 up
vpp#  set int ip address HundredGigabitEthernet7/0/1 2.2.2.2/24
vpp#  set interface state HundredGigabitEthernet7/0/1 up

vpp# show int
              Name               Idx       State          Counter          Count
HundredGigabitEthernet7/0/0      1         up
HundredGigabitEthernet7/0/1      2         up

vpp# show int address

HundredGigabitEthernet7/0/0 (up):  1.1.1.1/24
HundredGigabitEthernet7/0/1 (up):  2.2.2.2/24

local0 (dn):

 

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值