diff options
-rwxr-xr-x | build-root/emacs-lisp/make-plugin.sh | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | vpp-api-test/scripts/vppctl | 13 | ||||
-rw-r--r-- | vpp/conf/startup.conf | 1 | ||||
-rw-r--r-- | vppinfra/vppinfra/vec.h | 11 |
4 files changed, 24 insertions, 5 deletions
diff --git a/build-root/emacs-lisp/make-plugin.sh b/build-root/emacs-lisp/make-plugin.sh new file mode 100755 index 00000000000..4985974cac5 --- /dev/null +++ b/build-root/emacs-lisp/make-plugin.sh @@ -0,0 +1,4 @@ +#!/usr/bin/emacs --script +(load-file "./all-skel.el") +(make-plugin) +(save-some-buffers t) diff --git a/vpp-api-test/scripts/vppctl b/vpp-api-test/scripts/vppctl index b789493f2be..90828f6773b 100644..100755 --- a/vpp-api-test/scripts/vppctl +++ b/vpp-api-test/scripts/vppctl @@ -1,2 +1,13 @@ #!/bin/bash -echo exec ${@} | vpe_api_test | sed 's/vat# //g' +if [ $# -gt 0 ]; then + echo exec ${@} | vpe_api_test | sed 's/vat# //g' +else + echo -n "vpp# " + while read CMD; do + if [ $CMD == "exit" ]; then + exit + fi + echo exec $CMD | vpe_api_test | sed 's/vat# //g' + echo -n "vpp# " + done +fi diff --git a/vpp/conf/startup.conf b/vpp/conf/startup.conf index 5ce860b3252..51a46d7a132 100644 --- a/vpp/conf/startup.conf +++ b/vpp/conf/startup.conf @@ -3,6 +3,7 @@ unix { nodaemon log /tmp/vpe.log full-coredump + cli-listen localhost:5002 } api-trace { diff --git a/vppinfra/vppinfra/vec.h b/vppinfra/vppinfra/vec.h index 3e8d7c023a4..79954f3dbd1 100644 --- a/vppinfra/vppinfra/vec.h +++ b/vppinfra/vppinfra/vec.h @@ -59,10 +59,13 @@ ... ~~~~~~~~ - A user is returned a pointer to element # 1. - Null pointer vectors are valid and mean a zero length vector. - You can also have an allocated non-null zero length vector by just - setting the vector length field to zero (e.g. _vec_len (v) = 0). + The user pointer contains the address of vector element # 0. Null + pointer vectors are valid and mean a zero length vector. + + You can reset the length of an allocated vector to zero via the + vec_reset_length(v) macro, or by setting the vector length field to + zero (e.g. _vec_len (v) = 0). Vec_reset_length(v) preferred: it + understands Null pointers. Typically, the header is not present. Headers allow for other data structures to be built atop CLIB vectors. |