314 Commits

Author SHA1 Message Date
Jakub Grajciar
329c884aa2 libmemif: reset number of queues on disconnect
Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: If4df47b1109ac90d4d5834b3aa7d326f6b3761d2
(cherry picked from commit 718a19b8f9aa3dca26aaf4eb6bd9f60eb6376d30)
2019-11-18 13:17:43 +00:00
Jakub Grajciar
4aee015225 libmemif: prevent crash in case of invalid connection handle
Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I803c86a48e0148ef143026a5cd93e4510c4f0611
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
(cherry picked from commit bdf3ebe358787ef240dc9fadc515dfd178dfef7b)
2019-09-30 00:10:30 +00:00
Jakub Grajciar
2736fc7fcf libmemif: introduce 'memif_per_thread_' namespace
APIs in 'memif_per_thread_' namespace are used to split the global
database into separate databases, to improve multi-thread use cases.

Using 'memif_per_thread_init' client can create separate libmemif
databases (libmemif_main_t). Client will reference these databases
using memif_per_thread_handle_t. Each database requires unique socket.
Created interface will be stored in the same database as the socket
passed in connection arguments.

Example code: extras/libmemif/examples/icmp_responder_3-1/main.c

Type: feature

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I261563ecc34761a76e94f20c20015394398ddfd7
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
(cherry picked from commit 17f2a7bbf25f54dbd71aa8f377875828b7b88e35)
2019-09-25 22:09:12 +00:00
Dave Barach
4b943d6328 misc: clean up "pcap [rx|tx] trace" debug CLI
Separate debug CLI arg parsing from the underlying action
function. Fixes a number of subtle ordering dependencies, and will
allow us to add a binary API to control the feature at some point in
the future.

Type: refactor
Ticket: VPP-1770

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Id0dbeda06dad20e756c941c691e2088ce3c50ec7
(cherry picked from commit b97641c79f4aaf0069268c550f263167ddea2b34)
2019-09-10 15:20:08 -04:00
Dave Barach
157f1cd349 ip: fix udp/tcp checksum corner cases
When checksumming chained buffers with odd lengths: insert a
NULL byte, or the calculation fails.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I380f7c42897bdb28c8c29aa1c4cdaaa849cc9ecc
(cherry picked from commit c4abafd83df38051765352785b146277734701f4)
2019-09-07 03:49:39 +00:00
Ian Wells
0325c021f4 papi: Revert vpp-api-python to py2, add py3 pkg
A previous commit, ca3d38ae18c21ce37212f0d5d5f4a1702429e70c, converts
the vpp-api-python package from a python2 library to a python3 one.
This changes the behaviour of the package and breaks anything that
uses it as a dependency.

This change reverts the package behaviour to a python2 package, and
additionally adds a *separate* python3 package for correct python3
behaviour.

Type: fix
Fixes: VPP-1738
Signed-Off-By: Ian Wells <iawells@cisco.com>
Change-Id: I54eb45156eb6e00fc4cd5b48e7a0aa17fd2f43f7
Signed-off-by: Dave Barach <dave@barachs.net>
(cherry picked from commit 13cef0cc2cba4cff22bb5a860a8709cb3cfd35b2)
2019-08-13 08:04:41 +00:00
Dave Barach
78cc42d608 http_static: tls support
Type: refactor
Ticket: VPP-1736

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I45745e568cd943293d0015a61f67ec799b6804d8
(cherry picked from commit 6b53fd5163de7d1f452b472ec3ad945f4dbd694c)
2019-08-12 17:34:15 +00:00
Neale Ranns
e3282bae27 vom: export/install cmake files
Type: feature

allow other projects to use cmake modules to find VOM

Change-Id: I00e01e9bec3ecf79903cd522d2770bdb70e5399b
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-08-07 08:54:43 +00:00
Neale Ranns
83832e7ced qos: Store function
Type: feature

store: write a QoS value into the buffer meta-data
record: Extract a QoS value from a packet header and store it.
mark: Make a change to the content of a packet header by writing a stored
      QoS value

Change-Id: I07d1e87dd1ca90d40ac1ae1774fee1b272cab83f
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-31 16:17:36 +00:00
Jakub Grajciar
272e2e456d libmemif: fix autoconnect
Type: fix

Change-Id: I426e210c47869904a01712b765db2356439f706f
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-07-26 14:51:59 +00:00
Neale Ranns
038e1dfbdf dhcp ip: DSCP settings for transmitted DHCP packets
Type: feature

- Define the ip_dscp_t and use in the IP headers
- Add DSCP setting to the DHCP client for use with packet TX

Change-Id: If220dde0017ea78793747d65f53e11daf23a28fa
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-26 13:27:14 +00:00
Neale Ranns
c17c1873a9 vom: QoS support
Type: feature

Change-Id: If517d10c318fc17fdbd797fac8d974d9851f6442
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-25 09:51:35 +00:00
Jakub Grajciar
cbd179cd39 libmemif: fix chained buffer flag
fixes issue: MEMIF_DESC_FLAG_NEXT persisted when enqueueing
stored buffers

Type: fix

Change-Id: I9e973ed6e0339612fe1dd3e3bd80ed7c05093791
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-07-25 08:55:17 +00:00
Benoît Ganne
6d72c175ed docs: how to enable coredump with systemd
Type: docs

Change-Id: I1f657389fec716cc6cdc942803e65f861ffea5f5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-12 01:51:59 +00:00
Neale Ranns
6955ecd5d7 vom: Fix reference to flags in GBP bridge-domain
Type: fix
Fixes: 5e82b050

Change-Id: I8f709c5303861ea9984144ce5543c86c934869bb
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-11 12:08:22 +00:00
Dave Barach
e5a7d59778 emacs: update the vat plugin generator
Use the VAT_PLUGIN_REGISTER macro.

Type: refactor

Change-Id: I5ab9f311028c07a37a40cc1328d9724f852783ee
Signed-off-by: Dave Barach <dave@barachs.net>
2019-07-10 18:00:59 +00:00
Paul Vinciguerra
57783efb82 misc: extras update list_api_changes.py to PY3
Type: refactor

Change-Id: I099d78393675b7aac37e89df98527c361054077b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-09 14:27:05 +00:00
Damjan Marion
94bef09213 misc: allow second ':' in commit message
Type: fix
Fixes: 26ce6ca
Change-Id: I3ffa1e60966ba3e20670a7b95bba53e86e9861e0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-07-05 18:00:04 +00:00
Neale Ranns
c2ac2357fb fib: allow route delete with no paths and multipath=0 to remove the
whole route

Type: fix
Fixes: 097fa66b

Change-Id: I017ab5797670eb278c27c6e306cd8cadaacddf9d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-03 11:27:44 +00:00
Benoît Ganne
3c0d84c989 gbp: add anonymous l3-out subnets
An anonymous l3-out subnet is a locally attached l3-out subnet, and
differs from regular l3-out subnets in the way adjacencies are managed.
It is required for the anonymous l3-out external interfaces to correctly
classify locally attached l3-out hosts.

Type: feature

Change-Id: Ie7bc88b1f22abc4d0b46db5f3cfbf208bc53ba5f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-02 14:19:15 +00:00
Jakub Grajciar
12df497bb6 libmemif: version 3.0
Add support for multi-thread connection establishment.

- control_fd_update() callback now passes private context
  associated with updated file descriptor. File descriptor
  can belong to memif socket, memif connection or timerfd.
  In case of timerfd the context is NULL.

- memif_create_socket() new API. Creates memif socket
  handle to be passed to memif_create() in memif_conn_args_t.
  This API allows to pass private context whenever the file
  descriptor is updated.

- memif_delete_socket() new API. Deletes memif socket.
  Socket must not be in use by any interface.

Type: feature

Change-Id: I7ca4e4349595d4477195f1c32403d3e3a6eb5361
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-07-02 14:06:46 +00:00
Neale Ranns
8d020854c8 vom: Fix [m]route dump
Type: fix
Fixes: 097fa66b

Change-Id: I4ada76982c680ee9b0af5828c7268b9b2098ce6b
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-02 11:03:22 +00:00
Jakub Grajciar
389c82286d libmemif: icmp-responder example buffer management fix
Type: fix

Change-Id: Ieeb763f282ee929a121585747119f458c00056ae
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-07-01 15:17:13 +00:00
Neale Ranns
160c923f99 gbp: VRF scoped contracts
Type: feature

Change-Id: I01772cfc3a0118a5c49bf346339788824e6931b2
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-01 08:37:53 +00:00
Paul Vinciguerra
ab05508e1e api: refactor format_vl_api_prefix_t return keys
format_vl_api_prefix_t returns a dict with keys 'address' and 'address_length',
but other format_vl_api_prefix functions return a dict with 'prefix', and 'len'.

Refactor all format_vl_api_prefix_t to return consistent keys 'address' and 'len'.

Type: refactor

Change-Id: I5f9558fc2da8742a303266e011102f5b2db80aad
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-26 11:36:57 +00:00
Mohsin Kazmi
17da0c0d82 vom: Add getter for interface admin state
Type: feature

Change-Id: I3409bedb45f033210202c151a2267b036b8b97d6
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-06-26 08:51:25 +00:00
Dave Barach
6e5baf29e2 build: fix error messages in check_commit_msg.sh
Type: fix

Change-Id: I432c22880a418be35ad9f99c3e4afc90449e83d1
Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-25 15:59:05 +00:00
Neale Ranns
bc764c8bc2 l2: BD ARP termination entry API update
Type: refactor

Change-Id: I492b6e88acadf0ab0e4d7b1c0c5d1cab84c1726f
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-19 15:56:18 +00:00
Neale Ranns
097fa66b98 fib: fib api updates
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>
2019-06-18 13:31:39 +00:00
Neale Ranns
ff34b916a9 misc: Update MAINTAINERS to include interface common
Type: feature

Change-Id: I72f35444c73c6a7099d34f7d5031cbe82cbdd383
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-14 09:28:29 +00:00
Damjan Marion
26ce6ca1fe misc: add check_commit_msg.sh script
Type: feature
Change-Id: I5e04991afd7500673db121e4529275e9aff15e65
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-06-12 17:04:40 +00:00
Benoît Ganne
49ee68443d build: add -Wall and -fno-common, fix reported issues
Type: refactor
Change-Id: I8489ccd54411c2aa9355439c5641dc31012c64a2
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-06-07 11:21:59 +00:00
Mohsin Kazmi
1bcb31102f vom: Add bridge domain unknown unicast flooding flag
UU flood can be disabled or enabled using this flag in a bd.

Change-Id: I799be2742b599783eec019b5fd295c3b940eb3e8
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-06-04 07:00:20 +00:00
Mohsin Kazmi
365e724ffe vom: Add bridge domain arp unicast forwarding flag
Change-Id: Iede47e8d9e168125bcd938cca6182c9270dcb5c4
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-06-03 10:42:31 +00:00
Billy McFall
41deceaf25 VPP-1640 - Missing rules in vpp-selinux-policy
SELinux exceptions occurring for host interfaces and with the
vmxnet3 driver.

Change-Id: Ia22bd82572acfa07ae287a755830abe1413f9939
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2019-05-31 11:43:41 +00:00
Billy McFall
5b82610cfa VPP-1679 - SElinux rules are not set accordingly
Updates to the VPP SELinux policy to support the MLX5 DPDK driver.

Change-Id: I089ede88a5e9c4152178f8cf9be5ee14d8a9130f
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2019-05-31 11:43:26 +00:00
Billy McFall
7e5742f6d6 VPP-1640 - Missing rules in vpp-selinux-policy
Add additional section to the SELinux documentation to describe how to
collect debug information when SELinux issues are encountered. This is
purely a documentation change.

Note: Merged seperate from SELinux Policy change in case policy change
needs to be cherry-picked to older releases.

Change-Id: I7ba3d3c7d84171b503d956eb01e13a680b4d53fc
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2019-05-31 11:42:58 +00:00
Dave Barach
913f4c9a88 emacs-skeleton: improve generated .api files
Type cleanups:
  s/u8/bool/ for "enable_disable"
  s/u32/vl_api_interface_index_t/ for "sw_if_index"

Add an API version stamp.
Add a doxygen tag for the binary API.
Add Apache-2 licence text.

Change-Id: I2fa168336efb0f1d9b9b6dec945589cbc5fd5595
Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-29 10:00:21 -04:00
Dave Barach
11965c7b47 Break out the broom for some cleanup work
Maintain the MAINTAINERS file. Removed src/plugins/*.am listings. Added
a couple of plugins.

Add vlib_process_create (vlib_main_t *vm, char *name,
                         vlib_node_function_t *f, u32 log2_n_stack_bytes);
/** @brief Create a vlib process
 *  @param vm &vlib_global_main
 *  @param f the process node function
 *  @param log2_n_stack_bytes size of the process stack, defaults to 16K
 *  @return newly-create node index
 *  @warning call only on the main thread. Barrier sync required.
 */

This function makes it easy to spin up periodic processes when features
are enabled for the first time. That coding pattern is highly recommended.

Update the emacs-lisp plugin generator to use vlib_process_create,
instead of generating static periodic process nodes.

Change-Id: Icda33e93b9034779d3a3e228cd1110af14b058a5
Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-29 07:51:19 +00:00
Benoît Ganne
f0917bd5a7 rpm: VPP-1674: exclude external headers from rpm
External libraries headers such as DPDK, libibverb, quicly, etc. should
not be packaged in vpp-dev RPM.
Only package headers from vpp/ and vom/ subdirs.

Change-Id: Ief1454bd1261c8cf4dcd3b105e28f6852439e896
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-05-23 16:31:27 +02:00
Ole Troan
233e468183 stats: support multiple works for error counters
The current code only allowed access to the main thread error counters.
That is not so useful for a multi worker instance.
No return a vector indexed by thread of counter_t values.

Type: fix

Change-Id: Ie322c8889c0c8175e1116e71de04a2cf453b9ed7
Signed-off-by: Ole Troan <ot@cisco.com>
2019-05-22 09:43:49 +00:00
Dave Barach
35465dc0be emacs-lisp: add missing '\' in template
Fixes the generated setup_message_id_table(...)
implementation. Without a level of quoting in the emacs lisp skeleton,
the underscore macro used to generate calls to
vl_msg_api_add_msg_name_crc produces "fooCRC" instead of "foo_CRC".
That confuses the Python language binding.

Punctuation saves lives: "Let's eat Grandma" vs. "Let's eat, Grandma."
Or some such.

Change-Id: Ibecc20337092199d6757165ac96b70c830511bb3
Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-18 14:53:23 -04:00
jdenisco
abfd778a92 Add the packages for 19.04
Change-Id: I167bb7d86bbb5cba0b265978b4f8faf271b77411
Signed-off-by: jdenisco <jdenisco@cisco.com>
2019-05-02 16:08:08 +00:00
Thomas F Herbert
ca3d38ae18 Freshen RPM dependencies in vpp specfile.
VPP-1650

Also update specfile for fedora. Also update and
rationalize python3 and python2 dependencies
for CentOS.

Change-Id: Ia87abfe7b7080ecd07e485e6c32270fda56a496a
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2019-05-01 18:58:33 +00:00
Paul Vinciguerra
ef1ae3ad01 vpp_config: Update deprecated platform.linux_distribution()
platform.linux_distribution() was deprecated in python 3.5 and removed in 3.8.

update to use distro.linux_distribution().

>>> import platform
>>> platform.linux_distribution()
('Ubuntu', '16.04', 'xenial')

>>> import distro
>>> distro.linux_distribution()
('Ubuntu', '16.04', 'xenial')

Change-Id: Ia8a7cd2d78fd56145cdded0b9d361a1b45bb4d27
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-01 17:24:07 +00:00
Paul Vinciguerra
b11c288f11 vpp_config: correct usage of 'is' for equality tests.
Change-Id: I30b1cdb2930560d7c40c1bde098fd21f16a17683
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-01 17:23:35 +00:00
Filip Varga
dd1e3e780c NAT: VPP-1531 api cleanup & update
Change-Id: I2492400a67b39a3adbc24ab7cf1ba17a409e95a8
Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-04-24 11:09:37 +00:00
Ole Trøan
89fec713f8 Revert "NAT: VPP-1531 api cleanup & update"
This reverts commit bed1421b9f1b3643d93384084972337b596aec73.

/vpp/master3/src/plugins/nat/nat_api.c: In function ‘send_nat_worker_details’:
/vpp/master3/src/vppinfra/clib.h:62:33: error: division ‘sizeof (u8 * {aka unsigned char *}) / sizeof (u8 {aka unsigned char})’ does not compute the number of array elements [-Werror=sizeof-pointer-div]
 #define ARRAY_LEN(x) (sizeof (x)/sizeof (x[0]))
                                 ^
/vpp/master3/src/plugins/nat/nat_api.c:205:43: note: in expansion of macro ‘ARRAY_LEN’
   rmp = vl_msg_api_alloc (sizeof (*rmp) + ARRAY_LEN (w->name) - 1);
                                           ^~~~~~~~~

Change-Id: Ie82672c145fb2f6580827f95e535435307bc7a23
Signed-off-by: Ole Troan <ot@cisco.com>
2019-04-23 15:08:45 +00:00
Filip Varga
bed1421b9f NAT: VPP-1531 api cleanup & update
Change-Id: I519d7efc8ee3c86381d96be2e2a46017cd948895
Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-04-23 11:25:29 +00:00
Dave Wallace
51cbbd2282 Doxygen cleanup.
- Add subpages definitions in appropriate
  section (User or Dev docs) for doc files
  (*.rst, *.md) that being listed at the top
  level of the generated doc page.
- Generate and add API list to RELEASE doc.
- Fix list_api_changes script to use HEAD
  as the endtag so it doesn't need to be
  changed every release.

Change-Id: Iace7b6433359c6b96869cb1db01facbbcb0ac1e6
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 11ee93f6abfaddf5bbd56cf0858c0c6ea0384b65)
2019-04-19 20:38:22 +00:00