summaryrefslogtreecommitdiffstats
path: root/starlingx/demo/firewall-sriov
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2020-02-26 19:38:52 +0800
committerBin Yang <bin.yang@windriver.com>2020-02-26 19:38:52 +0800
commitc9c09d43c268d674b7567b4546020935fbd3c60d (patch)
tree3662de72365f17035d741062e14d5d6437f74383 /starlingx/demo/firewall-sriov
parentbc6c2db66326040062fca588ea5a23e963b3b784 (diff)
Fix script for cFW with sriov netdevice
Change-Id: I3a32bdb17f613092494c80bb9262f6b40f2201fc Issue-ID: MULTICLOUD-999 Signed-off-by: Bin Yang <bin.yang@windriver.com>
Diffstat (limited to 'starlingx/demo/firewall-sriov')
-rw-r--r--starlingx/demo/firewall-sriov/charts/pktgen-sriov/resources/scripts/init/vpg_start.sh6
-rw-r--r--starlingx/demo/firewall-sriov/resources/scripts/init/vfw_start.sh12
2 files changed, 15 insertions, 3 deletions
diff --git a/starlingx/demo/firewall-sriov/charts/pktgen-sriov/resources/scripts/init/vpg_start.sh b/starlingx/demo/firewall-sriov/charts/pktgen-sriov/resources/scripts/init/vpg_start.sh
index 936e9d53..ce9504ce 100644
--- a/starlingx/demo/firewall-sriov/charts/pktgen-sriov/resources/scripts/init/vpg_start.sh
+++ b/starlingx/demo/firewall-sriov/charts/pktgen-sriov/resources/scripts/init/vpg_start.sh
@@ -34,11 +34,15 @@ done
echo 'configure vpp ...'
+ifconfig veth11 0.0.0.0
+ifconfig veth11 down
+
+HWADDR1=$(ifconfig veth11 |grep ether | tr -s ' ' | cut -d' ' -f 3)
vppctl -s /run/vpp/cli-vpp1.sock show ver
vppctl -s /run/vpp/cli-vpp1.sock show threads
-vppctl -s /run/vpp/cli-vpp1.sock create host-interface name veth11
+vppctl -s /run/vpp/cli-vpp1.sock create host-interface name veth11 hw-addr $HWADDR1
vppctl -s /run/vpp/cli-vpp1.sock set int state host-veth11 up
diff --git a/starlingx/demo/firewall-sriov/resources/scripts/init/vfw_start.sh b/starlingx/demo/firewall-sriov/resources/scripts/init/vfw_start.sh
index fd44793e..c9c251c7 100644
--- a/starlingx/demo/firewall-sriov/resources/scripts/init/vfw_start.sh
+++ b/starlingx/demo/firewall-sriov/resources/scripts/init/vfw_start.sh
@@ -32,16 +32,24 @@ done
echo 'configure vpp ...'
+ifconfig veth12 0.0.0.0
+ifconfig veth12 down
+ifconfig veth21 0.0.0.0
+ifconfig veth21 down
+
+HWADDR1=$(ifconfig veth12 |grep ether | tr -s ' ' | cut -d' ' -f 3)
+HWADDR2=$(ifconfig veth21 |grep ether | tr -s ' ' | cut -d' ' -f 3)
+
vppctl -s /run/vpp/cli-vpp2.sock show ver
vppctl -s /run/vpp/cli-vpp2.sock show threads
-vppctl -s /run/vpp/cli-vpp2.sock create host-interface name veth12
+vppctl -s /run/vpp/cli-vpp2.sock create host-interface name veth12 hw-addr $HWADDR1
vppctl -s /run/vpp/cli-vpp2.sock set int state host-veth12 up
vppctl -s /run/vpp/cli-vpp2.sock set int ip address host-veth12 10.10.1.1/24
-vppctl -s /run/vpp/cli-vpp2.sock create host-interface name veth21
+vppctl -s /run/vpp/cli-vpp2.sock create host-interface name veth21 hw-addr $HWADDR2
vppctl -s /run/vpp/cli-vpp2.sock set int state host-veth21 up