Skip to content

Latest commit

 

History

284 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

SONiC-VPP is a platform under SONIC that supports VPP data plane. For more details about VPP see What is VPP

This repo contains scripts, Makefiles, configuration file, Docker files etc to build a SONIC-VPP image. It also pulls some extra git repos and makes these repos part of SONiC build. In this process it will prompt for user/password while cloning. There are some VPP platform specific Makefile, config files which are applied to the sonic-buildimage repo to facilitate the successful build of the SONiC-VPP image.

Note: The first build takes good amount of time. The SONiC image build has two parts to it, backend and frontend. The backend consumes a lot of time when the build is done first time. The follow on builds only do the frontend.

Caveat- The documentation for this project is a work in progress and a bit terse. We hope to address this in coming weeks.

Prerequisites

  • Linux host machine running Debian 12 ("Bookwork)", Ubuntu 18.x or later distribution (Ubuntu 20.x is preferred).
  • Install the following packages
sudo apt-get install -y make automake autoconf
sudo apt install -y python3-pip
sudo pip3 install j2cli
  • Install Docker and configure your system to allow running the 'docker' command without 'sudo':
    • Add current user to the docker group: sudo gpasswd -a ${USER} docker
    • Log out and log back in so that your group membership is re-evaluated

SONiC VPP image build

There are two types of sonic-vpp image build targets supported

  • Single docker container image (docker-sonic-vpp.gz) with a subset of SONIC features
  • Comprehensive SONiC-VPP qemu VM image

Building a single container image

git clone --recurse-submodules https://github.com/sonic-net/sonic-buildimage.git
cd sonic-buildimage
make init
NOBULLSEYE=1 NOBUSTER=1 make configure PLATFORM=vpp
NOBULLSEYE=1 NOBUSTER=1 BUILD_SKIP_TEST=y INCLUDE_FIPS=n \
    make SONIC_BUILD_JOBS=4 target/docker-sonic-vpp.gz

The two extra flags are currently required for the single-container target:

  • INCLUDE_FIPS=n — the container pulls in libzmq3-dev, whose krb5-multidev dependency conflicts with the FIPS build of krb5 that ships in the base image when FIPS is enabled (the default). The single container is a reduced-feature demo/test image, so building it without FIPS is expected.
  • BUILD_SKIP_TEST=y — skips a currently-failing upstream sonic-host-services unit test (unrelated to VPP). Drop it once that test is fixed upstream.

The build takes a while the first time (it also builds the sonic-slave container images). The Docker daemon that runs inside the slave container needs the legacy iptables kernel modules loaded on the host:

sudo modprobe ip_tables iptable_nat iptable_filter

Testing the single container image

Refer to the Getting started document in docs directory for details.

Building a KVM VM image

  1. git clone --recurse-submodules https://github.com/sonic-net/sonic-buildimage.git
  2. make init
  3. NOBULLSEYE=1 NOBUSTER=1 make configure PLATFORM=vpp
  4. NOBULLSEYE=1 NOBUSTER=1 make SONIC_BUILD_JOBS=4 target/sonic-vpp.img.gz

Testing the qemu VM image

Refer to the document in docs directory for details.

Troubleshooting

http(s)_proxy driven make fails sometimes with package download failure. It says hash mismatch. This may be caused by some bug in the proxy which corrupts some bytes or downloaded package is incomplete. The fix is to run the make sonic_build again.

E: Failed to fetch http://debian-archive.trafficmanager.net/debian/pool/main/p/perl/libperl5.32_5.32.1-4%2bdeb11u2_amd64.deb  Hash Sum mismatch
   Hashes of expected file:
    - SHA256:224cafe65968deb83168113b74dff2d2f13b115a41d99eb209ed3b8f981df0b3
    - MD5Sum:4a5dab70f461660deab6fd03b2f991f6 [weak]
    - Filesize:4106072 [weak]
    - SHA512:6f65c014dc3d71538eeff28499e857315b001edf34b7d27f9ba63ba4ae84296b23a03cf4d3684f048d2cf3ae6591f961e808041015c8cbf87993b37fceae21fc
    - SHA1:70b59e8890820d4b278dee5bea5d6c09e94a5c6a [weak]
   Hashes of received file:
    - SHA512:62f8a2073aab62c19e5233c527057365e928d4c27eb37e0cb5081fd2982cda265ff7088baf4539af754333fa0625370e1b38e02715fba056e1f8bad1d589c2b1
    - SHA256:f7b2db46905d4209ffea09a103f8a1b6e836075a547d1cd173ea49a12ce2f6d0
    - SHA1:988a27690b32fafa9bed3a20574554bd27599e71 [weak]
    - MD5Sum:0816cefaa91ea671925de07760480d86 [weak]
    - Filesize:4106072 [weak]
   Last modification reported: Thu, 30 Sep 2021 21:42:11 +0000
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

About

No description or website provided.

Topics

Resources

Contributing

Stars

75 stars

Watchers

20 watching

Forks

Releases

Packages

Used by

Contributors

Languages