From 8d30141a410f0e46bc30223fc2d7893447bd1860 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 | 11 +---------- dash-pipeline/dpapp/init.config | 5 +++++ dash-pipeline/dpapp/startup.conf | 1 + 3 files changed, 7 insertions(+), 10 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..53e0cb5ce 100755 --- a/dash-pipeline/dpapp/dpapp.sh +++ b/dash-pipeline/dpapp/dpapp.sh @@ -5,13 +5,4 @@ sysctl vm.nr_hugepages=512 sysctl vm.max_map_count=1548 -/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 128e86dd5..c6d871f9e 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 {