Age | Commit message (Collapse) | Author | Files | Lines |
|
Changed vat_api_hookup(...) to <plugin-name>_api_hookup, change to
static functions. Fixed the related emacs-lisp plugin skeleton.
Change-Id: Id14f8fc3138751f469d48fecb26175e938f5f028
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
In the CLI parsing, below is a common pattern:
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
return 0;
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (line_input, "x"))
x = 1;
:
else
return clib_error_return (0, "unknown input `%U'",
format_unformat_error, line_input);
}
unformat_free (line_input);
The 'else' returns if an unknown string is encountered. There a memory
leak because the 'unformat_free(line_input)' is not called. There is a
large number of instances of this pattern.
Replaced the previous pattern with:
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
return 0;
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (line_input, "x"))
x = 1;
:
else
{
error = clib_error_return (0, "unknown input `%U'",
format_unformat_error, line_input);
goto done:
}
}
/* ...Remaining code... */
done:
unformat_free (line_input);
return error;
}
In multiple files, 'unformat_free (line_input);' was never called, so
there was a memory leak whether an invalid string was entered or not.
Also, there were multiple instance where:
error = clib_error_return (0, "unknown input `%U'",
format_unformat_error, line_input);
used 'input' as the last parameter instead of 'line_input'. The result
is that output did not contain the substring in error, instead just an
empty string. Fixed all of those as well.
There are a lot of file, and very mind numbing work, so tried to keep
it to a pattern to avoid mistakes.
Change-Id: I8902f0c32a47dd7fb3bb3471a89818571702f1d2
Signed-off-by: Billy McFall <bmcfall@redhat.com>
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Disguise the string "fd.io coding-style blah blah blah" to avoid spurious
checkstyle failures on the emacs lisp code. DGMS.
Change-Id: I6b88d9588dff7d67c6e509052ae4f32529684de7
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Instead, have them accept and assign a return paramter leaving
the return control flow up to the caller. Clean up otherwise
misleading returns present even after "NOT REACHED" comments.
Change-Id: I0861921f73ab65d55b95eabd27514f0129152723
Signed-off-by: Jon Loeliger <jdl@netgate.com>
|
|
Rather than rely on an unbound variable, explicitly introduce
the timeout variable within the 'do { ... } while (0)' construct
as a block-local variable.
Change-Id: I6e78635290f9b5ab3f56b7f116c5fa762c88c9e9
Signed-off-by: Jon Loeliger <jdl@netgate.com>
|
|
Rather than blindly assume an unbound, fixed message parameter
explicilty pass it as a paramter to the S() macro.
Change-Id: Ieea1f1815cadd2eec7d9240408d69acdc3caa49a
Signed-off-by: Jon Loeliger <jdl@netgate.com>
|
|
Now that all the M() and M2() uses properly supply a message
pointer as second parameter, fix the macros to use it.
Change-Id: I0b8f4848416c3fa2e06755ad6ea7171b7c546124
Signed-off-by: Jon Loeliger <jdl@netgate.com>
|
|
Rather than maintain (?) an unused second parameter, t, and pull
an unbound message pointer, mp, out of context, explicitly list
the message pointer as the second parameter.
Change-Id: I92143efda6211cdf6b935470f8c71579742a6b64
Signed-off-by: Jon Loeliger <jdl@netgate.com>
|
|
- remove unused stuff
- add --quiet flag to libtool
- avoid building some tests programs when tests are not enabled
Change-Id: Ie34aeec1a598ad811256a00354f66cfddae9d0b9
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Generated code compiles with the new build scheme, works, etc.
Change-Id: I147aa5fa580a71ef25615b02277870867e475042
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
vppapigen now generates per-message crcs. Verified that whitespace
and real changes in message A don't change the crc for message B, etc.
Fixed the sample and flowperpkt plugins to participate. Others need
the same treatment. They don't build due to python/java language binding
build issues.
To use the scheme:
Client connects as usual.
Then call: u32 vl_api_get_msg_index(char * name_and_crc)
name_and_crc is a string like: "flowperpkt_tx_interface_add_del_753301f3",
aka the message name with _%08x <expected crc> appended.
Try these vpp-api-test commands to play with it:
vat# dump_msg_api_table
<snip>
[366]: punt_reply_cca27fbe
[367]: ipsec_spd_dump_5e9ae88e
[368]: ipsec_spd_details_6f7821b0
[369]: sample_macswap_enable_disable_0f2813e2
[370]: sample_macswap_enable_disable_reply_476738e5
[371]: flowperpkt_tx_interface_add_del_753301f3
[372]: flowperpkt_tx_interface_add_del_reply_d47e6e0b
vat# get_msg_id sample_macswap_enable_disable_reply_476738e5
'sample_macswap_enable_disable_reply_476738e5' has message index 370
vat# get_msg_id sample_macswap_enable_disable_reply_476738e3
'sample_macswap_enable_disable_reply_476738e3' not found
CRCs may vary, etc.
vppapigen is used to build a set of JSON representations
of each API file from vpp-api/Makefile.am and that is in
turn used by each language binding (Java, Python, Lua).
Change-Id: I3d64582e779dac5f20cddec79c562c288d8fd9c6
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Change-Id: Ic0a1479e4a0408a4b93f47e50752d07c2bdccdde
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I208be749350ddb093ecfae149d420f580846c52a
Signed-off-by: Ed Warnicke <eaw@cisco.com>
|
|
Change-Id: I39722d7b778e6e0dc5a2d12d005c102845159116
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: Ifd2249c0152805e7b23c4629acce31634dca6f04
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I08ed983f594072bc8c72202e77205a7789eea599
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I46ae6badcccd14c0e34f1a19187749980baba3ac
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
|
|
Change-Id: I239143f920285050ad85244ece6893236195534f
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I2f336331463cedb2703150b003761e5c6e4431e8
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
|
|
Change-Id: Ibb569b745954a11fb9c7751ad2d4140b922478fe
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I816de8b1f255dc3bc6d2904566ea0b0f68fac5d8
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: If2d57a213fc2fec996db26df332910c3d2105f97
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I52b370abd8b6fec34b8219a274f2de404e072a97
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I22cb443c4bd0bf298abb6f06e8e4ca65a44a2854
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: Ieb2e4043fc7bc3b4a5436a7a6aa35f573d8d4506
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
- rename skels so M-x skel-<tab> gives catalog
Change-Id: Ice25a4ce4d02d09e076f0de51e8443cfab20688d
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
|
|
Change-Id: I4aafad8a3e4c0c57eef1940fac8debfb80bbb137
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
|
|
including vppinfra header files.
Change-Id: I961c602e0ccd2048fac633b5aeebb8c3cd0899fb
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
|
|
Change-Id: I9b4d0faad20e8cad1ab347d3f3f7d2c063e3d495
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: Ib4d1ee94706711939e03704c655ba355a8f82439
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: Id71147a8d5e30aadfb90dc10ea9468cf36ef23a8
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: Ib246f1fbfce93274020ee93ce461e3d8bd8b9f17
Signed-off-by: Ed Warnicke <eaw@cisco.com>
|