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):

 

已标记关键词 清除标记
【为什么还需要学习C++?】 你是否接触很多语言,但从来没有了解过编程语言的本质? 你是否想成为一名资深开发人员,想开发别人做不了的高性能程序? 你是否经常想要窥探大型企业级开发工程的思路,但苦于没有基础只能望洋兴叹?   那么C++就是你个人能力提升,职业之路进阶的不二之选。 【课程特色】 1.课程共19大章节,239课时内容,涵盖数据结构、函数、类、指针、标准库全部知识体系。 2.带你从知识与思想的层面从0构建C++知识框架,分析大型项目实践思路,为你打下坚实的基础。 3.李宁老师结合4大国外顶级C++著作的精华为大家推出的《征服C++11》课程。 【学完后我将达到什么水平?】 1.对C++的各个知识能够熟练配置、开发、部署; 2.吊打一切关于C++的笔试面试题; 3.面向物联网的“嵌入式”和面向大型化的“分布式”开发,掌握职业钥匙,把握行业先机。 【面向人群】 1.希望一站式快速入门的C++初学者; 2.希望快速学习 C++、掌握编程要义、修炼内功的开发者; 3.有志于挑战更高级的开发项目,成为资深开发的工程师。 【课程设计】 本课程包含3大模块 基础篇 本篇主要讲解c++的基础概念,包含数据类型、运算符等基本语法,数组、指针、字符串等基本词法,循环、函数、类等基本句法等。 进阶篇 本篇主要讲解编程中常用的一些技能,包含类的高级技术、类的继承、编译链接和命名空间等。 提升篇: 本篇可以帮助学员更加高效的进行c++开发,其中包含类型转换、文件操作、异常处理、代码重用等内容。
©️2020 CSDN 皮肤主题: 酷酷鲨 设计师:CSDN官方博客 返回首页