vpp.git
4 years agosession: Use parent_handle instead of transport_opts 92/20692/5
Nathan Skrzypczak [Wed, 17 Jul 2019 09:02:20 +0000 (11:02 +0200)]
session: Use parent_handle instead of transport_opts

Type: feature

This is mostly used for quic in the case of a stream
creation (i.e. connect on an already established QUIC
session). We want do default parent_handle to INVALID
to be able to distinguish it from parent_handle = 0

Change-Id: Id5ac0b0155a3c44e51334231b711e4fd87a96a10
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agovat: remove #if BUILTIN from vat_main_t definition 45/20745/2
Dave Barach [Fri, 19 Jul 2019 12:25:37 +0000 (08:25 -0400)]
vat: remove #if BUILTIN from vat_main_t definition

Otherwise, vat plugins will be confused about the offset from &vat_main
of the vlib_main_t * pointer, leading to NULL pointer crashes.

Type: fix

Change-Id: I7298b7ce8c000217ed7fdd2e97a3cbf978464377
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agoapi: fix coverity warning 47/20747/2
Dave Barach [Fri, 19 Jul 2019 13:31:29 +0000 (09:31 -0400)]
api: fix coverity warning

Type: fix
Ticket: VPP-1649

Change-Id: Ia159d0f67d33719d05fa2dbd82f9c8c9b5d8f2a9
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agoipsec: register for port 4500 at INIT 37/20737/3
Neale Ranns [Fri, 19 Jul 2019 07:59:45 +0000 (00:59 -0700)]
ipsec: register for port 4500 at INIT

Type: fix
Fixes: 41afb33

Change-Id: Iceb99ead32f1858a5b4f85911d7cb2b39cc9add5
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agovppinfra: fix OOM check in bihash 39/20739/2
Andreas Schultz [Fri, 19 Jul 2019 09:14:50 +0000 (11:14 +0200)]
vppinfra: fix OOM check in bihash

The OOM check must consider the end of alloced arena and
not the start when checking for overflow.

Type: fix
Change-Id: Ie83e653d0894199d2fa433a604a0fe0cee142338
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
4 years agodocs: Fix conf.py for read the docs 49/20749/1
jdenisco [Fri, 19 Jul 2019 14:21:41 +0000 (10:21 -0400)]
docs: Fix conf.py for read the docs

Change-Id: Iaaf9e6ef5acc82fb751c851cc943cf0c48a8940d
Signed-off-by: jdenisco <jdenisco@cisco.com>
4 years agomisc: 19.01.3 Release Notes 24/20724/4
Andrew Yourtchenko [Thu, 18 Jul 2019 11:03:34 +0000 (11:03 +0000)]
misc: 19.01.3 Release Notes

Type: docs

Change-Id: I3f9d243d6f5d99faea67c24c9bf5c42c7a4dc3b0
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
4 years agoip: admin change affects intf IPv4 addr routes 11/20711/4
Matthew G Smith [Wed, 17 Jul 2019 15:01:17 +0000 (10:01 -0500)]
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>
4 years agovcl: add QUIC support 50/19650/17
Nathan Skrzypczak [Thu, 16 May 2019 12:38:44 +0000 (14:38 +0200)]
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>
4 years agosession: Refactor invalid session idx/handle 90/20690/4
Nathan Skrzypczak [Wed, 17 Jul 2019 08:20:45 +0000 (10:20 +0200)]
session: Refactor invalid session idx/handle

Type: refactor

Change-Id: I885d9d2af1674f705339e3e96f87ff766965c9e5
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agobuild: add more src dirs for generate_json.py 26/20726/2
Vratko Polak [Thu, 18 Jul 2019 13:58:41 +0000 (15:58 +0200)]
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: 9529feb4525dfd13e5636640083361256121d275
Ticket: VPP-1715

Change-Id: I021afeafdf98904d076953f0b09d1e3587fd3100
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
4 years agotap: fix memory errors with create/delete API 68/20668/2
Benoît Ganne [Mon, 15 Jul 2019 15:16:49 +0000 (17:16 +0200)]
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: 8d879e1a6bac47240a232893e914815f781fd4bf
Ticket: VPP-1724

Change-Id: I3ccdb8e0fcd4cb9be414af9f38cf6c33931a1db7
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agovlib: convert frame_index into real pointers 63/20663/4
Andreas Schultz [Mon, 15 Jul 2019 13:40:56 +0000 (15:40 +0200)]
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>
4 years agolb: update api.c to use scaffolding from latest skel 56/20656/2
Paul Vinciguerra [Sun, 14 Jul 2019 17:47:43 +0000 (13:47 -0400)]
lb: update api.c to use scaffolding from latest skel

Type: refactor

Change-Id: I01329385684f4a4f477cb046079b554ae3024ded
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agotcp: add node with no 6-tuple lookup 82/20682/7
Vladimir Kropylev [Tue, 16 Jul 2019 18:22:29 +0000 (21:22 +0300)]
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>
4 years agoquic: Add back stream connect condition 76/20676/3
Nathan Skrzypczak [Tue, 16 Jul 2019 08:58:58 +0000 (10:58 +0200)]
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>
4 years agobuild: add targets for json api files 71/20671/5
Paul Vinciguerra [Mon, 15 Jul 2019 19:22:31 +0000 (15:22 -0400)]
build: add targets for json api files

Type: make
Ticket: VPP-1715

Change-Id: I78497d679d9e793b47a06a0c5cb3b12d86b08489
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agosession: move constants definition 84/20684/3
Florin Coras [Tue, 16 Jul 2019 22:30:15 +0000 (15:30 -0700)]
session: move constants definition

Type:refactor

Change-Id: Ie4a89ae603cd365b28795c92daa08d5943e692ea
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agosession: use llist in session node evt handling 73/20673/14
Florin Coras [Mon, 15 Jul 2019 20:15:18 +0000 (13:15 -0700)]
session: use llist in session node evt handling

Type: refactor

Change-Id: I24159e0a848f552b4e27acfb5fe6f2cd91b50a19
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agosession: grab mq lock until ctrl event is enqueued 65/20665/2
Florin Coras [Mon, 15 Jul 2019 14:48:27 +0000 (07:48 -0700)]
session: grab mq lock until ctrl event is enqueued

Type: fix

Change-Id: I26a6af7f92316f7a8a5309047b3b3605b87ca327
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agovppinfra: elog: fix read overflow in string lookup 94/20694/2
Benoît Ganne [Wed, 17 Jul 2019 09:45:20 +0000 (11:45 +0200)]
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: 9c8ca8dd3197e40dfcb8bcecd95c10eeb56239ed

Change-Id: I0680d39a9b89411055fd6adc89c9f253adfae32c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agosession: fix node enable sequence 83/20683/1
Vladimir Kropylev [Tue, 16 Jul 2019 18:32:41 +0000 (21:32 +0300)]
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>
4 years agopapi: use the injected logger wherever possible 60/20660/3
Vratko Polak [Tue, 16 Jul 2019 12:32:55 +0000 (14:32 +0200)]
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>
4 years agogbp: fix contracts dpo ACL match 80/20680/2
Benoît Ganne [Mon, 15 Jul 2019 14:29:19 +0000 (16:29 +0200)]
gbp: fix contracts dpo ACL match

Type: fix
Fixes: 1d6d9f021c5a169dedca55b46451ab54728e3ee8

Change-Id: I3912c8bb78d678170bdd86821d2ead3ae0396841
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agoipsec: handle UDP keepalives 77/20677/2
Neale Ranns [Tue, 16 Jul 2019 13:19:35 +0000 (06:19 -0700)]
ipsec: handle UDP keepalives

Type: feature

Change-Id: I87cc1168466f267e8c4bbec318401982f4bdf03a
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoipsec: coverity found c-n-p error 75/20675/2
Neale Ranns [Tue, 16 Jul 2019 07:53:22 +0000 (00:53 -0700)]
ipsec: coverity found c-n-p error

Type: fix
Fixes: 4b0b0d4

Change-Id: Ibd37c9099f9847ed23fa8357fd8e57ee516e52ab
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoapi: enable binary API event logging in vat 72/20672/3
Dave Barach [Mon, 15 Jul 2019 20:00:03 +0000 (16:00 -0400)]
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>
4 years agobuild: separate pkg builds from verify target 69/20669/2
Dave Wallace [Mon, 15 Jul 2019 16:03:51 +0000 (12:03 -0400)]
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>
4 years agoquic: integrate vpp crypto api for quic packets encryption 33/20633/9
Mathias Raoul [Fri, 12 Jul 2019 17:11:49 +0000 (19:11 +0200)]
quic: integrate vpp crypto api for quic packets encryption

Type: feature

Change-Id: I740f15a5ef959d31e94e59d652aa9f691db1f289
Signed-off-by: Mathias Raoul <mathias.raoul@gmail.com>
4 years agoipsec: rewind missing from dual loop 59/20659/3
Neale Ranns [Mon, 15 Jul 2019 08:04:11 +0000 (01:04 -0700)]
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>
4 years agointerface: fix issue that pcap rx/tx trace not available when there are worker threads 42/20342/6
Wei CHEN [Wed, 26 Jun 2019 03:01:15 +0000 (11:01 +0800)]
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>
4 years agosession: allow transports to generate closed notifications 51/20651/6
Florin Coras [Fri, 12 Jul 2019 22:01:53 +0000 (15:01 -0700)]
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>
4 years agoapi: add DSCP definitions to ip_types.api 55/20655/6
Paul Vinciguerra [Sat, 13 Jul 2019 13:45:39 +0000 (09:45 -0400)]
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>
4 years agotests: fix error in VppDiedError exception 54/20654/2
Paul Vinciguerra [Sat, 13 Jul 2019 13:35:38 +0000 (09:35 -0400)]
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>
4 years agovppinfra: add doubly linked list 72/20572/17
Florin Coras [Wed, 10 Jul 2019 02:02:33 +0000 (19:02 -0700)]
vppinfra: add doubly linked list

Type: feature

Change-Id: I21511c1abea703da67f1a491e73342496275c498
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agonsim: cross-connect mode crash at interface output node 99/20599/3
John Lo [Wed, 10 Jul 2019 20:44:32 +0000 (16:44 -0400)]
nsim: cross-connect mode crash at interface output node

Type: fix

Change-Id: If99c1d8a7ec97a726430a927eab0d3b57222af1f
Signed-off-by: John Lo <loj@cisco.com>
4 years agodocs: add compressed core file description 29/20629/2
Dave Barach [Fri, 12 Jul 2019 14:24:03 +0000 (10:24 -0400)]
docs: add compressed core file description

To the issue reporting page

Change-Id: I3d2b53521bcb1b9b4a85802a84427f17390f0f77
Type: docs
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agoquic: fix show session verbose 31/20631/3
Aloys Augustin [Fri, 12 Jul 2019 15:11:04 +0000 (17:11 +0200)]
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

4 years agotls quic: reduce default segment sizes 22/20622/3
Aloys Augustin [Fri, 12 Jul 2019 09:05:35 +0000 (11:05 +0200)]
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

4 years agosession: add thread index to all formatters 27/20627/2
Aloys Augustin [Fri, 12 Jul 2019 10:16:16 +0000 (12:16 +0200)]
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

4 years agovcl: fix namespace debug print 24/20624/2
Benoît Ganne [Fri, 12 Jul 2019 09:53:07 +0000 (11:53 +0200)]
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>
4 years agosvm: handles heap dlmalloc allocation failure 26/20626/2
Benoît Ganne [Fri, 12 Jul 2019 09:34:16 +0000 (11:34 +0200)]
svm: handles heap dlmalloc allocation failure

Type: fix
Fixes: 6a5adc3695

Change-Id: I21091fc2938cababeb28bacf7c5e457a05ab6272
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agovcl: fix tsock 0-ing in test client 25/20625/2
Benoît Ganne [Fri, 12 Jul 2019 09:27:28 +0000 (11:27 +0200)]
vcl: fix tsock 0-ing in test client

Type: fix
Fixes: d48e9763bfc39106eca954a28223b72261bf1aeb

Change-Id: I9af222f4083a82592058fd42950db1c97caf647e
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agoipsec: drop outbound ESP when no crypto alg set 93/20593/2
Matthew Smith [Mon, 8 Jul 2019 19:45:04 +0000 (14:45 -0500)]
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>
4 years agoip: Trace the packet from the punt node 78/20578/3
Neale Ranns [Wed, 10 Jul 2019 08:48:55 +0000 (08:48 +0000)]
ip: Trace the packet from the punt node

Type: feature

Change-Id: I01f1cc53efc93b0a7bb588ea6db89a53c971a3f5
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agonat: added handoff trace index for easier trace match 12/20612/7
Filip Varga [Thu, 11 Jul 2019 16:08:43 +0000 (12:08 -0400)]
nat: added handoff trace index for easier trace match

Type: feature

Change-Id: Id818f86164acabcb732e9a65d0e284d68e747a7b
Signed-off-by: Filip Varga <fivarga@cisco.com>
4 years agoipsec: Reference count the SAs 23/20623/2
Neale Ranns [Fri, 12 Jul 2019 09:15:26 +0000 (09:15 +0000)]
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>
4 years agovom: build VOM package when CI builds 85/20585/5
YohanPipereau [Wed, 10 Jul 2019 12:00:14 +0000 (14:00 +0200)]
vom: build VOM package when CI builds

Commit 752f5b4302317e2ccfbd1903d31d3e857d719c4d 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>
4 years agonat: fix net44 lb static API 91/20591/2
Benoît Ganne [Wed, 10 Jul 2019 15:09:13 +0000 (17:09 +0200)]
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>
4 years agotests: remove invalid arguments passed to papi 17/20617/2
Paul Vinciguerra [Thu, 11 Jul 2019 23:09:30 +0000 (19:09 -0400)]
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>
4 years agopapi: fix vpp_format from change in vl_api_prefix_t 18/20618/2
Paul Vinciguerra [Thu, 11 Jul 2019 23:25:43 +0000 (19:25 -0400)]
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: ab05508e1eb96749b68de8ccd2f6f88ff3e64fad

Change-Id: I8287385f094911ea70de4751a716a7e0e6521b64
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agoip ipsec: Remove IPSec SPI-0 punt reason 74/20574/3
Neale Ranns [Wed, 10 Jul 2019 07:10:25 +0000 (07:10 +0000)]
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>
4 years agodocs: how to enable coredump with systemd 99/20499/3
Benoît Ganne [Thu, 4 Jul 2019 09:25:59 +0000 (11:25 +0200)]
docs: how to enable coredump with systemd

Type: docs

Change-Id: I1f657389fec716cc6cdc942803e65f861ffea5f5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agosyslog: fix syslog structured data formatting 90/20590/3
Benoît Ganne [Wed, 10 Jul 2019 15:01:09 +0000 (17:01 +0200)]
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>
4 years agovppinfra: bihash add-but-do-not-overwrite semantics 48/20548/2
Dave Barach [Mon, 8 Jul 2019 18:47:44 +0000 (14:47 -0400)]
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>
4 years agoip: Punt node does not free iovecs 76/20576/2
Neale Ranns [Wed, 10 Jul 2019 08:47:15 +0000 (01:47 -0700)]
ip: Punt node does not free iovecs

Type: fix
Fixes: f7a55ad74c

Change-Id: Ic3474e746887f880a8f6246bebc399715bac8e80
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoipsec: Revert "IPSEC: remove byte swap operations in DP during SPD classify" 02/20602/3
Neale Ranns [Wed, 10 Jul 2019 13:46:21 +0000 (13:46 +0000)]
ipsec: Revert "IPSEC: remove byte swap operations in DP during SPD classify"

Type: fix
Fixes: 231c4696872cb344f28648949603840136c0795d

This reverts commit 231c4696872cb344f28648949603840136c0795d.

Change-Id: I136344555983dd10a31dbc000ee40e2de2c91291
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoipsec: Revert "IPSEC: remove double byte swap of IP addresses" 03/20603/2
Neale Ranns [Thu, 11 Jul 2019 09:31:19 +0000 (09:31 +0000)]
ipsec: Revert "IPSEC: remove double byte swap of IP addresses"

This reverts commit 9b208ced585d3b4620d6fde586cd047fe2027ecf.

Type: fix
Fixes: 9b208ced585d3b4620d6fde586cd047fe2027ecf

Change-Id: I94a17039b4727bff0877423da5ba6cfceb188b17
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agogbp: An Endpoint can change sclass 75/20575/2
Neale Ranns [Wed, 10 Jul 2019 08:14:58 +0000 (01:14 -0700)]
gbp: An Endpoint can change sclass

Type: feature

Change-Id: I9d3a73a6a6048fa0189f7fa6306a638279977fcd
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoavf: add more link speeds 50/20150/3
Damjan Marion [Fri, 14 Jun 2019 19:14:36 +0000 (21:14 +0200)]
avf: add more link speeds

Type: feature
Change-Id: I6f94f7ef5ffbd938457c9356a5a11f3d1afeb0a2
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agoquic: Fix quic_echo event flags 09/20609/1
Nathan Skrzypczak [Thu, 11 Jul 2019 13:58:34 +0000 (15:58 +0200)]
quic: Fix quic_echo event flags

Type: fix

Change-Id: Ibaa272b57f36b092897a99a65ca28f9d4caf29a7
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agovom: Fix reference to flags in GBP bridge-domain 05/20605/2
Neale Ranns [Thu, 11 Jul 2019 10:44:16 +0000 (03:44 -0700)]
vom: Fix reference to flags in GBP bridge-domain

Type: fix
Fixes: 5e82b050

Change-Id: I8f709c5303861ea9984144ce5543c86c934869bb
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agotcp: improve rate estimate 68/20368/6
Florin Coras [Wed, 26 Jun 2019 16:12:34 +0000 (09:12 -0700)]
tcp: improve rate estimate

Type:feature

- sample rtt estimation
- report acked+sacked
- report last lost bytes
- use snd_una == snd_nxt to detect 0 bytes in flight

Change-Id: I83181261fdb375c7e33d24b7a82343561e6a905f
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoip: fix show ip neigh vector read overflow 84/20584/3
Benoît Ganne [Wed, 10 Jul 2019 13:40:33 +0000 (15:40 +0200)]
ip: fix show ip neigh vector read overflow

Both format_ethernet_arp_ip4_entry() and format_ip6_neighbor_ip6_entry()
used %s to format flags which is a vector and not a null-terminated
C-string.
Introduce format_ip_neighbor_flags() instead.

Type: fix
Fixes: 102ec52bc4

Change-Id: I0c9349fefbeb76471933de358acceb50512a21aa
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agovlib: Replace timer in CLI with an event process 73/20573/3
Chris Luke [Wed, 10 Jul 2019 03:33:30 +0000 (23:33 -0400)]
vlib: Replace timer in CLI with an event process

The CLI code, when it accepts a socket connection, ran a timer
for each session that would ensure the CLI session was started
should the TELNET negotiation stage fail to complete.

It has since transpired that this is unsafe; the timer is capable
of firing in critical sections, during a spinlock, and since we
peform non-trivial things in the handler it can cause a deadlock.

This was reported recently in VPP-1711 but a search of history
suggests this may also be (one of) the causes in VPP-1413.

This change replaces that method with an event-driven process.
The process is created when the first socket connection is
accepted.

When new connections are created the process is sent an event
to register the new session in a list. That event process has
a loop that evaluates the list of oustanding sessions and if
a deadline expires, their session is started if it has not been
already, and then removed from the list.

If we have pending sessions then the loop waits on a timer or an
event; if there are no sessions it waits on events only.

Type: fix
Ticket: VPP-1711
Change-Id: I8c6093b7d0fc1bea0eb790032ed282a0ca169194
Signed-off-by: Chris Luke <chrisy@flirble.org>
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agoemacs: update the vat plugin generator 68/20568/2
Dave Barach [Tue, 9 Jul 2019 18:22:21 +0000 (14:22 -0400)]
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>
4 years agomisc: fix buffer issue in geneve_input 28/20528/5
Zhiyong Yang [Sat, 6 Jul 2019 09:14:54 +0000 (05:14 -0400)]
misc: fix buffer issue in geneve_input

Type: fix

Change-Id: I32000cd42b0ab2ce54a159c6727823fd0d113fe4
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agoquic: Improve timing interface for quic_echo 67/20567/3
Nathan Skrzypczak [Tue, 9 Jul 2019 16:04:00 +0000 (18:04 +0200)]
quic: Improve timing interface for quic_echo

Type: feature

Change-Id: I7a99b72276878625017c73dff8402f3e7fa7c33f
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agofib: fib_entry_flags_update takes a vector of paths 66/20566/2
Neale Ranns [Tue, 9 Jul 2019 14:29:35 +0000 (14:29 +0000)]
fib: fib_entry_flags_update takes a vector of paths

Type: fix
Fixes: 097fa66b

Change-Id: I690e31433b64f11399c08b4a0318762916c2c2f0
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agotests: Re-enable ipsec tests on ARM 32/20532/3
juraj.linkes [Mon, 8 Jul 2019 08:22:55 +0000 (10:22 +0200)]
tests: Re-enable ipsec tests on ARM

Type: fix

* test_ipsec_tun_if_esp.TestIpsecGreTebIfEsp
* test_ipsec_esp.TestIpsecEspAll
  add keepalive messages before each algo/engine to prevent test timeout

Change-Id: I726f3f9613bab02a65e65542cee494c68176ded7
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
4 years agoacl: perform the ACL-as-a-service user registrations in global heap 95/20295/2
Andrew Yourtchenko [Mon, 24 Jun 2019 15:13:06 +0000 (15:13 +0000)]
acl: perform the ACL-as-a-service user registrations in global heap

Some users tend to call registration routine long before they need
that service - which triggers an immediate initialization of
the ACL heap, which is rather big. This commit defers this process
by keeping the registrations in the global heap.

Change-Id: I5825871bd836851942b55184b6ee2657c7a9cc33
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
4 years agosession: notify app of session and transport cleanup 49/20549/4
Florin Coras [Mon, 8 Jul 2019 18:47:18 +0000 (11:47 -0700)]
session: notify app of session and transport cleanup

Type:feature

Change-Id: Ic9515c0b11ca6f75503f47ec6b2c58d240afb144
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoquic: echo thread can handle multiple sessions 45/20545/4
Nathan Skrzypczak [Mon, 8 Jul 2019 16:18:27 +0000 (18:18 +0200)]
quic: echo thread can handle multiple sessions

Type: feature

Change-Id: Ibb60d5b46aafe109a81a8604712a917f6e246eaf
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agoudp: UDPC handle open fail 02/20502/4
Nathan Skrzypczak [Thu, 4 Jul 2019 12:20:17 +0000 (14:20 +0200)]
udp: UDPC handle open fail

Type: fix

Change-Id: Ib8fb4957f4da9e464e2575c45c8ff3828db89872
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agotests: remove unused class attribute in VppTestCase 61/20561/2
Paul Vinciguerra [Tue, 9 Jul 2019 13:42:18 +0000 (09:42 -0400)]
tests: remove unused class attribute in VppTestCase

Identified in post-merge review.

Type: test

Change-Id: I46e19285479437561a43975ba9b5cb68f478736c
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agogbp: Ownership of dynamically created vxlan-gbp tunnels managed via gbp_itf 43/20543/7
Neale Ranns [Fri, 5 Jul 2019 07:53:45 +0000 (00:53 -0700)]
gbp: Ownership of dynamically created vxlan-gbp tunnels managed via gbp_itf

Type: fix

This solves the ownership of vxlan-gbp tunnels. When the last reference of these goes away they need to be deleted. Currently there are two owners; gbp_itf via gef_itf and the lock held by the gbp_endpoint_location_t. The problem is that the
loc removes its reference whilst the fwd still holds the gbp_itf, and things go wrong.
This change moves the lifecycle management of the vxlan-gbp tunnel to the gbp_itf. When the last lock of the gbp_itf goes, so does the tunnel. now both the EP's loc and fwd can hold a lock on the gbp_itf and it's only removed when required.
The other change is the management of the 'user' of the gbp_itf. Since each user can enable and disable different features, it's the job of the gbp_itf to apply the combined set. determining a unique 'uesr' from the caller was near impossible, so I moved that to the gbp_itf, and return the allocated user, hence the 'handle' that encodes both user and interface.

The hash table maps from sw_if_index to pool index.

Change-Id: I4c7bf4c0e5dcf33d1c545f262365e69151febcf4
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agotcp: remove warning for multi-seg scnario. 53/20553/5
Simon Zhang [Tue, 9 Jul 2019 08:19:26 +0000 (16:19 +0800)]
tcp: remove warning for multi-seg scnario.

Type: fix

Change-Id: I64e2082bd8ac5b0be21e10407dc29ba4c3f4cab3
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
4 years agovat: unload unused vat plugins 64/20564/2
Dave Barach [Tue, 9 Jul 2019 14:04:18 +0000 (10:04 -0400)]
vat: unload unused vat plugins

If the corresponding vpp plugin is absent, return a non-zero
clib_error_t * from vat_plugin_register ("xxx plugin not loaded"). The
vat plugin calls dlclose on the vat plugin, and it disappears.

Depending on the plugin configuration, this can reduce the vpp virtual
size by several gigabytes.

Added a VAT_PLUGIN(<plugin-name>) macro to vat_helper_macros, clean up
boilerplate vat_plugin_register() implementations. Fixed a number of
non-standard vat_plugin_register methods.

Type: refactor

Change-Id: Iac908e5af7d5497c78d6aa9c3c51cdae08374045
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agofib: fix urpf_itfs vector overflow 58/20558/2
Benoît Ganne [Tue, 9 Jul 2019 11:50:35 +0000 (13:50 +0200)]
fib: fix urpf_itfs vector overflow

When removing duplicates in urpf_itfs vector we search for the 1st next
different entry in the vector, but the loop test is in the wrong order:
(urpf->furpf_itfs[i] == urpf->furpf_itfs[j]
  && j < vec_len(urpf->furpf_itfs))
We must check for overflow before checking equality.

Type: fix
Fixes: 3ee44040c66cbe47ff292ac7fb0badccbe2afe6d

Change-Id: I63729aff12057d5abce6c24ec24339cd9cd79494
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agomisc: extras update list_api_changes.py to PY3 68/20468/2
Paul Vinciguerra [Tue, 2 Jul 2019 21:37:46 +0000 (17:37 -0400)]
misc: extras update list_api_changes.py to PY3

Type: refactor

Change-Id: I099d78393675b7aac37e89df98527c361054077b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agotcp: track last lost bytes in sack sb 27/20527/5
Florin Coras [Sat, 6 Jul 2019 01:31:54 +0000 (18:31 -0700)]
tcp: track last lost bytes in sack sb

Type:feature

Change-Id: I687809ebcc759cec8cb1d5c3b2b7e6bc995a7985
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoquic: add back missing test timeout 59/20559/2
Nathan Skrzypczak [Tue, 9 Jul 2019 12:36:31 +0000 (14:36 +0200)]
quic: add back missing test timeout

Type: fix

Change-Id: Ic153b2bc754ee69949f6e5fd412c474f9ed722f0
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agoquic: fix passive disconnect handling & refactor 25/20525/4
Nathan Skrzypczak [Thu, 4 Jul 2019 12:32:40 +0000 (14:32 +0200)]
quic: fix passive disconnect handling & refactor

Type: refactor

Change-Id: Ie54a77252e9f58a90f9e1f9595b9ede354952f70
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agotests: treat all truthy env vars the same way 78/20478/7
Paul Vinciguerra [Wed, 3 Jul 2019 12:38:38 +0000 (08:38 -0400)]
tests: treat all truthy env vars the same way

Introduce a new class, that returns the truthiness of a env var.
Since an environment variable is just a string, it would normally
be true if not unset. The new class returns true when the env var is
set to a string that would be considered true.

Type: test
Depends-on: https://gerrit.fd.io/r/20484

Change-Id: I90ef010156f6fec246bde5c0e208ced1869b180f
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agopapi: update VPPEnumType for python3 51/20551/2
Paul Vinciguerra [Mon, 8 Jul 2019 19:41:07 +0000 (15:41 -0400)]
papi: update VPPEnumType for python3

Python3 uses __bool__ instead of __nonzero__

Type: fix
Depends-on: https://gerrit.fd.io/r/#/c/20484/

Change-Id: I7dd13d0508ab18d6c50c235f4186006799e92b45
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agovppinfra: allocate bihash virtual space on demand 46/20546/4
Dave Barach [Mon, 8 Jul 2019 16:25:38 +0000 (12:25 -0400)]
vppinfra: allocate bihash virtual space on demand

Reduces the vpp image virtual size by multiple gigabytes

Add a "show bihash" command which displays configured and current
virtual space in use by bihash tables.

Modify the .py test framework to call "show bihash" on test tear-down

Type: refactor

Change-Id: Ifc1b7e2c43d29bbef645f6802fa29ff8ef09940c
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agovcl: add worker unregister api 50/20550/4
Florin Coras [Mon, 8 Jul 2019 19:34:45 +0000 (12:34 -0700)]
vcl: add worker unregister api

Type:feature

Change-Id: Ie73644aed94e58d5dce822de5000183e414401df
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agovcl: cleanup listener accept fifo 52/20552/3
Florin Coras [Mon, 8 Jul 2019 20:00:00 +0000 (13:00 -0700)]
vcl: cleanup listener accept fifo

Type: fix

Change-Id: Ic470d429f4bf1924185f720d66efe06f4727bcbd
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agomap gbp papi: match endianess of f64 81/19581/17
Paul Vinciguerra [Wed, 15 May 2019 01:01:28 +0000 (21:01 -0400)]
map gbp papi: match endianess of f64

clib_net_to_host_f64, clib_host_to_net_f64 are now implemented as '=',
https://gerrit.fd.io/r/#/c/20406/  set papi to match.
- all f64 api references are now wrapped with
  clib_net_to_host_f64 or clib_host_to_net_f64.

IEEE f64 endianess is not defined.  If clib_net_to_host_f64 and
clib_host_to_net_f64 are later defined in VPP as big-endian, it is
a single character change in the papi vpp_serializer.

Note: This breaks the api in a manner that would not be detected by
the flag day initiative.  The scope is small.  This only impacts map.api,
which applied the u64 transformation, while the gbp api uses '='.

The implementation of "=" raises issues for the papi socket implementation
if used between systems of differing endianess.  See Vratko's comments.

- Added get_f64_endian_value() to api to allow client to verify endianess of f64's.

Type: fix
Depends-on: https://gerrit.fd.io/r/#/c/20484/

Change-Id: I00fc64a6557ba0190398df211aa0ea5c7eb101df
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agoip: retain local interface address adjacency 41/20541/3
Matthew Smith [Sun, 7 Jul 2019 00:27:29 +0000 (19:27 -0500)]
ip: retain local interface address adjacency

Type: feature

ip4_local_check_src() was overwriting vnet buffer opaque data
on the adjacency for packets with "local" (dpo-receive) destination
addresses.

Retain the dpo receive index in vnet_buffer()->adj_index[VLIB_TX].
This can allow a graph node to distinguish the interface where the
destination address is configured from the interface where the
packet was received. This can be useful in correctly handling
packets that have been sent to an address configured on a loopback
interface.

Change-Id: I52a942e85b5302b338a2d0404a37c5ea1a99e89f
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
4 years agosession: add flag to disable session lookup 03/20503/5
Nathan Skrzypczak [Thu, 4 Jul 2019 12:26:21 +0000 (14:26 +0200)]
session: add flag to disable session lookup

Type: feature

Change-Id: I1369859be0a722ea37e5d3ecb35dee5684fc69f8
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agogbp: More unit tests 59/20459/5
Neale Ranns [Fri, 14 Jun 2019 07:49:50 +0000 (07:49 +0000)]
gbp: More unit tests

Type: test

Change-Id: I0a58cc19bdfb73eabadbf6eb49b57e8db96959b5
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agosession: target app.fib_index in unbind_uri 24/20524/3
Nathan Skrzypczak [Fri, 5 Jul 2019 09:58:22 +0000 (11:58 +0200)]
session: target app.fib_index in unbind_uri

Type: fix

Change-Id: Iafcf85315c73bcd73af20bd84b1ccba030e2065b
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agoapi: Implement log_dump/log_details 77/20377/13
Paul Vinciguerra [Wed, 26 Jun 2019 02:30:19 +0000 (22:30 -0400)]
api: Implement log_dump/log_details

- Replaces the need to screen scrape "show log".
- Adds an api to return the system time.  When running over a socket, the
  api client may have different time than the vpp host.

expected use:
  vpp_time_before_command = self.vapi.show_vpe_system_time_ticks().vpe_system_time_ticks
  <run some commands>
  log_output = self.vapi.log_dump(start_timestamp=vpp_time_before_command)

Depends-on: https://gerrit.fd.io/r/20484
Depends-on: https://gerrit.fd.io/r/#/c/19581/

==============================================================================
TestVpeApi
==============================================================================
log_details(_0=838, context=3, timestamp_ticks=2.4954863503546518e+48, level=<vl_api_log_level_t.VPE_API_LOG_LEVEL_WARNING: 4>, timestamp=u'2019/07/04 20:35:41:281', msg_class=u'buffer', message=u'vlib_physmem_shared_map_create: clib_mem_create_hugetlb_fd: open: No such file or directory\n\n')
log_details(_0=838, context=3, timestamp_ticks=1.6101902879480125e+159, level=<vl_api_log_level_t.VPE_API_LOG_LEVEL_WARNING: 4>, timestamp=u'2019/07/04 20:35:41:281', msg_class=u'buffer', message=u'falling back to non-hugepage backed buffer pool')
test_log_dump_default (test_vpe_api.TestVpeApi)                          OK
log_details(_0=838, context=13, timestamp_ticks=2.4954863503546518e+48, level=<vl_api_log_level_t.VPE_API_LOG_LEVEL_WARNING: 4>, timestamp=u'2019/07/04 20:35:41:281', msg_class=u'buffer', message=u'vlib_physmem_shared_map_create: clib_mem_create_hugetlb_fd: open: No such file or directory\n\n')
log_details(_0=838, context=13, timestamp_ticks=1.6101902879480125e+159, level=<vl_api_log_level_t.VPE_API_LOG_LEVEL_WARNING: 4>, timestamp=u'2019/07/04 20:35:41:281', msg_class=u'buffer', message=u'falling back to non-hugepage backed buffer pool')
test_log_dump_timestamp_0 (test_vpe_api.TestVpeApi)                      OK
test_log_dump_timestamp_future (test_vpe_api.TestVpeApi)                 SKIP
test_show_vpe_system_time_ticks (test_vpe_api.TestVpeApi)                SKIP

==============================================================================
TEST RESULTS:
     Scheduled tests: 4
      Executed tests: 4
        Passed tests: 2
       Skipped tests: 2
==============================================================================

Test run was successful

Type: feature

Change-Id: I893fc0a65f39749d2091093c2c604659aadd8447
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agogbp: refactor policy nodes 21/20521/4
Benoît Ganne [Wed, 3 Jul 2019 15:34:21 +0000 (17:34 +0200)]
gbp: refactor policy nodes

Refactor both policy and policy-dpo nodes so they share the same code
for contract & acl lookup and for tracing.
This should help to implement new policy schemes.

Type: refactor

Change-Id: If5704bda708838eb01516dd39473d9bf248cfdf6
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agomisc: allow second ':' in commit message 10/20410/3
Damjan Marion [Sat, 29 Jun 2019 09:27:40 +0000 (11:27 +0200)]
misc: allow second ':' in commit message

Type: fix
Fixes: 26ce6ca
Change-Id: I3ffa1e60966ba3e20670a7b95bba53e86e9861e0
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agovxlan-gbp: Decap ignores reserved bits 06/20506/4
Neale Ranns [Thu, 4 Jul 2019 14:12:50 +0000 (14:12 +0000)]
vxlan-gbp: Decap ignores reserved bits

Type: fix

from the draft:
3.  Backward Compatibility

   VXLAN [RFC7348] requires reserved fields to be set to zero on
   transmit and ignored on receive.

Change-Id: I98544907894f1a6eba9595a37c3c88322905630e
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoethernet: ARP disabled node 65/20365/2
Neale Ranns [Wed, 26 Jun 2019 15:22:01 +0000 (08:22 -0700)]
ethernet: ARP disabled node

Type: feature

improve the tracing from:

00:00:01:259665: pg-input
  stream pcap3, 42 bytes, 3 sw_if_index
  current data 0, length 42, buffer-pool 0, ref-count 1, trace handle 0x0
  ARP: 02:03:00:00:ff:02 -> ff:ff:ff:ff:ff:ff
  request, type ethernet/IP4, address size 6/4
  02:03:00:00:ff:02/172.16.3.5 -> 00:00:00:00:00:00/172.16.2.1
00:00:01:259690: ethernet-input
  frame: flags 0x1, hw-if-index 3, sw-if-index 3
  ARP: 02:03:00:00:ff:02 -> ff:ff:ff:ff:ff:ff
00:00:01:259702: arp-input
  request, type ethernet/IP4, address size 6/4
  02:03:00:00:ff:02/172.16.3.5 -> 00:00:00:00:00:00/172.16.2.1
00:00:01:259710: error-drop
  rx:pg2
00:00:01:259717: drop
  null-node: blackholed packets

to

00:00:01:283323: pg-input
  stream pcap3, 42 bytes, 3 sw_if_index
  current data 0, length 42, buffer-pool 0, ref-count 1, trace handle 0x0
  ARP: 02:03:00:00:ff:02 -> ff:ff:ff:ff:ff:ff
  request, type ethernet/IP4, address size 6/4
  02:03:00:00:ff:02/172.16.3.5 -> 00:00:00:00:00:00/172.16.2.1
00:00:01:283348: ethernet-input
  frame: flags 0x1, hw-if-index 3, sw-if-index 3
  ARP: 02:03:00:00:ff:02 -> ff:ff:ff:ff:ff:ff
00:00:01:283360: arp-input
  request, type ethernet/IP4, address size 6/4
  02:03:00:00:ff:02/172.16.3.5 -> 00:00:00:00:00:00/172.16.2.1
00:00:01:283369: arp-disabled
  request, type ethernet/IP4, address size 6/4
  02:03:00:00:ff:02/172.16.3.5 -> 00:00:00:00:00:00/172.16.2.1
00:00:01:283374: error-drop
  rx:pg2
00:00:01:283380: drop
  arp-disabled: ARP Disabled on this interface

Change-Id: I49b915b84cf56d6c138dedd8a596c045c150c4fb
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agosctp: move to plugins, disabled by default 74/20374/15
Florin Coras [Wed, 26 Jun 2019 23:27:13 +0000 (16:27 -0700)]
sctp: move to plugins, disabled by default

Removed sctp buffer metadata from vnet/buffer.h, added it to the
plugin. Add registration APIs for plugin-based vlib_buffer_opaque /
opaque2 decoders, used by "pcap dispatch trace ..." for display in the
wireshark dissector.

Type:refactor

Not actively maintained.

Change-Id: Ie4cb6ba66f68b3b3a7d7d2c63c917fdccf994371
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agotcp: timestamp adjustment 50/20450/4
Vladimir Kropylev [Tue, 2 Jul 2019 08:25:26 +0000 (11:25 +0300)]
tcp: timestamp adjustment

Type: feature

Change-Id: Icb3c574100cde95ab5be4923c8739889cf7e48c6
Signed-off-by: Vladimir Kropylev <vladimir.kropylev@enea.com>