Age | Commit message (Collapse) | Author | Files | Lines |
|
- add patch to scapy to use latest six module instead
of the old scapy specific six module which fails to
import moves sub-module on python 3.12
- fix warning for deprecated legacy editable install of vpp_papi
- skip failing testcases on ubuntu-24.04
Type: test
Change-Id: Idc1a008c6e45ba69caa50c2e245012eb05effed7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
|
|
Type: improvement
Change-Id: I606efc90d9b1b8e2a2590a8b4e0021e2508642b2
Signed-off-by: Dau Do <daudo@yahoo.com>
|
|
'struct.error: required argument is not an integer'
is quite useless itself, so let's raise an error from it at least
saying what was the thing getting packed
Type: improvement
Change-Id: Icb762fbab98446d1e1331315e6c337f789cbba95
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
|
|
Some installation destinations were already converted to the
GNUInstallDirs standard in e3cf4d0cf. This patch converts the share and
include directories (typically /usr/share and /usr/include respectively)
as well.
Type: improvement
Change-Id: Id481b16604f3f52203166a5c0647f43d6eb05239
Signed-off-by: Wim de With <wf@dewith.io>
|
|
Type: test
Change-Id: I01500466f3d15c79e38028677ce7e5c75d427fdc
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
|
|
After memclnt api client disconnect, read timeout is set to zero
and stays the same even after same client reconnect. It causes
client process to spin in timeout loop up to 100% cpu.
Fix it by resetting timeout process state upon every (re)connect.
Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I56812972a69c343f869eebbdfebdcbefd3d201e0
|
|
Erase removed elements to avoid memory leaks.
Type: fix
Change-Id: I1605bea8df7e08455691364efb0a12eb0d9dae93
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
|
|
On FreeBSD a races seems to occur between the states socket connecting
and VPP accepting the connection and calling getpeername. The recv_fd
call here will fail with no fds before the VPP process has time to
handle the connection.
Introducing a socket timeout removes this failure on FreeBSD and allows
the test suite to run. Add a timeout on all platforms to try to avoid
this race everywhere.
Type: improvement
Change-Id: I96f77f924a9491222bc213b534cb17001d081f3f
Signed-off-by: Tom Jones <thj@freebsd.org>
|
|
CMSG_LEN provides the length required to store an ancillary item, but it
does not consider padding. RFC 3542 requires portable applications to
use CMSG_SPACE(), this is documented in the python API:
https://docs.python.org/3/library/socket.html#socket.CMSG_LEN
Type: improvement
Change-Id: I0eab470585f2f39bea38639db95d6b0e047d2cff
Signed-off-by: Tom Jones <thj@freebsd.org>
|
|
introduce ability to connect over unix socket instead of shared memory
Type: improvement
Change-Id: Id9042c74e33ad4e418896c4d7ae48bb9106195c9
Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
|
|
This is required for correct packing of unions.
Type: fix
Change-Id: I92d04b1bbcb3fc3fe06474d8f2c59ed3502e6bd6
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
|
|
This patch allows a client to bootstrap itself by downloading the
JSON API definitions over the API itself.
This patch enables it for Python (probably need a dynamic language).
Call VPPApiClient with the new bootstrapapi=True parameter.
Example (Python):
from vpp_papi import VPPApiClient
vpp = VPPApiClient(bootstrapapi=True)
rv = vpp.connect("foobar")
assert rv == 0
print(f'SHOW VERSION: {vpp.api.show_version()}')
vpp.disconnect()
Type: feature
Change-Id: Id903fdccc82b2e22aa1994331d2c150253f2ccae
Signed-off-by: Ole Troan <otroan@employees.org>
|
|
77caeb1b193404e76beb27a1aa81321e8eb1cf1f has changed the behavior
in an incompatible way, breaking users (including CSIT).
The new behavior is more pythonic,
but the old behavior has to be supported
at least one release after publicly deprecating it.
Type: fix
Change-Id: I9dfdd2229065010216e49db80b14b856c545965c
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
|
|
When sanity test is not done, API files are not loaded until the
first test case is run. Hence, it is not possible to use enums, etc.
outside of a test class.
By preloading API files before running any tests, it prevents its
issue.
Type: fix
Change-Id: I8730150374e6c5f8d6933ec037811372ac2a8da0
Signed-off-by: Maxime Peim <mpeim@cisco.com>
|
|
- CID-322713, CID-322712, CID-314881, CID-314880,
CID-314878 COPY_INSTEAD_OF_MOVE
Type: fix
Change-Id: Idad6806fcd4e1a89a750dcc0584b5b1f0432bf3c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
|
|
Type: fix
Byte swapping should be done before verifying message otherwise the message length will be wrongly computed.
Change-Id: I90b2f60bd33e5362e0edd5ee425f6a6f07886f1e
Signed-off-by: Sylvain Cadilhac <sylvain.cadilhac@freepro.com>
|
|
Define vl_api_string_t to correspond with vlibapi/api_types.h
Fix allocation and size calculation routine generation.
Type: improvement
Change-Id: I6b0a3eb3459d75d326e67bfb76dac8125e480afa
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
|
|
Add missing support for
service { rpc X_get returns X_get_reply stream X_details; }
Type: improvement
Change-Id: I27555f61a2974e414cb6554f32c550b8ee5eb037
Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
|
|
- Package update performed by
1. updating pip, pip-tools, setuptools
2. 'make test-refresh-deps' on ubuntu 22.04
3. fixing 'make test' and 'make docs' issues
on ubuntu 22.04
4. 'make test-refresh-deps' on ubuntu 20.04
- Add dependency for 'make test-refresh-deps'
to insure python venv is set up.
- Update of python formatter, black,
caused reformating of 41 python code
files.
Type: make
Change-Id: I7cafdf4b5189065ac57cb6b254937f6e0897a924
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
|
|
The built stat_segment_data_t is leaked if stat_segment_access_end()
returns false.
Type: fix
Signed-off-by: Duncan Eastoe <duncan@graphiant.com>
Change-Id: I70adabbe7947d3e8a798cdfb3eaa14c683dce9da
|
|
When a stats entry is removed it is marked empty.
The stats client did not check for that and returned an empty string.
This resulted in blank lines in vpp_get_stats. Fix by returning null instead
and checking value.
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I08a39ba3ef4421bf275747a6300f97fe36791b50
|
|
Handle a variable length array of fixed strings.
Like:
fixed_string = VPPType("fixed_string", [["string", "data", 32]])
s = VPPType("string_vla", [["u32", "length"], ["fixed_string", "services", 0, "length"]])
Previously instead of packing and unpacking as strings, exception packed as u8 instead
of list.
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I501a8a4755828042e1539fd5a54eacec21c5e364
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Type: refactor
Change-Id: Iac27ac4d11745b68c57a0394ced51942db8f0431
Signed-off-by: Damjan Marion <dmarion@0xa5.net>
|
|
For e.g. prometheus export it makes more sense to use the same metric name,
and expose the various symlinks as labels.
The VPP symlink metric:
/interfaces/local0/rx_unicast
that points to
/if/rx_unicast
Becomes in Prometheus:
interfaces_rx_unicast_bytes{index="0",label="local0"} 0
Type: improvement
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ide0ab4fda4b3eb7ba7ddfc44680121c53f5267f6
|
|
Type: improvement
Allow vapi to signal to an application's RX thread that it should wake
up and exit.
Before disconnecting from VPP's API, libvlibmemoryclient inserts an
rx_thread_exit message into the client's own input queue to cause its
RX thread to wake up from its blocking dequeue and exit cleanly. Add a
function to vapi's API which will allow libvapi client applications
which have an RX thread waiting for incoming messages using vapi_wait()
to do the same thing.
The existing libvlibmemoryclient code which does this was moved to a
separate function and made available for vapi_stop_rx_thread() to call.
Also fixed some inconsistencies in indentation of function prototypes in
vapi.h to make checkstyle.sh happy.
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Change-Id: I7bbb73470807123cc63ef313cfb91d1fd31b34e5
|
|
While before the my_client_index variable was stored as global variable
in api_main_t, after commit 2ca88ff97884ec9ed20a853b13cee6d86f9c9d0f
the my_client_index becomes part of vapi_ctx_t.
Each API client (internal/external) connected to VPP stores its
client index in vapi_ctx_t.
The issue is in the client disconnection. The vapi_disconnect is
untouched in patch 2ca88ff97884ec9ed20a853b13cee6d86f9c9d0f,
so it keeps the behavior of using the my_client_index stored
in api_main_t.
Ticket: VPP-2069
Type: fix
Fixes: 2ca88ff97884ec9ed20a853b13cee6d86f9c9d0f
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: Idf8c1d1056cbd631cc3057cf7acc486216fa8303
|
|
Type: improvement
The function vapi_wait() is intended to allow a caller to block while
waiting until the API queue can be read/written. It was a stub that
returned VAPI_ENOTSUP. Add code which implements the wait on being able
to read an incoming message.
Had to touch a few other things in vapi.h to make checkstyle.sh happy
after changing the prototype of vapi_wait().
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Change-Id: Ida80c1a1d34fe297ab23268087be65ea53ad7040
|
|
Docstring in VPP Python API says that find_api_dir() will search for
environment variable VPP_API_DIR first and foremost, except it doesn't.
Prepend VPP_API_DIR if it exists, and allow dirs to be omitted in case
it will be the empty list []
Type: fix
Signed-off-by: pim@ipng.nl
Change-Id: Ic892e4bb7d8ff50f18e64ddfd2a61343883f07ea
|
|
Use the Python API binding to generate a set of API messages
in binary format, that can later be replayed independently
of the Python API.
Type: improvement
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Iaab6ca31fd2809193e461ab53f7cc7332a231eb5
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
To support testing of external plugins, add support to the test framework and PAPI
for specifying a list of locations to look for api.json files.
Type: improvement
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I128a306e3c091dc8ef994801b1470b82d2f4595d
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Async use of the API is much faster than blocking calls.
Seemed like it only worked over shared memory transport.
This patches re-enables support for async calls over socket
transport.
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I05f3b362035ce0a1c16788ba9003a35601ddb04e
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
on an empty vector from ls
The return value in this function is initialized with 0, so if a vector of length 0 is passed
to stat_segment_dump_r, then this return value is never populated, resulting in inability
to distinguish between a successful dump of an empty vector and an error.
Solution: call vec_alloc(). As a side effect might get some trivial speed-up.
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I33fefd801df457152e9ec257742305182e91f339
|
|
The issue can be reproduced by running "vpp_get_stats tightpoll"
The root cause is that the control flow discards the "result" struct
being prepared, along with pointer its allocated name.
This results in a memory leak.
Type: fix
Change-Id: Ibf884e92314f19b983a0159fc1257b3fa0110443
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
|
|
Type: fix
Fixes: a51f9b3747
Some IPsec message type definitions were not being written to
ipsec.api.vapi.h. These include ipsec_sad_entry_add_del_v3 and
ipsec_sad_entry_add.
The cause appears to be that tunnel_flags, which is defined in
tunnel_types.api is a special case of enum called an enumflag. These do
not appear to have been handled in the code that generates the vapi
header files.
This patch adds processing of enumflag objects for vapi.
Change-Id: Ie506c4fcb5a07fe97a330ba11c252d1df98adfd9
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
|
|
Type: improvement
Change-Id: I3fbbda0378b72843ecd39a7e8592dedc9757793a
Signed-off-by: Damjan Marion <dmarion@me.com>
|
|
https://docs.python.org/3/library/stdtypes.html
"if concatenating bytes objects, you can similarly use bytes.join() or io.BytesIO, or you can do in-place concatenation with a bytearray object. bytearray objects are mutable and have an efficient overallocation mechanism"
Type: improvement
Signed-off-by: Viktor Velichkin <avisom@yandex.ru>
Change-Id: Id20d337f909cce83fcd9e08e8049bb0bf5970fbc
|
|
Drop pycodestyle for code style checking in favor of black. Black is
much faster, stable PEP8 compliant code style checker offering also
automatic formatting. It aims to be very stable and produce smallest
diffs. It's used by many small and big projects.
Running checkstyle with black takes a few seconds with a terse output.
Thus, test-checkstyle-diff is no longer necessary.
Expand scope of checkstyle to all python files in the repo, replacing
test-checkstyle with checkstyle-python.
Also, fixstyle-python is now available for automatic style formatting.
Note: python virtualenv has been consolidated in test/Makefile,
test/requirements*.txt which will eventually be moved to a central
location. This is required to simply the automated generation of
docker executor images in the CI.
Type: improvement
Change-Id: I022a326603485f58585e879ac0f697fceefbc9c8
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
|
|
Add vapi_connect_from_vpp() and vapi_disconnect_from_vpp()
calls to allow API clients from within VPP process.
Add a new memclnt_create version that gives the user a
knob to enable or disable dead client scans (keepalive).
Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Id0b7bb89308db3a3aed2d3fcbedf4e1282dcd03f
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
During build some header guards are created based on full path where
build is happening. If one directory contains @ character build breaks
because compiler believes it's a macro declaration.
Jenkins adds `@${EXECUTOR_NUMBER}` suffix to workspace directory when
it uses more than one executor for that job, breaking the build.
Replace any @ character on guard name by _ to get it fixed.
Type: fix
Change-Id: Id0f4cfc33fda95e168541aa4e353a0d08aa3b664
Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
|
|
Change-Id: I9794da718805b40cc922e4f3cf316255398029a9
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Type: refactor
Change-Id: Ifd533a095d979dc55bfbe5fac7e0b7510a4d900c
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
- A call to vapi_msg_control_ping_hton() is generated in
a static inline function in vlib.api.vapi.h, which is
defined/generated in memclnt.api.vapi.h without
including memclnt.api.vapi.h in vlib.api.vapi.h.
This breaks the compilation of plugins which include
only vlib.api.vapi.h (e.g. hicn_plugin from the HICN
project).
Type: fix
Fixes: a1400cecb
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I5574f4ed496183ea93265f493bf3624254a865a2
|
|
STAT_DIR_TYPE_EMPTY is not handled. This can happen when the
interface is deleted.
Type: fix
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ic1f5a1a0e7005059628d1dde31118d692c1967d8
|
|
Pass correct conditional based on how vapi is configured wrt blocking.
Type: fix
Fixes: 3fca567ff438145e28dd1318ad5b1734c1091257
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I47adca19f104d7a758cb2940e93c9fd8c7cc9bfa
|
|
Verifying message size including VLA size allows to dismiss some
coverity warnings in generated code.
Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I824658881254b3e7a9bfca228a266cfee448cc2e
|
|
For some reason gcc-11 doesn't like memcpy in a particular location,
change memcpy to assignment.
Type: refactor
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Iddf4b788cdca8e55221b121e74cf50b1e6bdf2d5
|
|
Type: improvement
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ib07029204ecf12bf2adb5a39afa54bc98fb81f34
|
|
Fix coverity warnings by initialising variables and removing dead code.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I0254b81020cdc3d7075df003309065438526918f
|
|
Type: improvement
Change-Id: If453321785b04f9c16e8cea36fb1910efaeb2c59
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
|
|
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5ecb73009c6ebb00b5d9e14bd09b4b3e80ab5601
|