-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
#!/bin/bash | ||
set -m | ||
|
||
[ -d /var/log/vpp ] || mkdir -p /var/log/vpp | ||
|
||
sysctl vm.nr_hugepages=512 | ||
sysctl vm.max_map_count=1548 | ||
sysctl vm.nr_hugepages=32 | ||
|
||
/usr/bin/vpp -c ${1:-/etc/vpp/startup.conf} & | ||
sleep 3 | ||
|
||
# Create a host interface which connects p4 bmv2 simple_switch | ||
HOST_INTERFACE=${HOST_INTERFACE:-veth5} | ||
vppctl create host-interface name $HOST_INTERFACE | ||
vppctl set interface mac address host-$HOST_INTERFACE 02:fe:23:f0:e4:13 | ||
HOST_INTERFACE_MAC=`cat /sys/class/net/$HOST_INTERFACE/address` | ||
vppctl create host-interface name $HOST_INTERFACE hw-addr $HOST_INTERFACE_MAC | ||
vppctl set interface state host-$HOST_INTERFACE up | ||
vppctl set interface promiscuous on host-$HOST_INTERFACE | ||
vppctl | ||
|
||
# Move vpp to foreground | ||
fg %1 |