Commit Graph

368 Commits

Author SHA1 Message Date
Damjan Marion
8bea589cfe vppinfra: make _vec_len() read-only
Use of _vec_len() to set vector length breaks address sanitizer.
Users should use vec_set_len(), vec_inc_len(), vec_dec_len () instead.

Type: improvement
Change-Id: I441ae948771eb21c23a61f3ff9163bdad74a2cb8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-04-04 23:17:13 +00:00
Vladislav Grishenko
8486283cd5 vlib: leave SIGCONT signal with its default handler
Systemd always sends SIGCONT after KillSignal, to ensure that even suspended
tasks can be terminated cleanly. However, the default action of SIGCONT
handler in VPP such as unix_signal_handler() is process termination with
coredump, what is not really desired. So, leave it alike SIGSTOP with its
default handler.

Type: feature
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I54c06d21669ec3c709322d746db9e28448c31bb8
2022-03-23 18:24:56 +00:00
Klement Sekera
9b7e8acf79 api: verify message size on receipt
When a message is received, verify that it's sufficiently large to
accomodate any VLAs within message. To do that, we need a way to
calculate message size including any VLAs. This patch adds such
funcionality to vppapigen and necessary C code to use those to validate
message size on receipt. Drop messages which are malformed.

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I2903aa21dee84be6822b064795ba314de46c18f4
2021-12-14 09:15:48 +00:00
Neale Ranns
b28652ed7a ip: comparing IP prefixes should not modify them
Type: improvement

make the ip_prefix_cmp take const paramenters.
plus some other miscellaneous functions.

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ib69bacfb09483a8a8f8b89900c92d3d55c354ac6
2021-11-18 14:06:02 +00:00
Damjan Marion
bea6993274 build: remove unnecesary link deps
Change-Id: I560c505ff754bf6856094c16494530a855fe287b
Type: make
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-12 14:21:09 +00:00
Filip Tehlar
f0e67d78ae interface: add api test file
Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ib07029204ecf12bf2adb5a39afa54bc98fb81f34
2021-10-18 07:03:12 +00:00
Filip Tehlar
1fa06c9a06 vat: move memset after init
Type: fix

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ia65fd2f99dfe6538411c247aeb9691c590c2e00b
2021-10-11 15:08:25 +00:00
Damjan Marion
5546e43f79 build: don't hardcode triplet, allow specifying custom lib dir
Type: fix
Change-Id: I33f364fda88914f88f9b976cb83e6d3ff466f0bb
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
2021-10-05 16:44:32 +00:00
Filip Tehlar
36217e3ca8 api: API trace improvements
Type: improvement

 * add support for JSON format in API trace
 * add ability to replay JSON API trace in both VPP and VAT2
 * use CRC for backward compatibility check during JSON API replay
 * fix API trace CLI (and remove duplicits)
 * remove custom dump
 * remove vppapitrace.py
 * update docs accordingly

Change-Id: I5294f68bebe6cbe738630f457f3a87720e06486b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
2021-09-28 16:06:19 +00:00
Ole Troan
3459ece6da misc: vpe.api messages dynamically allocated
This is the last in the series of moving API messages from vpp/api/vpe.api to vlibmemory/memclnt.api.
This patch makes the remaining vpe.api messages dynamic, to help VAT2 binary-api command.
Moves the VAT test code to a separate file and removes the now unnused API meta files.

Type: improvement
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I01dd78eaff1d3715dff17d2643bf0f7f0089935b
Signed-off-by: Ole Troan <ot@cisco.com>
2021-09-28 15:17:37 +00:00
Florin Coras
a1400cecb8 misc: api move continued
Move control ping and change dependencies from vpe.api_types to
memclnt.api_types

Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I9f8bc442e28738c48d64d1f6794082c8c4f5725b
2021-09-27 08:01:44 +00:00
Florin Coras
248210c6ca misc: move part of vpe apis to vlibmemory
VPE apis are actually vlib apis. This moves those that are not tightly
coupled with vapi to vlib_api

Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I456a64ce49a0cdeff4a0931c6ea513cb639f683e
Signed-off-by: Ole Troan <ot@cisco.com>
2021-09-27 07:04:51 +00:00
Nick Brown
e3cf4d0cf3 build: use GNUInstallDirs install destinations
So as to be compliant with distribution layouts, as recommend by:
https://cmake.org/cmake/help/latest/command/install.html#installing-files

Type: make
Change-Id: Ic46ace4f26aab1aa4902cbd013c40a92c480680d
Signed-off-by: Nick Brown <nickbroon@gmail.com>
2021-09-17 20:25:49 +00:00
Filip Tehlar
0046e97eb9 session: api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Iacc58d27ac51c8a1c571087f98297e046b3477c2
2021-07-12 10:36:46 +00:00
Filip Tehlar
0577ff1c39 interface: api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I189bfcca2d5fa1f37d05a72c92d04bf260343043
2021-07-02 15:43:33 +00:00
Filip Tehlar
5ff59a1f8b ip: api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I4b6d881571c158b7a69a78b9680732d090c4f8b5
2021-07-01 10:10:35 +00:00
Filip Tehlar
5a9d2a1758 l2: api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I7b84767e75d5f8310ec071036a5780fa4530f79f
2021-06-24 08:30:43 +00:00
Filip Tehlar
9f562cd9e6 virtio: api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I4f9316b16f16a48e2042aa17db596bfd181bd314
2021-06-23 22:28:11 +00:00
Filip Tehlar
da5088c930 mpls: api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I148022278a792b3687402b6915fe6fb513858a2a
2021-06-23 13:41:21 +00:00
Filip Tehlar
6f6663f3ba span: api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I7ec4bbb21a079c6f6adfb4f954054b2b07bf19c5
2021-06-23 13:31:58 +00:00
Filip Tehlar
ec61e1057c tcp: api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I3c06e9cb3fabdcdce9c17e93cfedfd771295f589
2021-06-22 20:39:03 +00:00
Filip Tehlar
4f348df8cf virtio: api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I047310b8c9fcc51dcfb187710ff59b7895abe217
2021-06-22 19:54:55 +00:00
Filip Tehlar
ce74c6f016 misc: punt: api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I13dae61ddb7150c7fe9a7fd0eae73055ff3f2816
2021-06-22 19:54:55 +00:00
Filip Tehlar
1eb9cd36b9 devices: af_packet api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ic7979755494a2fd23b9fa3d74e14f6b9ea0a46d0
2021-06-22 14:44:46 +00:00
Filip Tehlar
db767d6ed5 qos: api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I39505763371c98b75ff7b697dacd3eeb0d41d40a
2021-06-22 14:44:32 +00:00
Filip Tehlar
3808ec06c4 devices: tapv2 api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I0a2c1cbbe798ddf9d08da78bf0b458a0f54fa13a
2021-06-22 14:12:29 +00:00
Filip Tehlar
e2fc003f46 sr: api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I0bdf870e2e9b0ebc11a3ce252fbd0667a83de4e6
2021-06-22 13:54:23 +00:00
Filip Tehlar
116a1e5277 bonding: api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I1de45c4db57444d2d2c9fb91b8a66a4f01be699b
2021-06-22 13:53:56 +00:00
Filip Tehlar
c73f3299ad ipsec: api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I0db7343e907524af5adb2f4771b45712927d5833
2021-06-22 11:24:27 +00:00
Filip Tehlar
41ff1eb5dd ethernet: api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Iacaefbf04834f000a14f151c4b848f280ac46d63
2021-06-22 10:04:33 +00:00
Filip Tehlar
102e8a5d60 policer: api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I5dd30870443a22a7da65f6b5a6d3967991e2aceb
2021-06-22 10:00:57 +00:00
Filip Tehlar
bf8c54ad87 feature: api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I76be91715953c7cbe704961d1a56c48334656e19
2021-06-21 16:31:02 +00:00
Filip Tehlar
83e5a116ec pg: api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Idf0c24c9c8f8f3c267285c6a231c9c1a364a902a
2021-06-21 16:29:24 +00:00
Filip Tehlar
53dea2792b misc: ipfix api cleanup
Use autogenerated code.
Does not change API definitions.

Type: improvement

Change-Id: I864979ce490651bf1f5fed107620e9bc4ca4bf93
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2021-06-21 12:16:13 +00:00
Filip Tehlar
9597f08f57 flow: api cleanup
Use autogenerated code

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I02f53486723f7ac7e9026ff092b63e86dff13232
2021-06-21 10:59:35 +00:00
Filip Tehlar
7ea3f06936 gso: api cleanup
Use autogenerated code

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Id373c7828d77cca0121baf9c7635cfe2c5f938d7
2021-06-21 10:56:00 +00:00
Filip Tehlar
26c8a7f4c2 vxlan: api cleanup
use autogenerated code

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I163eefa86f3248260481181818d70fa1b6eaa220
2021-06-21 10:55:46 +00:00
Filip Tehlar
43428dbfbb classify: api cleanup
Use autogenerated code.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Id7d4d23e4fe707f7049828fec44df7ff0419d23c
2021-06-21 10:54:57 +00:00
Filip Tehlar
52d80c55d6 bier: api cleanup
use autogenerated code

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I86459d918ac46bed523e847db9f9c7179147d022
2021-06-21 10:54:26 +00:00
Damjan Marion
fd8deb48c7 vlib: split vlib_main_t into global and per-thread
Type: refactor
Change-Id: I8b273bc3bf16aa360f031f1b2692f766e5fc4613
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-26 16:33:42 +01:00
Dave Barach
aa479bb91d misc: remove cop API support (part 1)
API marked for deprecation last year due to non-inclusive language.
Last supported release: 21.01. See the "adl" plugin.

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I931e58ced9cc8403ca5b23fd6b07e50d0ff7306b
2021-03-11 17:10:54 +00:00
Brian Russell
b2aae75c17 policer: use enum types
Make the policer action enum packed and use it in the policer code.
Use other policer enums where applicable.

Type: improvement
Signed-off-by: Brian Russell <brian@graphiant.com>
Change-Id: I32f9735942af8bca3160b9ef8a75f605d9aba5fa
2021-02-12 18:57:55 +00:00
Brian Russell
c5299ff30a policer: remove SSE2 prefix
The policer code uses a naming convention of prefixing a lot of
its definitions with "SSE2" when in fact there is nothing SSE2
specific about them. This is confusing so remove the prefix.

Unfortunately it has to stay in the API definitions for backward
compatibility.

Type: improvement
Signed-off-by: Brian Russell <brian@graphiant.com>
Change-Id: I59a7df9fd5ded2575f2e587b2768a025a213b07c
2021-02-12 14:55:58 +00:00
Brian Russell
e3845d79bf policer: use ip dscp
Use the common IP definitions of DSCP rather than duplicating in the
policer code.

Type: improvement
Signed-off-by: Brian Russell <brian@graphiant.com>
Change-Id: Iff4bc789356edc290b9c31eca33e93cf5b6211bf
2021-02-11 08:21:56 +00:00
Steven Luong
150bf5ac6b misc: fix a trunccation on vhost dump
feature is u64. We need to print it with %llx and enough precision to
avoid truncation

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I9f5dd523400473b4881b01b8e6cecf439a8060d9
2021-01-29 14:22:38 +00:00
Steven Luong
27ba5008a1 vhost: Add event index for interrupt notification to driver
VPP only supports a poor man's approach for interrupt notification to the
driver. It uses a simple binary flag for "interrupt needed" or "interrupt
not needed". Most drivers support more sophisticated event index already.
This feature is to add the long due missing feature and make it configurable,
off by default.

Type: feature

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I68dab7dd07045cafb49af97b7f70db9b8131ae03
2021-01-08 13:10:58 +00:00
Neale Ranns
a9e2774f55 ipsec: Deprecated the old IPsec Tunnel interface
Type: fix

it's been 2 releases since it was marked deprecated.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I0eba7ed607826ed0d00e7d2d8f9b27d09e8e9a6e
2021-01-07 09:15:13 +00:00
Neale Ranns
119c0d78f4 gre: Move to new API generated types/messages
Type: improvement

also clean up GRE includes across the code base.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I90928b0da3927b7ca1a23683aa80d4b53bbf63fd
2020-11-26 14:59:55 +00:00
Florin Coras
b040f98a88 misc: minimize dependencies on udp.h
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id13f33843b230a1d169560742c4f7b2dc17d8718
2020-10-21 10:56:34 +00:00
Damjan Marion
eabd424982 interface: shorten vnet_hw_if_rx_mode
This is part of bigger refactor.

Type: refactor
Change-Id: I6fc2c0a1e2d217a70952901bcf775b8485bd3c20
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-08 10:21:54 +00:00