Commit Graph

7189 Commits

Author SHA1 Message Date
jdenisco
675c2396a1 docs: Fix conf.py for read the docs
Change-Id: Iaaf9e6ef5acc82fb751c851cc943cf0c48a8940d
Signed-off-by: jdenisco <jdenisco@cisco.com>
2019-07-19 10:22:13 -04:00
Andrew Yourtchenko
f6fcc229d9 misc: 19.01.3 Release Notes
Type: docs

Change-Id: I3f9d243d6f5d99faea67c24c9bf5c42c7a4dc3b0
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-07-19 13:42:01 +00:00
Matthew G Smith
88d29a9206 ip: admin change affects intf IPv4 addr routes
Type: feature

When admin status is changed on an interface, add or delete the
routes for the IPv4 addresses configured on that interface.

This is already being done for IPv6 interface addresses.

Change-Id: Ib1e7dc49c499921dd287e075640243520ffa5589
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2019-07-19 07:35:55 +00:00
Nathan Skrzypczak
9fd996275c vcl: add QUIC support
Type: feature

* Adds the concept of a "connectable listener" : a session that
 can be both connected and accepted on.
* vppcom_session_is_connectable_listener (fd) that tells if the fd
is a connectable listener
* vppcom_session_listener (fd) that gives you the listener's fd
that accepted the session (if any)
* vppcom_session_n_accepted (fd) that gives the number
of sessions a listener accepted.

Change-Id: Id89d67d8339fb15a7cf7e00a9c5448175eca04fc
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-07-18 18:19:05 +00:00
Nathan Skrzypczak
cef02be220 session: Refactor invalid session idx/handle
Type: refactor

Change-Id: I885d9d2af1674f705339e3e96f87ff766965c9e5
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-07-18 18:14:01 +00:00
Vratko Polak
6307415461 build: add more src dirs for generate_json.py
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: 9529feb452
Ticket: VPP-1715

Change-Id: I021afeafdf98904d076953f0b09d1e3587fd3100
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-07-18 16:44:20 +00:00
Benoît Ganne
c30d87e613 tap: fix memory errors with create/delete API
CLI allocates vectors consumed by tap_create_if(), whereas API pass
null-terminated C-strings allocated on API segment.
Do not try to be too clever here, and just allocate our own private
copies.

Type: fix
Fixes: 8d879e1a6b
Ticket: VPP-1724

Change-Id: I3ccdb8e0fcd4cb9be414af9f38cf6c33931a1db7
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-18 15:16:37 +00:00
Andreas Schultz
58b2eb1af5 vlib: convert frame_index into real pointers
The fast path almost always has to deal with the real
pointers. Deriving the frame pointer from a frame_index requires a
load of the 32bit frame_index from memory, another 64bit load of the
heap base pointer and some calculations.

Lets store the full pointer instead and do a single 64bit load only.

This helps avoiding problems when the heap is grown and frames are
allocated below vm->heap_aligned_base.

Type: refactor
Change-Id: Ifa6e6e984aafe1e2755bff80f0a4dfcddee3623c
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2019-07-18 15:07:26 +00:00
Paul Vinciguerra
a0cb32cb9f lb: update api.c to use scaffolding from latest skel
Type: refactor

Change-Id: I01329385684f4a4f477cb046079b554ae3024ded
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-18 07:22:56 +00:00
Vladimir Kropylev
456d2f9c29 tcp: add node with no 6-tuple lookup
Type: feature

Add new node in TCP stack where TCP 6 tuple lookup is not required.
In new node, packet metadata contains connection-index which can be used
to retrieve the TCP connection. The new node will be used by proxy.

Change-Id: I3aa0268946898912f4176d5c8c5903e06657479d
Signed-off-by: Vladimir Kropylev <vladimir.kropylev@enea.com>
2019-07-17 20:35:42 +00:00
Nathan Skrzypczak
f9a46854ac quic: Add back stream connect condition
Type: fix

This is needed for VCL patch in the case the Qsession
handle we connect to is 0. A better way to do this
would be to add a u16 header to the transport_opts,
as session_handles are :
<u16 unused><u16 thread_id><u32 session_index>
But this requires modifying all clients.

Change-Id: If171bcf982eba3bd705b586c9fd4a6c2ad0e114b
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-07-17 15:53:29 +00:00
Paul Vinciguerra
9529feb452 build: add targets for json api files
Type: make
Ticket: VPP-1715

Change-Id: I78497d679d9e793b47a06a0c5cb3b12d86b08489
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-17 13:41:02 +00:00
Florin Coras
6e8b811ee4 session: move constants definition
Type:refactor

Change-Id: Ie4a89ae603cd365b28795c92daa08d5943e692ea
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-17 12:20:50 +00:00
Florin Coras
2062ec0d67 session: use llist in session node evt handling
Type: refactor

Change-Id: I24159e0a848f552b4e27acfb5fe6f2cd91b50a19
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-17 12:20:23 +00:00
Florin Coras
0dfbce6b76 session: grab mq lock until ctrl event is enqueued
Type: fix

Change-Id: I26a6af7f92316f7a8a5309047b3b3605b87ca327
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-17 12:19:01 +00:00
Benoît Ganne
b11e4aefbe vppinfra: elog: fix read overflow in string lookup
elog string hashtable use strlen() to determine string length for
hashing, strings must be NULL-terminated for both inserts and lookups.

Type: fix
Fixes: 9c8ca8dd31

Change-Id: I0680d39a9b89411055fd6adc89c9f253adfae32c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-17 12:17:43 +00:00
Vladimir Kropylev
a2e4451db8 session: fix node enable sequence
Type: fix

Change the sequence to first allocate session_manager and
then enable the session-nodes.

During “session enable”, sometimes an issue was seen when in some cases
POLLING node calls transport_update_time -> tcp_update_time -> tcp_set_time_now
which access tcp_main.wrk_ctx before tcp_main_enable allocates the wrk_ctx.

0  0x00007ffff73f7778 in tcp_set_time_now (wrk=<optimized out>)
    at src/vnet/tcp/tcp.h:953
1  tcp_update_time (now=11.059735140000001, thread_index=<optimized out>)
    at src/vnet/tcp/tcp.c:1192
2  0x00007ffff75a75de in transport_update_time (time_now=11.059735140000001, thread_index=thread_index@entry=1 '\001')
    at src/vnet/session/transport.c:740
3  0x00007ffff75a0f4c in session_queue_node_fn (vm=0x7fff74913480, node=0x7fff75e7d5c0, frame=<optimized out>)
    at src/vnet/session/session_node.c:873

Change-Id: Id2288dd05ba179af2ff22c58bac1331fc21a1c7d
Signed-off-by: Vladimir Kropylev <vladimir.kropylev@enea.com>
2019-07-16 21:32:41 +03:00
Vratko Polak
b659020337 papi: use the injected logger wherever possible
As the injected logger is already expected
to be used everywhere, this is a fix.

The few lines in vpp_serializer.py are not fixed,
but they are not encountered in CSIT testing.

Functions call_logger and return_logger
have single call site each (and confusing names, as they do not log),
so saved few lines by inlining them.

Type: fix

Change-Id: I7dd1e610ef6b885943708bf78bddedfbcf4daa1a
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-07-16 16:33:06 +00:00
Benoît Ganne
31b315707f gbp: fix contracts dpo ACL match
Type: fix
Fixes: 1d6d9f021c

Change-Id: I3912c8bb78d678170bdd86821d2ead3ae0396841
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-16 15:46:16 +00:00
Neale Ranns
41afb33efe ipsec: handle UDP keepalives
Type: feature

Change-Id: I87cc1168466f267e8c4bbec318401982f4bdf03a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-16 15:05:10 +00:00
Neale Ranns
37dab437be ipsec: coverity found c-n-p error
Type: fix
Fixes: 4b0b0d4

Change-Id: Ibd37c9099f9847ed23fa8357fd8e57ee516e52ab
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-16 13:20:22 +00:00
Dave Barach
b09f4d0adb api: enable binary API event logging in vat
Cleaned up a few instances of side-bet elog_string hash table
usage. Elog_string handles that problem itself.

Add cli commands to vat to initialize, enable/disable, and save an
event log.

Event logging at the same time in both vpp and vat yields a pair
of event logs which can be merged by the "test_elog" tool.

Type: refactor

Change-Id: I8d6a72206f2309c967ea1630077fba31aef47f93
Signed-off-by: Dave Barach <dave@barachs.net>
2019-07-16 13:12:12 +00:00
Dave Wallace
7b8a30d08b build: separate pkg builds from verify target
- This patch is required to eliminate the use
  of .../vpp/extras/vagrant/build.sh by other
  projects in order to build VPP packages for
  verification/integration testing.

Type: fix

Change-Id: I63e08b27b715c0d40b44e2ce7b3e9a7ebf4f514b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-07-16 11:43:19 +00:00
Mathias Raoul
9082b43dd0 quic: integrate vpp crypto api for quic packets encryption
Type: feature

Change-Id: I740f15a5ef959d31e94e59d652aa9f691db1f289
Signed-off-by: Mathias Raoul <mathias.raoul@gmail.com>
2019-07-15 23:29:21 +02:00
Neale Ranns
4b0b0d4b53 ipsec: rewind missing from dual loop
Type: fix
Fixes: a6bee0a1

Change-Id: I1959e28b82825d7928d471d3dfa827ea4cdd74b7
Signed-off-by: Giles Heron <giheron@cisco.com>
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-15 16:25:25 +00:00
Wei CHEN
f974794e2e interface: fix issue that pcap rx/tx trace not available when there are worker threads
Type: fix

Change-Id: Ie9a3a78b45b53344a0a5d7e2027c0e0354a49ebe
Signed-off-by: Wei CHEN <weichen@astri.org>
2019-07-15 11:09:53 +00:00
Florin Coras
692b9498ee session: allow transports to generate closed notifications
In contrast to the closing notification, whereby a transport informs
the session layer that is beginning the closing procedure, this allows
transports to notify the session layer of the fact that the transport is
"fully" closed, i.e., it expects no more data.

Also:
- adds app closed state for sessions
- changes tcp to have it notify when an active close has finished

Type: feature

Change-Id: I13c738006c03f85015e05ab82843a33a69382aaf
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-15 01:39:15 +00:00
Paul Vinciguerra
53c5015121 api: add DSCP definitions to ip_types.api
- also adds ecn definitions.

Type: feature

Change-Id: Id98d9ae57289425fcfed367f426442173ef4e882
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-14 17:14:21 +00:00
Paul Vinciguerra
f7457521b6 tests: fix error in VppDiedError exception
Discovered running test-debug job in CI.

- fix missing paren () around format value.
Type: test

Change-Id: Iebddd3035a435f8ad1cb1d6fa4e8e8c2d4ddaf96
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-14 17:13:20 +00:00
Florin Coras
b957d807a6 vppinfra: add doubly linked list
Type: feature

Change-Id: I21511c1abea703da67f1a491e73342496275c498
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-13 12:15:23 +00:00
John Lo
b966b96aa4 nsim: cross-connect mode crash at interface output node
Type: fix

Change-Id: If99c1d8a7ec97a726430a927eab0d3b57222af1f
Signed-off-by: John Lo <loj@cisco.com>
2019-07-12 18:04:20 +00:00
Dave Barach
edff805464 docs: add compressed core file description
To the issue reporting page

Change-Id: I3d2b53521bcb1b9b4a85802a84427f17390f0f77
Type: docs
Signed-off-by: Dave Barach <dave@barachs.net>
2019-07-12 18:01:10 +00:00
Aloys Augustin
95dd1fe279 quic: fix show session verbose
Proprely display quic connections in show session verbose, and add a
small fix for UDPC listeners and UDP sessions formatting.

Change-Id: I33f83e77bf357347623d87ad23c483aba60a9bb2
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Type: feature
2019-07-12 17:55:31 +00:00
Aloys Augustin
bec771b879 tls quic: reduce default segment sizes
This reduces the memory required by tls and quic, allowing to run them
(and their tests) in more constrained environments by default.

Change-Id: I954081c725fb4f5f173db1f8e76922d957c5b0a2
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Type: fix
2019-07-12 17:49:40 +00:00
Aloys Augustin
a0abbff484 session: add thread index to all formatters
Add a thread_index argument to half-open and listener session formatters
because QUIC can have listeners and half-open sessions in any thread.

Change-Id: I1de60e35ece4c68ba8cfdd6b63f211bc620d687b
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Type: feature
2019-07-12 16:26:08 +00:00
Benoît Ganne
fe67afdd93 vcl: fix namespace debug print
vcm->cfg.namespace_id is a vector and not a null-terminated C-string.

Type: fix
Fixes: 8af2054b78

Change-Id: I9324712f053066790a30fed617c9cac673f0fbd7
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-12 16:21:44 +00:00
Benoît Ganne
0af49a8fc9 svm: handles heap dlmalloc allocation failure
Type: fix
Fixes: 6a5adc3695

Change-Id: I21091fc2938cababeb28bacf7c5e457a05ab6272
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-12 16:21:03 +00:00
Benoît Ganne
2f7364a9ad vcl: fix tsock 0-ing in test client
Type: fix
Fixes: d48e9763bf

Change-Id: I9af222f4083a82592058fd42950db1c97caf647e
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-12 16:17:09 +00:00
Matthew Smith
401aedfb03 ipsec: drop outbound ESP when no crypto alg set
Type: fix

If a tunnel interface has the crypto alg set on the outbound SA to
IPSEC_CRYPTO_ALG_NONE and packets are sent out that interface,
the attempt to write an ESP trailer on the packet occurs at the
wrong offset and the vnet buffer opaque data is corrupted, which
can result in a SEGV when a subsequent node attempts to use that
data.

When an outbound SA is set on a tunnel interface which has no crypto
alg set, add a node to the ip{4,6}-output feature arcs which drops all
packets leaving that interface instead of adding the node which would
try to encrypt the packets.

Change-Id: Ie0ac8d8fdc8a035ab8bb83b72b6a94161bebaa48
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2019-07-12 14:23:28 +00:00
Neale Ranns
43ba29267b ip: Trace the packet from the punt node
Type: feature

Change-Id: I01f1cc53efc93b0a7bb588ea6db89a53c971a3f5
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-12 12:28:24 +00:00
Filip Varga
deb5827347 nat: added handoff trace index for easier trace match
Type: feature

Change-Id: Id818f86164acabcb732e9a65d0e284d68e747a7b
Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-07-12 12:27:32 +00:00
Neale Ranns
495d7ffbc8 ipsec: Reference count the SAs
- this remove the need to iterate through all state when deleting an SA
- and ensures that if the SA is deleted by the client is remains for use
in any state until that state is also removed.

Type: feature

Change-Id: I438cb67588cb65c701e49a7a9518f88641925419
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-12 12:24:55 +00:00
YohanPipereau
def35a2352 vom: build VOM package when CI builds
Commit 752f5b4302 added
vom-pkg-{rpm,deb} instructions.
This enables CI to package VOM and push it to packagecloud.

Change-Id: I647b4ac6ae19d2414529697082cf5a81e724dfe0
Type: make
Signed-off-by: YohanPipereau <ypiperea@cisco.com>
2019-07-12 12:17:20 +00:00
Benoît Ganne
3f88a74d14 nat: fix net44 lb static API
tag should be added at the end of the reply message instead of
overwriting the original data.

Type: fix
Fixed: dd1e3e780c

Change-Id: I4b31cf3a4a41b49ea9039a9398114dbf49a53e57
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-12 10:39:04 +00:00
Paul Vinciguerra
79a32a4a10 tests: remove invalid arguments passed to papi
This changeset removes keys that are invalid in papi kwargs.

Type: test

Change-Id: I6568f91cd240dc1927540396210b429f6ce82c0a
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-12 08:33:44 +00:00
Paul Vinciguerra
dfd57229e9 papi: fix vpp_format from change in vl_api_prefix_t
cherry picking fix for bug introduced by https://gerrit.fd.io/r/#/c/20011/

- also fixes unit tests.

Type: fix
Fixes: ab05508e1e

Change-Id: I8287385f094911ea70de4751a716a7e0e6521b64
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-12 08:33:05 +00:00
Neale Ranns
719beb7098 ip ipsec: Remove IPSec SPI-0 punt reason
Type: fix

There's no call for an SPI-0 punt reason with UDP encap, since
it's only with UDP encap that the ambiguity between IKE or IPSEC
occurs (and SPI=0 determines IKE).

Enhance the punt API to dum ponly the reason requested, so a client
can use this as a get-ID API

Change-Id: I5c6d72b03885e88c489117677e72f1ef5da90dfc
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-12 07:38:47 +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
Benoît Ganne
bbe6d110a1 syslog: fix syslog structured data formatting
syslog structured data are stored as vectors not null-terminated
C-strings. Use '%v' instead of '%s'.

Type: fix
Fixes: b4515b4be4

Change-Id: Iba224f271c832daca90d4bbccfef45d0f563fe60
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-12 01:50:55 +00:00
Dave Barach
9e4946b324 vppinfra: bihash add-but-do-not-overwrite semantics
If is_add=2, fail w/ return value -2 if the key exists instead of
overwriting the (key,value) pair.

Type: feature

Change-Id: I00a3c194a381c68090369c31d6c6f9870cfe0a62
Signed-off-by: Dave Barach <dave@barachs.net>
2019-07-11 18:04:20 +00:00