summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build-root/vagrant/README43
-rw-r--r--build-root/vagrant/bootstrap.ubuntu1404.sh12
-rw-r--r--vpp-api-test/Makefile.am1
-rw-r--r--vpp-api-test/scripts/vppctl2
4 files changed, 32 insertions, 26 deletions
diff --git a/build-root/vagrant/README b/build-root/vagrant/README
index 04986154..05a3c652 100644
--- a/build-root/vagrant/README
+++ b/build-root/vagrant/README
@@ -1,43 +1,50 @@
-To run vpp with the debug shell:
+VPP has now been built, installed, and started.
-sudo ~vagrant/git/vpp/build-root/install-vpp_debug-native/vpp/bin/vpe unix interactive
+To give it a spin, we can create a tap interface and try a simple ping
+(with trace).
-which will result in a prompt that looks like:
+Make sure you have run:
-DBGvpd#
+$ vagrant ssh
-To give it a spin, we can create a tap interface and try a simple ping
-(with trace).
+To get to the vagrant VM:
+
+vagrant@localhost:~$
+
+Confirm that vpp is running with
+
+vagrant@localhost:~$ sudo status vpp
+vpp start/running, process 25202
To create the tap:
-DBGvpd# tap connect foobar
+vagrant@localhost:~$ sudo vppctl tap connect foobar
Created tap-0 for Linux tap 'foobar'
-DBGvpd# show int
+vagrant@localhost:~$ sudo vppctl show int
To assign it an ip address (and 'up' the interface):
-DBGvpd# set int ip address tap-0 192.168.1.1/24
-DBGvpd# set int state tap-0 up
+vagrant@localhost:~$ sudo vppctl set int ip address tap-0 192.168.1.1/24
+vagrant@localhost:~$ sudo vppctl set int state tap-0 up
To turn on packet tracing for the tap interface:
-DBGvpd# trace add tapcli-rx 10
+vagrant@localhost:~$ sudo vppctl trace add tapcli-rx 10
-Now, to set up and try the other end from the unix prompt:
-vagrant@vagrant-ubuntu-trusty-64:~$ sudo ip addr add 192.168.1.2/24 dev foobar
-vagrant@vagrant-ubuntu-trusty-64:~$ ping -c 3 192.168.1.1
+Now, to set up and try the other end:
+vagrant@localhost:~$ sudo ip addr add 192.168.1.2/24 dev foobar
+vagrant@localhost:~$ ping -c 3 192.168.1.1
-To look at the trace, back in the vpp CLI:
-DBGvpd# show trace
+To look at the trace:
+vagrant@localhost:~$ sudo vppctl show trace
And to stop tracing:
-DBGvpd# clear trace
+vagrant@localhost:~$ sudo vppctl clear trace
Other fun things to look at:
The vlib packet processing graph:
-DBGvpd# show vlib graph
+vagrant@localhost:~$ sudo vppctl show vlib graph
which will produce output like:
diff --git a/build-root/vagrant/bootstrap.ubuntu1404.sh b/build-root/vagrant/bootstrap.ubuntu1404.sh
index c89f098c..89cd4e8e 100644
--- a/build-root/vagrant/bootstrap.ubuntu1404.sh
+++ b/build-root/vagrant/bootstrap.ubuntu1404.sh
@@ -61,16 +61,12 @@ if [ -d build-root ]; then
# Build vpp
sudo -H -u vagrant make PLATFORM=vpp TAG=vpp_debug install-deb
- # Stick the dpdk module in the canonical place
- cp ./install-vpp_debug-native/dpdk/kmod/igb_uio.ko /lib/modules/`uname -r`/kernel/drivers/uio/
- depmod
+ # Install debian packages
+ dpkg -i *.deb
- # Load igb_uio into the kernel
- modprobe igb_uio
+ # Start vpp
+ start vpp
- # Make sure igb_uio loads at boot time
- # Make sure uio loads at boot time
- echo igb_uio >> /lib/modprobe.d/igb_uio.conf
cd ~vagrant/
cat /vagrant/README
diff --git a/vpp-api-test/Makefile.am b/vpp-api-test/Makefile.am
index a818d831..ae071bce 100644
--- a/vpp-api-test/Makefile.am
+++ b/vpp-api-test/Makefile.am
@@ -32,3 +32,4 @@ vpe_json_test_LDADD = -lvppinfra -lm
nobase_include_HEADERS = vat/vat.h vat/json_format.h
+dist_bin_SCRIPTS = scripts/vppctl
diff --git a/vpp-api-test/scripts/vppctl b/vpp-api-test/scripts/vppctl
new file mode 100644
index 00000000..b789493f
--- /dev/null
+++ b/vpp-api-test/scripts/vppctl
@@ -0,0 +1,2 @@
+#!/bin/bash
+echo exec ${@} | vpe_api_test | sed 's/vat# //g'