8975 Commits

Author SHA1 Message Date
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
Andreas Schultz
30a28c187b session: fix session_table_get_or_alloc
Extending the fib_index_to_table_index could leave entries uninitialized,
pointing to the session tables at index 0. That session index exists by
default, but it is a IPv4 session table. That would break all IPv6 on
the unitilized fib indexes.

Type: fix

Change-Id: Ie3f0a87a7f829ceb39f75ec06658b0ad1d3813ae
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
2020-04-23 15:34:18 +00:00
Damjan Marion
68e5fd5206 vppinfra: more bihash optimizatons
* Avoid doing expensive bit extraction for most likely case where bucket
  .log2_page_size == 0 and .linear_search == 0, saves 3-5 cycles for
  lookup, data_prefetch and add operation

* use bextr instruction when available (x86 BMI instruction set)

Type: improvement
Change-Id: I163df36a29287482c5f133be8b21d62a2f7440de
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-04-23 13:45:25 +02:00
Neale Ranns
59f71132ed ip: Replace Sematics for Interface IP addresses
Type: feature

 - replace functions for prefixes attached to interfaces
 - add ip_interface.[ch] to consoldate the functions

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I9c0c39c09dbf80ea1aadefee02c9bd16f094b6ad
2020-04-23 08:15:53 +00:00
Neale Ranns
c87fbb417a ip-neighbor: Replace feature for the ip-neighbor data-base
Type: feature

DB replace is implemented with a mark and sweep algorithm (just the the
FIB)

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I54ab06e11552219e2a18e1b4a87d531321cf3829
2020-04-23 08:15:39 +00:00
Florin Coras
c17ff6ec3b tcp: avoid bt sample access after possible pool realloc
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I98f943c8862fa74fb576f9ec1fb9186289b1216b
2020-04-22 22:07:43 +00:00
Neale Ranns
ecff1cb6da api: 'api trace' CLI consumes a line of input
Type: improvement

allows the CLI command to be used from a config file

Change-Id: Id9e7ad71b208317a65b1ed4065b0cb8777aee6ec
Signed-off-by: Neale Ranns <nranns@cisco.com>
2020-04-22 20:17:20 +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
Neale Ranns
f932f97d7d ip: fix format functions for u8 address_family
Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I8c9f5330879fb8f51792b4476d5f0c873dbe4d7a
2020-04-22 19:53:02 +00:00
Florin Coras
67ec589d23 lisp: switch to new timer wheel code
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie212a43c435cfa7f8fac65d1620258913611c527
2020-04-22 19:52:08 +00:00
Benoît Ganne
38ab5672b5 vcl: fix use-after-free
Make sure we disconnect from vlib prior to free-ing the last worker, as
we'll need to access it.

Type: fix

Change-Id: Id5bdd17f0f5efa1ce52021b4270eb4f1e95cc61d
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-22 18:42:52 +00:00
Benoît Ganne
a04adbf536 tcp: fix use-after-free
bts can be freed by the call to bt_fix_overlapped(). Save flags for
later use.

Type: fix

Change-Id: If8b48c96ce39e38f2ed7f4db2815122523eb2e05
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-22 18:42:39 +00:00
Florin Coras
6e0ee95df5 session: multiple dgrams per dispatch
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ifa4916ffeaa30039e366011109bbd2e9c91a1b0b
2020-04-22 18:19:23 +00:00
Benoît Ganne
77d42fc719 svm: asan: fix asan support
- restrict the unittests SVM address space to what is supported by ASan
 - mark SVM mmap()ed address space accessible for ASan
 - SVM shared memory heap scheme means some allocation can happen
   outside the current process. Lazily mark those accessible for ASan

Type: fix

Change-Id: I7c196c80b2a5297651d0afa54f1a8e478fcf59b1
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-22 17:11:56 +00:00
Neale Ranns
07bbaef593 gre: Optimise encap node for tunnel types
Type: improvement

Change-Id: I6627e22110be94c8127486ae009761494e734c04
Signed-off-by: Neale Ranns <nranns@cisco.com>
2020-04-22 16:05:10 +00:00
Mohsin Kazmi
0b04209eda gso: add vxlan tunnel support
Type: feature

Change-Id: I85f6ec77187a4983c66c5e22fd39fbb2cef82902
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-04-22 15:03:34 +00:00
Dave Barach
6440b7a602 misc: fix coverity warnings
Type: fix
Ticket: VPP-1837
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I9ec87d2293d8f92c3e488a0f61083cf815ac496c
2020-04-22 13:08:47 +00:00
Benoît Ganne
350f6d6ef4 misc: asan: mark parsed elf memory as readable for ASan
Type: fix

Change-Id: Ic7441a09bab2cabc7632ee502368584ac022f997
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-22 13:05:24 +00:00
Zhiyong Yang
9f83358d4e ethernet: leverage vlib_buffer_get_current
Type: improvement

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Change-Id: I0eaedeee03dd3b4453edec7fca2a5c741a98de23
2020-04-22 13:04:17 +00:00
Benoît Ganne
332bc084dd misc: asan: disable leak sanitizer by default
Leak Sanitizer is not stable yet with VPP. It can always be enabled at
runtime with ASAN_OPTIONS=detect_leaks=1.

Type: fix

Change-Id: Ieff01091e2976e127783ebd331cd0e50a1dbca12
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-22 13:04:00 +00:00
Zhiyong Yang
703128816f ethernet: put vlib_get_buffers together
The patch brings 0.8 clocks saved per pkt in IPv4 l3fwd case on Skylake.

Type: improvement

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Change-Id: Ia8d3a27773bf959433380d7c219602b1e4a8e5bd
2020-04-22 13:03:44 +00:00
Benoît Ganne
08d01376de misc: asan: do not poison memory after munmap()
It is a bad idea to poison memory after munmap because the address space
can be reused (eg. for global data of dlopen()ed object) and ASan model
allows access by default.
Moreover, access to a stale address space will fault.

Type: fix

Change-Id: I356de422f255447d9d50a3a71fb0c2eaa790d731
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-22 13:03:08 +00:00
Damjan Marion
74ee18b0b3 vppinfra: fix potential race in bihash bucket lock
Type: improvement

Change-Id: Ia04bd26ecd689894753e036e52920316de611910
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-04-22 08:47:29 +00:00
Damjan Marion
801ec2a080 vppinfra: improve bihash add/del performance
Measured improvement is from 439 to 167 clocks for add operation
in 16_8 case...

Type: improvement

Change-Id: I975ff46ff30b983a3ec80a5cde25ccb68d7fa03b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-04-22 08:45:29 +00:00
Chenmin Sun
7f83738b46 dpdk: DPDK 20.05 iavf flow director backporting to DPDK 20.02
0001 ~ 0014 patches are for virtual channel and PMD
0015 is the iavf fdir framework
0016 ~ 0017 are for the iavf fidr driver

Type: feature

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I38e69ca0065a71cc6ba0b44ef7c7db51193a0899
2020-04-22 08:44:56 +00:00
Amir Zeidner
1e5ed97749 devices: Adding ConnectX-6 DX Device ID for validation
Type: fix

Change-Id: I3c7ebbe91e7dffe9fd6851e5334fe920f2187cf0
Signed-off-by: Amir Zeidner <amirzei@mellanox.com>
2020-04-22 07:38:50 +00:00
Dave Barach
54582663ab vat: fix increment_address(...)
vl_api_address_t uses a packed enum for the address family, compare
a->af directly with ADDRESS_IP4 / ADDRESS_IP6 instead of running a->af
through clib_host_to_net_u32(...) before compare.

Indirectly fixes api_ip_route_add_del(...) w/ count > 1.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ib7f562ec9e92ee63e52a338d318fcf1ce6221755
2020-04-21 17:16:31 +00:00
Elias Rudberg
368104d06a vlib: queue_hi_thresh fix to avoid deadlock
Adapt queue_hi_thresh value using num_threads to avoid risk of deadlock
between threads which could happen for example when different NAT
threads try to handoff work to each other at the same time when their
frame queues are congested. This change ensures that each thread can
reserve a queue entry without causing problems even in the most extreme
case when all threads attempt to add to the same queue simultaneously
when the queue is nearly full.

Type: fix

Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
Change-Id: I9e02f753bd00833d8dd500d181b0d4f9a454d703
2020-04-21 16:53:38 +00:00
Vladimir Ratnikov
958919f363 nat: dslite ce mode in separate config entry
Previously dslite was moved to separate plugin folder
and CE mode was removed. But it still needed.
This patch adds CE option to separate config entry

Type: feature

Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
Change-Id: If153ae08fa385ba5a6605cb412e49bbb4d1db46c
2020-04-21 13:33:22 +00:00
Dave Barach
16e4a4a0ae vppinfra: bihash improvements
Template instances can allocate BIHASH_KVP_PER_PAGE data records
tangent to the bucket, to remove a dependent read / prefetch.

Template instances can ask for immediate memory allocation, to avoid
several branches in the lookup path.

Clean up l2 fib, gpb plugin codes: use clib_bihash_get_bucket(...)

Use hugepages for bihash allocation arenas

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Damjan Marion <damarion@cisco.com>
Change-Id: I92fc11bc58e48d84e2d61f44580916dd1c56361c
2020-04-21 10:26:14 +00:00
Benoît Ganne
b9753540d2 sr: fix non-NULL terminated string overflow
Type: fix

Change-Id: Ia5ae0e893a5358f61353d20f444d88d79953e482
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-20 19:55:27 +00:00
Florin Coras
0e6199dfa2 svm: check if fifo free list index is valid on alloc
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Change-Id: Ib85c2f01dc7ec9858f2f88b89e209f989d78c5d9
2020-04-20 17:04:29 +00:00
Benoît Ganne
7ce23f25bb session: fix use-after-free in input node
Type: fix

Change-Id: Ie60b07abe76ad166f048f5885accd7038d8153b2
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-20 16:07:09 +00:00
Florin Coras
da302e4fce session: avoid rx notifications on accepting sessions
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iba37e528e968104c3ba9c8324438ba695ddddfd1
2020-04-20 14:47:02 +00:00
Florin Coras
f49cf470c5 vcl: ensure sessions are open on select events
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4d56b61af574dfdaf6028160ce331606bdf65609
2020-04-20 14:46:41 +00:00
Florin Coras
cbce80aaa3 vcl: expand vcl select maps in ldp if needed
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I56c487821233cebf2146745a4706cb573cc088a5
2020-04-20 14:46:23 +00:00
Klement Sekera
b86437b79b nat: remove unused code
Type: improvement

Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: If5c00faa309cf3e1ea8bdf8b23250041f6a499c4
2020-04-20 11:46:35 +00:00
Benoît Ganne
040d47c2cc gbp: fix l3-out anonymous test cleanup
Type: fix

Change-Id: Ib455b0a57f9b4f9cb82bb295c220270d0c6e5fe5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-20 07:56:32 +00:00
Simon Zhang
c118229595 tls: fix Picotls tx hang issue
Type: fix

Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Change-Id: Id84fbe412c99b39a0754b892ca971dd3e4434264
2020-04-20 01:12:34 +00:00
Florin Coras
701c099fad session: fix half-open cleanup
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I931d23cf617c8f24fe9a02982ab129785bbd184d
2020-04-19 19:20:19 +00:00
Benoît Ganne
101fc278c3 lisp: fix use-after-free
Type: fix

Change-Id: I42c3e3514ba50d40e09ee688d083f3e78fa0713a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-17 20:30:02 +00:00
Andreas Schultz
63551351b7 vat: fix static analysis warning
replace hand crafted version with existing vector function

Type: fix

Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
Change-Id: I94834852469ed316c7bdbd48bb7f479648b2c8e5
2020-04-17 19:09:28 +00:00
Florin Coras
e57df7c677 tcp: cubic as default cc algorithm
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I48ce827966667a767440149769eb1b24616ce4c1
2020-04-17 19:07:39 +00:00
Mohsin Kazmi
ce21599c8a virtio: fix to use chained descriptors when missing indirect descriptor
Some vhost-backed missing the VIRTIO_RING_F_INDIRECT_DESC feature.
Previously, vpp doesn't support jumbo frames using chained descriptors.
This patch fixes this issue.

Type: fix

Change-Id: I20487e201e88ea136b556ac84dde058019ab3e78
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-04-17 16:36:45 +00:00
Alexander Chernavin
82fc98fa45 dpdk: fix udp-encap for esp in transport mode
Now UDP encapsulation doesn't work in transport mode because:
 - the encrypt node misses filling of UDP header and it gets sent with
   all zeros;
 - the decrypt node misses filling of new IP header and it contains
   garbage data.

With this commit, fill UDP header during encryption and fill IP header
during decryption.

Change-Id: I87a7bd594f0e312b16d3e5eb19e568b4e3164d36
Type: fix
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2020-04-17 15:05:25 +00:00
Florin Coras
d50ff7fba1 session tcp: track half open in app wrk
Type: improvement

Do extra checks when establishing an active connect and cleanup pending
connects if application detaches.

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibe9349db57b313ba2aa5ea3960ef5cf755f5098a
2020-04-17 14:58:23 +00:00
Florin Coras
ce815deb72 vcl: fix app destroy
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I21daa87b1a301142270a1bf20680dd9e9395aac9
2020-04-17 12:05:39 +00:00
Yu Sun
6f5b72ec01 vppinfra: install missing tw_timer_2t_2w_512sl header file
Type: improvement

Signed-off-by: Yu Sun <yusun2@cisco.com>
Change-Id: I68aea7c5776c5b31081c98388df4133d2062218a
2020-04-17 12:02:16 +00:00
Mohsin Kazmi
206acf84d6 tap: add initial support for tun
Type: feature

Change-Id: I699a01ac925fe5c475a36032edb7018618bb4dd4
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-04-17 11:28:14 +00:00
Benoît Ganne
95eb01fdc6 fib: fix use-after-free
Type: fix

Change-Id: Ie7081d977dd0d3e7d09bc0d1b4d53863288e443b
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-16 17:17:12 +00:00