390 Commits

Author SHA1 Message Date
Andrew Yourtchenko
226e8e65bc vppapigen: crcchecker: harmonize the in_progress marking
The format for deprecation is "option deprecated" now,
so harmonize the in-progress marking to logically be
"option in_progress"

At the same time recognize the legacy/erroneous
types of marking, print the warning.

Change-Id: If418dfadd69ffb112550164d63d13420e51cefd7
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 6a3d4cc9a11efbe73a1cda35a64c619eebde0b24)
2020-09-23 15:21:58 +00:00
Dave Wallace
d88c9a13e8 build: remove opensuse build infra
- VPP on opensuse has not been supported
  for several releases.

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I2b5316ad5c20a843b8936f4ceb473f932a5338d9
(cherry picked from commit bc35f469c89daf0126937580b6972516b5007d3a)
2020-09-22 11:35:12 +00:00
Dave Wallace
ef51f3696e build: touch files when extracting rpm tarballs
Type: fix

- Long story short, intermittently centos jobs have been
  failing with clock skew issues. When someone commits a
  patch on a machine with the date ahead of UTC, then clock
  skew will be encountered when extracting the RPM source
  tarball. See [0] and [1] for details.

- Replace 'make bootstrap' with 'make install-dep' in
  RPM package build specfile.

[0] https://unix.stackexchange.com/questions/164807/does-git-archive-use-the-wrong-file-timestamp
[1] https://git.fd.io/vpp/tree/Makefile#n380

Change-Id: Iebfb9eb2e26c1f2e4488e871da86d0c60b9f4048
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 27b50fea143f2d45613ef982870cd2052e21fb0f)
2020-09-22 11:33:28 +00:00
Andrew Yourtchenko
a87deb77da vppapigen: crcchecker: report in-progress messages
in-progress messages do not give any API stability guarantees,
by design, to allow easy iteration. Provide an easy way
to know which messages are in-progress.

If as a user you see "in-progress" message that you want
to use in production, please contact the feature owner
and discuss the path to removing the "in-progress" status
before that.

Change-Id: I27729995e26a70af373e642b871dbb5cc5526959
Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 8b0cd69d31a50e7f4a454d45e903c6cdaf23fbfe)
2020-09-16 15:53:00 +00:00
Andrew Yourtchenko
ec7e8d8598 vppapigen: crcchecker: report deprecated messages
Report if the messages were marked as deprecated,
but not yet deleted.

Useful for building the release notes and comparing
between the releases.

Also, put the dict_compare() call into the report(),
since latter always consumes the output of the former.

Change-Id: Iceab3e94ff66da931a4669b612026bd162dd5d1a
Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 62bd50de97cd90cc09559a09fe46f98211279a1e)
2020-09-16 11:24:38 +00:00
Yichen Wang
748bf82a50 build: fix the the build on centos/rhel 8
1. Remove uncessary runtime dependency;
2. Add missing build dependency;
3. Fix runtime dependency for api-python3 RPM;

Type: make

Change-Id: I2700f1a15112effba8d1527aca6467158f81f486
Signed-off-by: Yichen Wang <yicwang@cisco.com>
(cherry picked from commit 466872f0896139b34ef8ccf12f7fcc0093d7cb19)
2020-09-15 10:08:53 +00:00
Martin Millnert
cb94290d5f misc: selinux fixes (packet_socket r/w)
vpp-20.05 on up-to-date Centos 7.8 host with enforcing SELinux fails to
create a host-interface due to two missing SELinux-permissions:

vpp_t self:packet_socket { read write }

This simple patch adds these two permissions. Tested successfully on
local installation.

The steps to reproduce:

$ ip link add vpeer-host type veth peer name vpeer-vpp
vpp# create host-interface name vpeer-vpp
create host-interface: Permission denied (errno 13)
[...]
$ semodule -i vpp-packet-socket.pp
vpp# create host-interface name vpeer-vpp
host-vpeer-vpp

Type: fix
Ticket: VPP-1931
Change-Id: I2b3d92b27b9a9f26aa1c85af2946b15e83e27944
Signed-off-by: Martin Millnert <martin@millnert.se>
(cherry picked from commit 68849350c56b0258d21fc906b09df71a1951f694)
2020-09-15 08:35:15 +00:00
Nathan Skrzypczak
97158289bc docs: Fix create memif cli
Type: docs

Change-Id: I91a954abf77335e1ddcbd1468633d9d7980bbac2
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2020-09-09 16:56:28 +00:00
Ray Kinsella
f9c8fe4128 vpp_config: update node variants to skx and icl
Node variant names have changed to skx and icl.

Type: fix

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I5be832aa59e4e440df53869077d801c011e3defa
2020-08-31 18:17:20 +00:00
Benoît Ganne
4a76d6f6da af_xdp: AF_XDP input plugin
Type: feature

Change-Id: I85aa4ad6b68c1aa0e51938002dc691a4b11c545c
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-08-31 17:16:56 +00:00
Ole Troan
68ebcd50bf vppapigen: add support for empty options
Type: improvement
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I59323447bee7bb4f0563251a5df80cbefb9bd89e
Signed-off-by: Ole Troan <ot@cisco.com>
2020-08-11 14:55:41 +00:00
Dave Wallace
49c9feaa73 bash: fix pip install issue with jjb-sandbox-env function
- In a new system (e.g. ubuntu 18.04 docker image), the pip3
  installation of jenkins-job-builder fails unless pip3 wheel
  is completed on a previous pip3 install command.

Type: fix

Change-Id: I4354c851161b9c470d44951dc8b722ffc87f56f7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2020-08-06 18:54:30 +00:00
Dave Barach
11fb09e38f misc: harmonize names
Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ibad744788e200ce012ad88ff59c2c34920742454
2020-08-06 12:10:50 -04:00
Ole Troan
96068d6b94 nat: nat66 to plugin
Type: refactor
Change-Id: I8c1f0c02a4522c1f9e461ddadd59938579ec00c6
Signed-off-by: Ole Troan <ot@cisco.com>
2020-07-02 13:13:27 +00:00
Dave Barach
17c4531bf1 misc: add gdb macros
These gdb macros should prove very helpul when poking around in core files.

Pifi (pool_is_free_index) is not straighforward. Best to work it out
once.

Others:
 bitmap_get = clib_bitmap_get
 vl = vec_len
 pe = pool_elts
 node_name_from_index, as described
 vnet_buffer_opaque, prints the primary buffer opaque
 vnet_buffer_opaque2, prints the secondary buffer opaque

Fix vppinfra unit-test compile error

Type: improvement
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Id2a2391a47e5a07cf3757f473e3805cc04784161
2020-06-25 15:10:07 +00:00
John DeNisco
df35a20f9b vpp_config: Updates for 20.05
Added external dependancies package. Updated the startup.conf template.

Fix extras/scripts/check_commit_msg so it accepts '_' characters in
feature names.

Type: fix

Signed-off-by: John DeNisco <jdenisco@cisco.com>
Change-Id: I69c33a24b30d31e5b8081021030bff88cbaeace9
Signed-off-by: Dave Barach <dave@barachs.net>
2020-06-21 12:07:36 +00:00
Andrew Yourtchenko
be360ee4d7 bash: functions to set up csit and sandbox env
Type: test

Change-Id: Iceaebfe2faf29a893b9571069212e951273c3d2b
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Signed-off-by: John DeNisco <jdenisco@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2020-06-02 19:21:17 +00:00
Andrew Yourtchenko
e7df8cbb6d misc: Avoid sample.md from in the VPP docs, clean up the extraneous copy
I had cleaned up the sample.md previously for 20.01, but when later
that was merged to master, the file was renamed. So, fix this issue.


Change-Id: I6347685af216901fbfdd445606735b9bf79f8fe5
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit e2e3c38be6d91c3deb15373992cd5a764e773060)
2020-05-28 17:06:27 +00:00
John Lo
4a302ee7c7 ethernet: fix DMAC check and skip unnecessary ones (VPP-1868)
Fix and optimize DMAC check in ethernet-input node to utilize NIC or
driver which support L3 DMAC-filtering mode so that DMAC check can be
bypassed safely for interfaces/sub-interfaces in L3 mode.
Checking of interface in L3-DMAC-filtering state to avoid DMAC check
require the following:
a) Fix interface driver init sequence for devices which supports L3
   DMAC-filtering to indicate its capability and initialize interface
   to L3 DMAC-filtering state.
b) Fix ethernet_set_flags() function and its associated callback
   flags_change() functions registered by various drivers in interface
   infra to provide proper L3 DMAC filtering status.
Maintain interface/sub-interface L3 config count so DMAC checks can be
bypassed if L3 forwarding is not setup on any main/sub-interfaces.

Type: fix
Ticket: VPP-1868

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I204d90459c13e9e486cfcba4e64e3d479bc9f2ae
2020-05-27 17:27:27 +00:00
Ole Troan
deecc93bd9 vppapigen: handle new api file for crcchekcer
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I1b3ae8b348eb3cba628a55ea3e72e85b9a4288d5
2020-05-19 13:32:47 +02:00
Paul Vinciguerra
f4fbfd692f libmemif: cleanup typos
cleaned up typos in documetation while doing a read through.

Type: style

Change-Id: Id8abbd8d6297ee10490c12a8e62097224f7ec1e1
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-05-18 18:21:53 +00:00
Ray Kinsella
8bf80a3dda misc: removed executable bits from source files
Identified and removed executable bit from source files in the tree.
find . -perm 755 -name *.[ch] -exec chmod a-x {} \;

Type: improvement

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I00710d59fcc46ce5be5233109af4c8077daff74b
2020-05-15 19:26:42 +00:00
Dave Barach
9a099b6e50 misc: remove useless assignment
Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I7708587804bc979fa9c46fb11f96d264821e2357
2020-05-12 16:43:41 -04:00
Ole Troan
5c318c70d0 vppapigen: api crc checker
crcchecker is a tool for enforcement of the binary API.

1. Production APIs should never change.
2. An API can be deprecated across three release cycles.
   Release 1: API is marked as deprecated.
   option deprecated="vyy.mm";
   option replaced_by="new_api_2";
   Release 2: both old and new APIs are supported
   Release 3: the deprecated API is deleted.
3. APIs that are experimental / not released are not checked.
   An API message can be individually marked as in progress, by:
   option status="in_progress";
   In the API definition.

The definition of a "production API" is if the major version in the API file is > 0.

extras/scripts/crcchecker.py --check-patchset # returns -1 if backwards incompatible
extras/scripts/crcchecker.py --dump-manifest
extras/scripts/crcchecker.py --git-revision v20.01 <files>
extras/scripts/crcchecker.py -- diff <oldfile> <newfile>

This patch integrates the tool in "make checkstyle-api".
A future patch is required to integrate the tool in the verify job.
I.e. this patch does not enable enforcement through Jenkins.

Change-Id: I5f13c0976d8a12a58131b3e270f2dc9c00dc7d8c
Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
2020-05-09 11:35:58 +00:00
Damjan Marion
599efc67e8 build: various improvements
- add option to install only host tools
- add option to specify lib and runtime dir

Type: improvement

Change-Id: I6356b52df459120fc9b0127948bae7679fb10e52
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-05-08 17:01:32 +00:00
Damjan Marion
5505ee8904 misc: deprecate elftool
Type: make

Change-Id: I34fec1c40ef660177c266517eaf41d60827609f4
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-05-07 16:47:33 +00:00
Paul Vinciguerra
b5a575b092 docs: clean up make docs job
Type: docs

Change-Id: I9b5e5137eb4c1e89f6e8d7a278cd11a0fd496471
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-05-06 15:13:09 +00:00
Damjan Marion
162330f25a build: rework x86 CPU variants
Type: improvement
Change-Id: Ief243f88e654e578ef9b8060fcf535b364aececb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-04-30 13:25:29 +02:00
Jakub Grajciar
07363a45fe gomemif: introduce gomemif
golang native memif driver

Type: feature

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I693156a44011c80025245d25134f5bf5db6eba82
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-04-28 21:18:37 +00:00
Dave Barach
37b445468e vppinfra: improve test coverage
Bonus corner-case bugfix in bitmap.h, found during the exercise.
Issue dates from 2001 or thereabouts. Please review this specific
change carefully.

lcov_post: filter system include directories and generated files in
build-root

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Iaa0b63e9dc571dfe3d992197ac49ba4d93403c61
2020-04-28 20:55:20 +00:00
Ray Kinsella
4830e4f78f vlib: startup multi-arch variant configuration
Support for startup node multi-arch variant selection through startup.conf.
This is to facilitate unit, functional testing and benchmarking of non-default
multi-arch variant node code path. Also added parameters to make test, to
specific using multi-arch variants in unit testing.

Type: improvement

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I94fd332bb629683b7a7dd770ee9f615a9a424060
2020-04-28 11:10:50 +00:00
Dave Barach
ce32770251 vlib: deprecate i2c and cj
i2c follows its only use case - the original 82599 driver - into
extras/deprecated.

cj is/was an emergency debug tool unused in several years. Move to
extras/deprecated/vlib

Type: refactor

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ib55b65373f62630db295c562974bd8f2456c3107
2020-04-27 15:07:42 +00:00
Dave Barach
f593b57920 vppinfra: finish deprecating qsort.c
Minor change to vec_sort_with_function(...): don't depend on the qsort
implementation to deal with null, zero-long, or 1-long vectors

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I7bd7b0421673d2a025363089562aa7c6266fba66
2020-04-24 16:52:55 -04:00
Andrew Yourtchenko
843ea7c3e3 misc: Markdown cleanups for the 20.01 release
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I821197364a2fee9b52b1f014288b1f5e9e3c494c
(cherry picked from commit fc98203b5d06f19d613766815660e76c9f216f09)
2020-04-23 18:18:22 +00:00
Dave Barach
053d093524 vppinfra: move unused code to extras/deprecated/vppinfra
Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Id28299a188feefa1899d835fd499f018af95d81b
2020-04-22 19:58:20 +00:00
Dave Barach
08eb2bb205 pg: set vnet buffer flags in pg streams
See .../extras/pg/checksum_offload.pg for a nontrivial example, which
deliberately sets bogus ip and udp checksums in the generated packets,
then fixes the mess with (software emulated) hardware checksum
offload.

Validated via "pcap dispatch trace on max 1000 buffer-trace pg-input 100".
Packets stuffed into loop1-output have the configured bogus ip and udp
checksums. vnet_calc_checksums_inline(...) fixes the checksums, which
are correct when packets visit loop1-tx.

The packet generator is a dumb robot in this regard. If you ask for a
ridiculous flag combination - example: ip4 and ip6 - your mileage may
vary.

Type: feature

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I6d9e790f373bcd9e445a89113ca8e4c8f9aa9419
2020-04-15 19:19:29 +00:00
neale ranns
81767d71a9 vom: Fixes for g++-9
Type: improvement

Signed-off-by: neale ranns <nranns@cisco.com>
Change-Id: I356251b750fcab05ff91e0295e96a8451e8b2f88
2020-04-09 16:26:32 +00:00
Paul Vinciguerra
582eac5c30 misc: fix python sonarcloud BLOCKER level issues
Fix of the top 11 python issues flagged as BLOCKER.

Ticket: VPP-1856
Type: fix

Change-Id: Icf4691e62f4a69d6ee196b6d6e2ab52d961b5c76
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-04-06 11:30:05 +00:00
Dave Wallace
39aa7a5202 misc: fix sonarcloud html issue
Type: fix

Change-Id: I3691c310fa6336bf2c103c42bccd94c27aab4878
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2020-04-03 19:52:31 +00:00
Jakub Grajciar
2f8cd91451 acl: API cleanup
Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I09fa6c1b6917936351bd376b56c414ce24488095
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-03-27 12:46:42 +00:00
Ole Trøan
492a5d0bd7 acl: revert acl: api cleanup
This reverts commit aad1ee149403994194cf37cef4530b042ba7df3a.

Reason for revert: Verify failure. Doesn't build.

Type: fix
Change-Id: I91b1b26ac43edde4853e4561a0083d0b3a06efee
Signed-off-by: Ole Troan <ot@cisco.com>
2020-03-26 19:36:31 +01:00
Jakub Grajciar
aad1ee1494 acl: API cleanup
Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: If90d753f129312400c4c3669bb86289d0c3e0d99
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-03-26 17:45:58 +00:00
Jan Cavojsky
77a95cdce2 libmemif: don't consume rx queue interrupt, if memif_rx_burst fails
Type: fix

Signed-off-by: Jan Cavojsky <jan.cavojsky@pantheon.tech>
Change-Id: Ic6c15c88c80c4045c290cd78533be6f070c7470a
2020-03-21 12:12:13 +00:00
Dave Barach
6d97e62c00 build: add snap packaging (experimental)
Type: feature

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I5a5efde5378f63d89d82d71ae009c7595aaa800c
2020-03-18 16:14:52 +00:00
Jakub Grajciar
7c0eb56f40 vxlan: vxlan/vxlan.api API cleanup
Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I7f6f37ec6eed780322e2488d6eb0f5681945ba09
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-03-16 09:18:46 +00:00
Renato Botelho do Couto
1d94ab5f1b misc: Fix vpp-selinux-policy dependency on CentOS 8
policycoreutils-python is now called python3-policycoreutils on
CentOS 8.

Type: fix

Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
Change-Id: I46264c66a2a719d546e0926f3bd716e986461963
2020-03-06 14:15:18 -06:00
Jakub Grajciar
1c684f9af2 lldp: API cleanup
Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I2fe6b56dc0f224f438ed5f14c0f276d94afbaea8
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-02-26 11:48:35 +00:00
Jakub Grajciar
908965db7e span: API cleanup
Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ifddac07b15b116574de3a97f7c80d7bf6a3171f7
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-02-26 10:40:58 +01:00
Vladimir Isaev
72e31bc2d9 stats: fix state counter removal
Avoid using vec_del1() for directory vector to keep indexes valid all
the time.

There are state counters for each slave in LACP bond mode which can be
dynamically created and removed. Vector index is used to access these
counters. But also vec_del1() is used to remove counter from vector.
This function changes the index of the last element, so after this we
are unable to access ex-last element using old index.

As a result it is not possible to add-del-add two interfaces to the LACP
bond:

DBGvpp# create bond mode lacp
BondEthernet0
DBGvpp# create packet-generator interface pg1
DBGvpp# create packet-generator interface pg2
DBGvpp# bond add BondEthernet0 pg1
DBGvpp# bond add BondEthernet0 pg2
DBGvpp# bond del pg1
DBGvpp# bond del pg2
DBGvpp# bond add BondEthernet0 pg1
DBGvpp# bond add BondEthernet0 pg2
bond add: /if/lacp/1/3/partner-state is already register

Type: fix

Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: I2c86e13905eefdef6233369cd4ab5c1b53d123bd
2020-02-05 15:34:49 +00:00
Mohsin Kazmi
574be8fe22 misc: add new type for commit message
Type: style

Change-Id: Ibfa8bd1c0987fd2a5050be6c454f665666eb0210
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-02-05 09:12:12 +00:00