From 21306ad18d43f69164af572822a805a3ec8c5cd6 Mon Sep 17 00:00:00 2001 From: Junhua Zhai Date: Wed, 6 Nov 2024 00:12:23 +0000 Subject: [PATCH] Update dpapp/dpapp.sh --- dash-pipeline/dpapp/dpapp.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dash-pipeline/dpapp/dpapp.sh b/dash-pipeline/dpapp/dpapp.sh index 235fa41e2..1f485fa58 100755 --- a/dash-pipeline/dpapp/dpapp.sh +++ b/dash-pipeline/dpapp/dpapp.sh @@ -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