Skip to content

Commit

Permalink
[#40, #41, #42] WIP - vBNG (CNF) and Pktgen updated
Browse files Browse the repository at this point in the history
Switching from SR-IOV to VPP in host. Additional code cleanup needed
  • Loading branch information
michaelspedersen committed Aug 23, 2018
1 parent 6a4f85c commit 4d7a82e
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 30 deletions.
9 changes: 6 additions & 3 deletions comparison/box-by-box-kvm-docker/Pktgen/nfvbench_config.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,14 @@ traffic_generator:
# - Below is an example of using two chains:
# - mac_addrs_left: ['00:00:00:00:01:00', '00:00:00:00:02:00']
# - mac_addrs_right: ['00:00:00:00:01:01', '00:00:00:00:02:01']
ip_addrs: ['10.3.0.120/32', '10.1.0.120/32']
#ip_addrs: ['10.3.0.120/32', '10.1.0.120/32']
ip_addrs: ['10.0.0.0/8', '20.0.0.0/8']
ip_addrs_step: 0.0.0.1
tg_gateway_ip_addrs: ['10.3.0.50', '10.1.0.50']
#tg_gateway_ip_addrs: ['10.3.0.50', '10.1.0.50']
tg_gateway_ip_addrs: ['1.1.0.100', '2.2.0.100']
tg_gateway_ip_addrs_step: 0.0.0.1
gateway_ip_addrs: ['10.3.0.10', '10.1.0.10']
#gateway_ip_addrs: ['10.3.0.10', '10.1.0.10']
gateway_ip_addrs: ['1.1.0.10', '2.2.0.10']
gateway_ip_addrs_step: 0.0.0.1
udp_src_port:
udp_dst_port:
Expand Down
14 changes: 12 additions & 2 deletions comparison/box-by-box-kvm-docker/install_vpp_prereqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,31 @@ fi
#DISTRIB_CODENAME=bionic
#DISTRIB_DESCRIPTION="Ubuntu 18.04 LTS"

curl -L https://packagecloud.io/fdio/release/gpgkey |sudo apt-key add -
rm /etc/apt/sources.list.d/99fd.io.list
echo "deb [trusted=yes] https://packagecloud.io/fdio/release/ubuntu/ bionic main" | tee -a /etc/apt/sources.list.d/99fd.io.list
apt-get update
apt-get install -y vpp vpp-lib vpp-plugins vpp-dbg vpp-dev vpp-api-java vpp-api-python vpp-api-lua

exit 0

## Seeing if this can be simplified ##

if [ "$DISTRIB_CODENAME" == "bionic" ]; then
# Install VPP 18.07
curl -L https://packagecloud.io/fdio/1807/gpgkey |sudo apt-key add -
rm /etc/apt/sources.list.d/99fd.io.list
echo "deb [trusted=yes] https://packagecloud.io/fdio/1807/ubuntu/ bionic main" | tee -a /etc/apt/sources.list.d/99fd.io.list
apt-get update
apt-get install -y vpp vpp-lib vpp-plugins vpp-dbg vpp-dev vpp-api-java vpp-api-python vpp-api-lua
apt-get install vpp vpp-lib vpp-plugins vpp-dbg vpp-dev vpp-api-java vpp-api-python vpp-api-lua
elif [ "$DISTRIB_CODENAME" == "xenial" ]; then
# Install VPP 18.04 (stable)
export UBUNTU="xenial"
export RELEASE=".stable.1804"
rm /etc/apt/sources.list.d/99fd.io.list
echo "deb [trusted=yes] https://nexus.fd.io/content/repositories/fd.io$RELEASE.ubuntu.$UBUNTU.main/ ./" | tee -a /etc/apt/sources.list.d/99fd.io.list
sudo apt-get update
apt-get install -y vpp vpp-lib vpp-plugins vpp-dbg vpp-dev vpp-api-java vpp-api-python vpp-api-lua
apt-get install vpp vpp-lib vpp-plugins vpp-dbg vpp-dev vpp-api-java vpp-api-python vpp-api-lua
touch /etc/vpp/setup.gate
sed -i '8i\ startup-config /etc/vpp/setup.gate' /etc/vpp/startup.conf
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ cpu {
dpdk {
## Change default settings for all intefaces
dev default {
#dev default {
## Number of receive queues, enables RSS
## Default is 1
#num-rx-queues 2
Expand All @@ -104,10 +104,10 @@ dpdk {
## VLAN strip offload mode for interface
## Default is off
# vlan-strip-offload on
}
#}
## Whitelist specific interface by specifying PCI address
dev 0000:18:00.0 dev 0000:18:00.1
dev 0000:18:00.2
## Whitelist specific interface by specifying PCI address and in
## addition specify custom parameters for this interface
Expand Down Expand Up @@ -169,26 +169,16 @@ EOF

# Create interface configuration for VPP
bash -c "cat > /etc/vpp/setup.gate" <<EOF
set int state TenGigabitEthernet18/0/0 up
set interface ip address TenGigabitEthernet18/0/0 10.3.0.10/24
set int state TenGigabitEthernet18/0/1 up
set interface ip address TenGigabitEthernet18/0/1 10.1.0.10/24
set ip arp static TenGigabitEthernet18/0/0 10.3.0.120 3c:fd:fe:a8:ab:98
set ip arp static TenGigabitEthernet18/0/1 10.1.0.120 3c:fd:fe:a8:ab:99
#bin memif_socket_filename_add_del add id 1 filename /run/vpp/memif1.sock
#bin memif_socket_filename_add_del add id 2 filename /run/vpp/memif2.sock
#create interface memif id 1 socket-id 1 hw-addr 52:54:00:00:00:aa slave
#create interface memif id 2 socket-id 2 hw-addr 52:54:00:00:00:bb slave
#set int ip addr memif1/1 10.3.0.10/24
#set int ip addr memif2/2 10.1.0.10/24
#set int state memif1/1 up
#set int state memif2/2 up
#set ip arp static memif1/1 10.3.0.120 52:54:00:00:00:cc
#set ip arp static memif2/2 10.1.0.120 52:54:00:00:00:dd
bin memif_socket_filename_add_del add id 1 filename /run/vpp/memif1.sock
bin memif_socket_filename_add_del add id 2 filename /run/vpp/memif2.sock
create interface memif id 1 socket-id 1 hw-addr 52:54:00:00:00:aa slave
create interface memif id 2 socket-id 2 hw-addr 52:54:00:00:00:bb slave
set int ip addr memif1/1 10.3.0.10/24
set int ip addr memif2/2 10.1.0.10/24
set int state memif1/1 up
set int state memif2/2 up
set ip arp static memif1/1 10.3.0.120 3c:fd:fe:a8:ab:98
set ip arp static memif2/2 10.1.0.120 3c:fd:fe:a8:ab:99
EOF

Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ fi

# Below 'if running' Should not be needed, but keeping for now
if [ -z "$(docker ps | grep vBNG)" ]; then
docker run --privileged --cpus 3 --cpuset-cpus 7-9 --device=/dev/hugepages:/dev/hugepages -v "/etc/vpp/sockets/:/run/vpp/" -v "/dev:/dev" -t -d --name vBNG vbng /usr/bin/vpp -c /etc/vpp/startup.conf
#docker run --privileged --cpus 3 --cpuset-cpus 7-9 --device=/dev/hugepages:/dev/hugepages -v "/etc/vpp/sockets/:/run/vpp/" -v "/dev:/dev" -t -d --name vBNG vbng /usr/bin/vpp -c /etc/vpp/startup.conf
docker run --privileged --cpus 3 --cpuset-cpus 7-9 --device=/dev/hugepages:/dev/hugepages -v "/etc/vpp/sockets/:/run/vpp/" -t -d --name vBNG vbng /usr/bin/vpp -c /etc/vpp/startup.conf
fi
echo "vBNG container running"

0 comments on commit 4d7a82e

Please sign in to comment.