Skip to content

Commit

Permalink
Update dpapp/dpapp.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyzhai committed Nov 14, 2024
1 parent e84b2ac commit 27c84a6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions dash-pipeline/dpapp/dpapp.sh
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

0 comments on commit 27c84a6

Please sign in to comment.