From 8031721670c768776a83fd482f0739b5c23a7e53 Mon Sep 17 00:00:00 2001 From: Junhua Zhai Date: Wed, 6 Nov 2024 00:12:23 +0000 Subject: [PATCH] Add init.config in dpapp --- dash-pipeline/dpapp/dpapp.sh | 14 ++------------ dash-pipeline/dpapp/init.config | 5 +++++ dash-pipeline/dpapp/startup.conf | 1 + 3 files changed, 8 insertions(+), 12 deletions(-) create mode 100644 dash-pipeline/dpapp/init.config diff --git a/dash-pipeline/dpapp/dpapp.sh b/dash-pipeline/dpapp/dpapp.sh index 235fa41e2..12bf7dbbf 100755 --- a/dash-pipeline/dpapp/dpapp.sh +++ b/dash-pipeline/dpapp/dpapp.sh @@ -2,16 +2,6 @@ [ -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 -vppctl set interface state host-$HOST_INTERFACE up -vppctl set interface promiscuous on host-$HOST_INTERFACE -vppctl +/usr/bin/vpp -c ${1:-/etc/vpp/startup.conf} diff --git a/dash-pipeline/dpapp/init.config b/dash-pipeline/dpapp/init.config new file mode 100644 index 000000000..b83e84dd0 --- /dev/null +++ b/dash-pipeline/dpapp/init.config @@ -0,0 +1,5 @@ +# Create a host interface which connects p4 bmv2 simple_switch +create host-interface name veth5 +set interface mac address host-veth5 02:fe:23:f0:e4:13 +set interface state host-veth5 up +set interface promiscuous on host-veth5 diff --git a/dash-pipeline/dpapp/startup.conf b/dash-pipeline/dpapp/startup.conf index cb9330037..aa8e51dd9 100644 --- a/dash-pipeline/dpapp/startup.conf +++ b/dash-pipeline/dpapp/startup.conf @@ -4,6 +4,7 @@ unix { full-coredump cli-listen /run/vpp/cli.sock gid vpp + startup-config /dash/dash-pipeline/dpapp/init.config } api-trace {