Comments (3)
Working notes for enabling and using VFs from Mellanox ConnectX-4 NIC
Update kernel parameters:
- Edit /etc/default/grub
- Add: "iommu=pt intel_iommu=on hugepagesz=2M hugepages=10240 isolcpus=2,4,6 nohz_full=2,4,6 rcu_nocbs=2,4,6"
- $ update-grub2
- Reboot machine
- $ echo 5120 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
- $ echo 5120 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
Installed Mellanox OFED drivers:
- http://content.mellanox.com/ofed/MLNX_OFED-4.4-1.0.0.0/MLNX_OFED_LINUX-4.4-1.0.0.0-ubuntu18.04-x86_64.tgz
- ./mlnxofedinstall ((--dpdk --upstream-libs --force))
- Might be necessary to install without the extra options (( )) to have tools available to enable VFs on the hardware (see DOC-2386 - Link below)
- Installs drivers and necessary additions for use with DPDK
Enable VFs
- echo 8 > /sys/class/net/enp94s0f0/device/sriov_numvfs
- Check the interface name before calling command
- Not persistent through reboots
Refer to Mellanox documentation for useful commands and configuration notes:
- https://community.mellanox.com/docs/DOC-2386
- https://community.mellanox.com/docs/DOC-2729
- Building and installing VPP with MLX5 support
Build VPP:
- Install VPP v18.07 (Refer to mellanox document above)
- git clone https://gerrit.fd.io/r/vpp
- cd vpp/
- git checkout tags/v18.07
- sed -i '/vpp_uses_dpdk_mlx5_pmd/s/^# //g' build-data/platforms/vpp.mk
- make install-dep
- make dpdk-install-dev DPDK_MLX5_PMD=y
- make build-release
- make pkg-deb vpp_uses_dpdk_mlx5_pmd=yes
- dpkg -i build-root/vpp-lib*
- dpkg -i build-root/vpp_18*
- dpkg -i build-root/vpp-plugins*
- ( Set the number of hugepages to 5120 again (see above) )
Enable VFs
- echo 8 > /sys/class/net/enp94s0f0/device/sriov_numvfs
- Check the interface name before calling command
from cnf-testbed.
Behavior has been confirmed on two nodes, both hanging when trying to "up" VF interfaces in VPP
from cnf-testbed.
Working solution (VPP v18.04, DPDK 18.02.1)
Start by getting the correct version of VPP:
- git clone https://gerrit.fd.io/r/vpp
- cd vpp/
- git checkout tags/v18.04
Add the following patches to the code:
diff --git a/dpdk/deb/debian/rules b/dpdk/deb/debian/rules
index 98b1048b..b9a58636 100755
--- a/dpdk/deb/debian/rules
+++ b/dpdk/deb/debian/rules
@@ -8,7 +8,7 @@ BASE_VER = $(word 1, $(subst -, ,$(VERSION)))
export DPDK_BUILD_DIR=$(CURDIR)/_build
export DPDK_INSTALL_DIR=$(CURDIR)/debian/tmp/usr
-SRC=_build/dpdk-$(BASE_VER)
+SRC=$(wildcard _build/dpdk*$(BASE_VER))
MAKE_ARGS=-C ..
diff --git a/src/vpp-api/java/Makefile.am b/src/vpp-api/java/Makefile.am
index 21a18575..5e9e53a4 100644
--- a/src/vpp-api/java/Makefile.am
+++ b/src/vpp-api/java/Makefile.am
@@ -71,9 +71,7 @@ jvpp-registry/io_fd_vpp_jvpp_VppJNIConnection.h: $(jvpp_registry_src_files)
@echo " JVPP GEN $@"
@rm -rf jvpp-registry/target
@mkdir -p jvpp-registry/target
- @$(JAVAC) -d jvpp-registry/target $^
- @$(JAVAH) -force -classpath jvpp-registry/target -d jvpp-registry io.fd.vpp.jvpp.VppJNIConnection
- @$(JAVAH) -force -classpath jvpp-registry/target -d jvpp-registry io.fd.vpp.jvpp.JVppRegistryImpl
+ @$(JAVAC) -source 8 -target 8 -d jvpp-registry/target -h jvpp-registry $^
@touch jvpp-registry.ok
define japigen
@@ -83,11 +81,8 @@ define japigen
-i $(jvpp_$(1)_json_files)
@find jvpp-$(1)/target -name \*.java > jvpp-$(1).generated.files
@find @srcdir@/jvpp-$(1) -name \*.java > jvpp-$(1).static.files
- @$(JAVAC) -classpath jvpp-registry/target \
- -d jvpp-$(1)/target @jvpp-$(1).generated.files @jvpp-$(1).static.files
- @$(JAVAH) -force \
- -classpath jvpp-registry/target:jvpp-$(1)/target \
- -d jvpp-$(1) io.fd.vpp.jvpp.$(1).$(2)
+ @$(JAVAC) -source 8 -target 8 -classpath jvpp-registry/target \
+ -d jvpp-$(1)/target -h jvpp-$(1) @jvpp-$(1).generated.files @jvpp-$(1).static.files
endef
#
Continue following the steps above, starting at the following:
- sed -i '/vpp_uses_dpdk_mlx5_pmd/s/^# //g' build-data/platforms/vpp.mk
- ...
from cnf-testbed.
Related Issues (20)
- Two issues seen with current vSwitch (VPP) installation HOT 1
- K8s provisioning ansible task fails - dict object' has no attribute 'v1.18' HOT 11
- Update k8s-infra to dynamically use latest kubespray release HOT 1
- Create stand-alone Example VPP IP Forwarder CNF
- Update remaining images and use-cases (VPP and GoGTP) HOT 1
- NSM install fails after fresh cnf testbed setup HOT 5
- Cluster starts misbehaving after a while HOT 3
- Move/cleanup old and outdated "baseline" directories
- Packetgen provisioning through Ansible fails
- Incorrect configuration for VPP in 3c2n based use-cases HOT 1
- VLAN creation issues deploying cnf-testbed to Packet HOT 5
- [Documentation] update Install Guide HOT 1
- [Documentation] update README
- Add diagram to snake and pipeline use cases HOT 2
- [Maintenance] Review Packet resources in use HOT 13
- Cleanup of unused content (scripts, playbooks, roles)
- Issue with Kubespray v2.14.0 (likely related to Multus configuration) HOT 4
- Update use of Packet to Equinix Metal HOT 1
- How to control the behavior of enb? HOT 23
- New Equinix Metal server type "n3.xlarge"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cnf-testbed.