Age | Commit message (Collapse) | Author | Files | Lines |
|
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I030f75234a346ef6a20640c1a0ed65f4934867f2
|
|
Type: style
Change-Id: Ib8febf8ea83f7ce1aeb93f227d00d3111fbef4ab
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Type: fix
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Change-Id: I6b42bb9fb9d2e57f523022e321770bb1ff7415f3
|
|
Type: fix
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Change-Id: Id47e3f2c348f07c84d9c2499122fa25d6c74fb13
|
|
Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Idc9c508eb0e3d4b0c3908360fb0771012a8e2bc0
|
|
Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Icab769607c4a5890dc80b8f2661faa7e297c2a27
|
|
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: If75f63244f37ae3312832ca015f738c51ee7da1f
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Split generation of API message enum and the typedefs into
separate files, so that the type file can be included from
elsewhere.
Generate a C file for VPP that contains the API registration,
this was previously done via X macros by the C pre-
processor.
This allows deleting lots of skeleton/copy paste code
for each feature.
plugins/flowprobe
plugins/map
examples/sample-plugin
vnet/ipip
used as Guinea pigs.
Generate a C Test file for VAT, that does the same for VAT plugins.
Also add support for a per-message CLI option, that is currently
limited to VAT help text. option vat_help = "<help text>";
Type: refactor
Change-Id: I245e3104bb76f7e1fb69a59ab20cc7c8dfcdd460
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
One type for address with prefix and one type for prefix.
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Icfec51d9b7d5cde1d69fbecdd97498688ab7b295
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ie775cf3469d761847ac39cf0d80a3ec6463b7928
|
|
- changes vppapigen to only process an import once.
Type: fix
Change-Id: Ifcbcfcc69fdfb80d63195a17701762d0c239d7b4
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
In addition to the external vppapitrace tool, VPP itself supports dumping of API trace files.
In two formats, "custom-dump" and "dump". "dump" gives a human friendly list,
and "custom-dump" is meant to give a list of commands that can be fed to VAT.
This patch only deals with "dump".
Prior to this fix, auto-generation was only done for the basic types.
This fix adds support for any type, including lists, and supports pretty-printing
of enums, strings, IP addresses, MAC addresses and so on.
Usage: api trace dump <api-trace-file>
For example
Change-Id: I4e485680e6dcfce7489299ae6cf31d835071ac40
---------- trace 48 -----------
vl_api_sw_interface_set_flags_t:
_vl_msg_id: 75
client_index: 0
context: 10
sw_if_index: 1
flags: IF_STATUS_API_FLAG_ADMIN_UP
---------- trace 49 -----------
vl_api_sw_interface_add_del_address_t:
_vl_msg_id: 88
client_index: 0
context: 11
sw_if_index: 1
is_add: 1
del_all: 0
prefix: 172.16.1.1/24
---------- trace 51 -----------
vl_api_cli_inband_t:
_vl_msg_id: 819
client_index: 0
context: 13
cmd: packet-generator capture pg0 pcap /tmp/vpp-unittest-TestMAP-YhcmDX/pg0_out.pcap disable
---------- trace 58 -----------
vl_api_ip_neighbor_add_del_t:
_vl_msg_id: 199
client_index: 0
context: 20
is_add: 1
neighbor:
sw_if_index: 2
flags: IP_API_NEIGHBOR_FLAG_NONE
mac_address: 0202.0000.ff02
ip_address: fd01:2::2
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I5556d06008de2762e7c2d35a8b0963ae670b3db1
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
This is needed for macos where /usr/bin/python[23] does not exist
and /usr/bin is write protected
Type: fix
Change-Id: Ia1b3c732248c78482993de532fa2ea96e376d90a
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
|
|
Enforce that variable length fields are the last element of API messages.
Add a 'fixed' version of string type, since dealing with
multiple variable length strings turned out too painful
for the C language bindings.
The string type is now:
{
string name[64]; // NUL terminated C-string. Essentially decays to u8 name[64]
string name[]; // Variable length string with embedded len field (vl_api_string_t)
};
The latter notation could be made available to other types as well.
e.g.
{
vl_api_address_t addresses[];
}
instead of
{
u32 n_addr;
vl_api_address_t addresses[n_addr];
};
Type: fix
Change-Id: I18fa17ef47227633752ab50453e8d20a652a9f9b
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
vppapigen has remapped legacy to typedefs behind the scenes
for some time now.
- update .api files to use new style typedefs.
- issue error on 'typeonly define' in .api files
- remove unneeded macros redefining vl_noop_handler
Type: refactor
Change-Id: I7a8c4a6dafacee6a131f95cd0e9b03a8c60dea8b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
vppapigen has been running under python3 for months.
Remove the python2 conditional code.
In case of an error, explicitly log and return non-0.
Type: refactor
Change-Id: I20a73e0f2cb875aab6441959a85a35e88c9f8250
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
When working on the lb api, one of the field names was chosen as 'as'
(application server). Since 'as' is a python keyword, the field was
renamed to _1 in vpp_papi.
This changeset instead fails early with a descriptive message,
hopefully saving others time troubleshooting the issue.
ValueError: Fieldname 'as' is a python keyword and
is not accessible via the python API.
Type: feature
Change-Id: Ib048d97de0e392645540092e356cf8989848c947
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
The previous change seems to affect all CRCs.
Type: fix
Fixes: b504777e7f1c9728e65b874284b4dfd39359c8a8.
Change-Id: I65e27ce22020e5ebc764b5a51b5fc84992ddb40a
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
|
|
Type: feature
Change-Id: I92757f041cde399229c42e34515ace0fcd37908b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Type: fix
Change-Id: I35838baea21ead4a3f45d998ff225a513781d7ee
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
As requested in https://lists.fd.io/g/vpp-api-dev/message/18
three vapi scrips are packaged, destination to share/vpp/.
Also:
+ Add "vapi" as a separate component to maintainers file.
+ Add also vppapigen/generate_json.py to share/vpp/.
+ Improve CMakeLists.txt indentation.
Type: feature
Change-Id: Ia06715621aa344e8ee759410b293509a54f81fdd
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
|
|
Because file vpe.api is in src/vpp/api/
and memclnt.api is in src/vlibmemory/.
Also removed api_types, as iteration can be done over output_dir_map.
Type: fix
Fixes: 9529feb4525dfd13e5636640083361256121d275
Ticket: VPP-1715
Change-Id: I021afeafdf98904d076953f0b09d1e3587fd3100
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
|
|
Type: make
Ticket: VPP-1715
Change-Id: I78497d679d9e793b47a06a0c5cb3b12d86b08489
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Needed to set f64 default values.
Type: feature
Change-Id: Ic58ebc0d9d890bf0e7821894285e61a5bee13199
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Change-Id: I964cb44f8604187390009dcef7dd766b3804c3ca
Type: make
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Enhance the route add/del APIs to take a set of paths rather than just one.
Most unicast routing protocols calcualte all the available paths in one
run of the algorithm so updating all the paths at once is beneficial for the client.
two knobs control the behaviour:
is_multipath - if set the the set of paths passed will be added to those
that already exist, otherwise the set will replace them.
is_add - add or remove the set
is_add=0, is_multipath=1 and an empty set, results in deleting the route.
It is also considerably faster to add multiple paths at once, than one at a time:
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.11
100000 routes in .572240 secs, 174751.80 routes/sec
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.12
100000 routes in .528383 secs, 189256.54 routes/sec
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.13
100000 routes in .757131 secs, 132077.52 routes/sec
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.14
100000 routes in .878317 secs, 113854.12 routes/sec
vat# ip_route_add_del 1.1.1.1/32 count 100000 multipath via 10.10.10.11 via 10.10.10.12 via 10.10.10.13 via 10.10.10.14
100000 routes in .900212 secs, 111084.93 routes/sec
Change-Id: I416b93f7684745099c1adb0b33edac58c9339c1a
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Add support in the API language for specifying a field default.
Add default support in Python binding.
define foo {
u16 mtu [default = 1500];
};
This is client side only. I.e. if the mtu argument is not passed to the foo function,
the client language binding will set it default to 1500.
Change-Id: I5df43f3cd87cb300b40ca38e15dcab25b40e424a
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Change-Id: Id51f26f225cd567ca19efc2301e94fa88840ae8f
Signed-off-by: Ole Troan <ot@cisco.com>
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Use explicit types vl_api_address/prefix in ipip.api.
Change-Id: Ib3133cebdbe4437742924efd49cde4009c4cc31b
Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Initial commit of VPP API language documentation.
Change-Id: Ied67203265319a8603086486c9031e723484c501
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
string name [limit = 64];
Meta-data to do argument validation.
Change-Id: I1f3e0f09b2d5285224399413d25206f77bd3f4b1
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Change-Id: If20d2fbab9b854b7db276c81918fdff6abcb8385
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
|
|
Change-Id: Iaa78ee181589584885b0f377eafb89e603718bd4
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
/vpp/src/tools/vppapigen/vppapigen:823: DeprecationWarning:
the imp module is deprecated in favour of importlib;
see the module's documentation for alternative uses
Change-Id: If7729778374e9193f6381c8bd2ed34c875db3f1e
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Change-Id: I26846d0c12211a29ccfca7c269b9094f6fdbd95c
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
The new string type is modelled after string in proto3.
It is always variable length.
Change-Id: I64884067e28a80072c8dac31b7c7c82d6e306051
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Change-Id: I9ef042c06c12892a2bbc23cc3bac6891c77e3feb
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Change-Id: I9124fcb755ba43fd8f44712f0940f351c460c5b0
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Previously all types are compound. This adds support for aliases,
so one can do things like:
typedef u32 interface_index;
or
typedef u8 ip4_address[4];
Change-Id: I0455cad0123fc88acb491d2a3ea2725426bdb246
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Klement Sekera <ksekera@cisco.com>
|
|
Steps to reproduce:
vagrant@localhost:/vagrant$ build-root/vagrant/build.sh
...
@@@@ Building vpp in /vagrant/build-root/build-vpp-native/vpp @@@@
[51/1169] Generating API header /vagrant/build-root/build-vpp-native/vpp/vlibmemory/memclnt.api.json
FAILED: cd /vagrant/build-root/build-vpp-native/vpp/vlibmemory && mkdir -p /vagrant/build-root/build-vpp-native/vpp/vlibmemory && /vagrant/src/tools/vppapigen/vppapigen --includedir /vagrant/src --input /vagrant/src/vlibmemory/memclnt.api JSON --output /vagrant/build-root/build-vpp-native/vpp/vlibmemory/memclnt.api.json
AttributeError: 'module' object has no attribute 'dumps'
This seems to be due to JSON.py namespace colliding with the standard lib json.py
Change-Id: If389e4e05ef0c166b0c2b3bef7ec0185298679a8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Change-Id: I033a1f5cdb24f77462cb5ec90a62226d93f52925
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I0f49842d3e6690d0965bd310321495a2dc4c2350
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: If5bf1708a07acde73ed34639eeed95babdcf1ccd
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
bwiedemann@suse.com pointed me that:
For reproducible builds datestring should be generated using
SOURCE_DATE_EPOCH which distributions set centrally, and have build
tools that consume it to produce reproducible output.
https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Python
Change-Id: Iefa2b93231bbc4c8af49736be4d7a5720c46b28d
Signed-off-by: Nirmoy Das <nirmoy.aiemd@gmail.com>
|
|
Change-Id: I73dcab0c5ff2405b1fcba25975955e1267a4ac4e
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Note: The Python, Java and C/C++ bindings must be updated before ip/ip_types.api can be used.
ip_types.api:
typedef ip4_address {
u8 address[4];
};
typedef ip6_address {
u8 address[16];
};
enum address_family {
ADDRESS_IP4 = 0,
ADDRESS_IP6,
};
union address_union {
vl_api_ip4_address_t ip4;
vl_api_ip6_address_t ip6;
};
typedef address {
vl_api_address_family_t af;
vl_api_address_union_t un;
};
Change-Id: I22f67092f24db5bd650a03c6f446a84cd9fd1074
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
A poor man's flow switching or policy based rounting.
An ACL is used to match packets and is associated with a [set of] forwarding paths
that determine how to forward matched packets - collectively this association is a
'policy'.
Policies are then 'attached', in a priority order, to an interface when thaey are
encountered as an input feature. If a packet matches no policies it is forwarded
normally in the IP FIB.
This commit is used to test the "ACL-as-a-service" functionality,
which currently compiles, and the existing traffic ACL tests pass in both hash and linear modes.
Change-Id: I0b274ec9f2e645352fa898b43eb54c457e195964
Signed-off-by: Neale Ranns <nranns@cisco.com>
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Prior to this fix vppapigen would just do a crc32 on the Python representation
of the file as a set of dictionaries. That of course was not a good idea.
Change-Id: Ie454736ffec02fa4679ab27e684b1d6c6406a0f1
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Throw exception if details/reply is not defined instead
of logger warning.
Change-Id: I6eb39c51eecca6521e5f563ba09dfd62311b45ec
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
|
|
This ensures that tool changes do not require re-bootstrap.
Disabled generation of temporary files (gentab / .pyc) to avoid polluting the source tree.
Change-Id: I4d6bc035fbb46550fa8f4e99f4091eef90e2d86c
Signed-off-by: Ole Troan <ot@cisco.com>
|