9370 Commits

Author SHA1 Message Date
Klement Sekera
6977ed6cff nat: limit resource consumption when out of ports
Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I83f44711264376389989152666f3c71216146bdd
2020-07-28 06:31:56 +00:00
Ivan Shvedunov
9fefa89169 tcp: fix tcp_connection_cleanup() with uninitialized elog
This fixes TCP connection cleanup crash when TCP debugging is enabled.
It could happen if session_stream_accept() returned an error.

Type: fix

Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Change-Id: I0df08969d82bb0f44def81b9e47195bd15502831
2020-07-27 20:16:46 +03:00
Benoît Ganne
c72995dd79 lacp: fix vector overflow
Type: fix

Change-Id: I8f776ce10ee8c29689db5ceef70df42dfb6b747c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-07-24 21:23:31 +00:00
Benoît Ganne
17814d74db interface: fix show/clear hardware-interfaces string overflow
Type: fix

Change-Id: Iab99bc1f6c309fae6eaa714b484274fe7072a4cb
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-07-24 21:15:43 +00:00
Benoît Ganne
e3a24300d0 pci: fix non NULL-terminated vector used as C string overflow
Type: fix

Change-Id: Iab512ba8c72c9e20aeba2d4265276bcabf095d46
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-07-24 21:13:05 +00:00
Florin Coras
c7fd24e30b session: cleanup lookup table for rejected session
Type: fix

Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id20f693a5acdee74ab534e9964418973537b977f
2020-07-24 21:11:43 +00:00
Florin Coras
d2f5174dd0 tcp: fix synack elog crash
The elog track, if enabled, must be initalized before synack is sent.

Type: fix

Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0c585f466c9a5cbc13af971ae4951b93f9913c5f
2020-07-24 17:12:56 +00:00
jan_cavojsky
a340fe1ac6 ikev2: add SA dump API
Type: feature
Ticket: VPP-1897

Change-Id: I0245aceeb344efd29b1f9217c35889a8bbe1f744
Signed-off-by: jan_cavojsky <Jan.Cavojsky@pantheon.tech>
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-07-24 11:44:23 +00:00
Ole Troan
7fc88cf3a1 geneve: support geneve interface acting as a bvi
create geneve tunnel local 10.10.10.10 remote 10.10.10.9 vni 48 decap-next node ethernet-input l3-mode
set interface ip address geneve_tunnel0 11.11.11.12/24

Type: feature
Change-Id: I579ce879553d72a2e8048e33d0c0122674996b81
Signed-off-by: Ole Troan <ot@cisco.com>
2020-07-24 09:28:04 +00:00
Vladimir Ratnikov
5a849e3b35 dpdk: device_id sorted order for cryptodev
By default, VPP automatically assignes for each tunnel
next available QAT device by order dev_id-que-pair.
In most cases we have more than one device and it can
greatly increase ipsec perfomance without any actions
with configuration from user  if we use all the
devices first and first que-pairs

Type: feature

Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
Change-Id: Iac9fe74768775459e22f69bb3706b542090a9375
2020-07-23 22:24:48 +00:00
Benoît Ganne
c79a14f13a feature: fix feature config data initialization overflow
Copy only exactly the data provided by the user even when it is not a
4-bytes multiple.

Type: fix

Change-Id: I2ef987c37e58523a38b46b09227529db2c26aa55
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-07-23 22:21:25 +00:00
Lijian.Zhang
24ee40a5cb acl: correct acl vat help message
"ipv4"/"ipv6" option is not supported in acl_add_replace and
macip_acl_add_replace vat api.
Update its help message per actual api usage.

Type: fix

Change-Id: I8d34fac5f98bd78a46a5e98df05cd35182988dd8
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Jieqiang Wang <Jieqiang.Wang@arm.com>
Reviewed-by: Govindarajan Mohandoss <Govindarajan.Mohandoss@arm.com>
2020-07-23 20:52:41 +00:00
Florin Coras
c703a0b9ad hsa: proxy session cleanup fixes
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I96673c984077876e69b18b4126b55e70dc07b50f
2020-07-23 19:44:37 +00:00
Damjan Marion
5c00ec26ec vppinfra: add *_zero() vector inlines
Type: improvement
Change-Id: Ia63d1d7de273967ab7725d83634c0b6dd481c6c0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-07-23 17:20:01 +00:00
Florin Coras
1caf7f11c0 tcp: track pending timers
Also removes delack timer and reuses the u32 for the pending timers
list.

Type: fix
Ticket: VPP-1923

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4edbb72d5b2aa5e14f87659f49e675af1e834aca
2020-07-23 16:39:48 +00:00
Elias Rudberg
bf9a0c8097 nat: fix port number selection
Change the port number selection for new NAT sessions so that it
matches how the thread index is calculated from the port number for
out2in packets. Before this change there was a problem when the
largest port number in the range was used, that resulted in the wrong
thread index being selected when out2in packets arrive for that
session.

Type: fix

Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
Change-Id: I936c389eb0d5df6168e18e5e44754de1cdad6ad1
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2020-07-23 12:50:57 +00:00
Benoît Ganne
7c8644c368 ikev2: add global message length check
Type: fix

Change-Id: I3eb51ea4f6c29005b0315cf488fcabb8543dfcd1
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-07-23 12:10:17 +00:00
Ole Troan
9f84e70c6d vppapigen: missing crcs in user-defined types
make the change backwards compatible

Change-Id: I379691aa5972f99b2144deda4b7ef9e6ba4af67d
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
2020-07-23 11:33:30 +00:00
Mohsin Kazmi
543ed86441 virtio: add the buffer allocation error
Type: improvement

Change-Id: I991e32d531719693c387db4ef93d04d4b562789d
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-07-22 17:15:10 +02:00
Neale Ranns
dd4ccf2623 ipsec: Dedicated IPSec interface type
Type: feature

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ie8bd50df163aea2798e9f9d35a13dcadc4a4a4b2
2020-07-21 18:42:25 +00:00
Benoît Ganne
0c65f52bb9 crypto: bails out early for unsupported key type
Do not access data structures based on uninitialized key->alg.

Type: fix
Fixes: f539578bac8b64886b57c460c9d74273e6613f8b

Change-Id: I6bfb7e7a51af2c131b8bdf3bca6a38fcf1094760
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-07-21 17:27:47 +00:00
Steven Luong
e29fb5bf1b stats: memory leak in stat_validate_counter_vector
Free the existing vectors prior to losing them.

Type: fix
Ticket: VPPSUPP-94

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ic15f1fbc7a0c6c348065fc9759ee5d5c43013b91
Signed-off-by: Ole Troan <ot@cisco.com>
2020-07-21 06:20:08 +00:00
Filip Tehlar
459d17bb7d ikev2: refactor and test profile dump API
Type: refactor

Change-Id: I6b8dc68e5d4a452776fbaf5a69fbd7f53a8abb75
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-07-20 13:47:42 +00:00
Chinmaya Agarwal
30fa97dc67 sr: new messages created to return sl index for segment lists in a sr policy
Type: fix
Signed-off-by: Chinmaya Agarwal <chinmaya.agarwal@hsc.com>
Change-Id: Id43ab583f444e4487085fc686d5faed4858b2e97
2020-07-19 14:03:13 +00:00
Dave Barach
38ca6e62d7 api: call api reaper callbacks for socket clients
Add a callback to clear the per-client packet trace buffer cache.

Save the packet trace dump pg setup script.

Type: improvement
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I252be911b5f937ece0da5dca152263ece3d52963
2020-07-19 13:06:06 +00:00
Benoît Ganne
2e64b5a934 unittest: keep ASAN happy for non-terminated string tests
Type: fix

Change-Id: Iae9e84d4297acd54c909d3a8a39adafcd86b0a91
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-07-19 11:31:36 +00:00
Andrew Yourtchenko
df494dafa0 abf: mark API as in-progress
As requested by Neale, mark the ABF API as in-progress

Change-Id: I109a32fa54b1f2a882695d9fd71b235fa46bc6f3
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-07-17 12:09:49 +00:00
Andrew Yourtchenko
d2f8fb9c7e gbp: mark APIs as in-progress
As per request from Neale, mark the GBP plugin APIs as in-progress.

Type: fix
Change-Id: I679943edcfff0742ee32c45cd8f97f482c353b9f
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-07-17 12:09:21 +00:00
Andrew Yourtchenko
f733e7ade0 l2e: mark API as in-progress
As requested by Neale, mark the API as in-progress.

Change-Id: Id92cad65c66435e179583507f077816e09e4205b
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-07-17 12:09:05 +00:00
TimotheeChauvin
2887159a1a pppoe: fix uninitialized memory bug
In pppoe_cp_node.c, node->errors[error0] was accessed without
node->errors being initialized.

Found with AFL + ASAN.

Type: fix
Signed-off-by: TimotheeChauvin <timchauv@cisco.com>
Change-Id: Ide8a60021b2d47b5e2fce7062d8f12c7f4d225f7
2020-07-17 07:09:45 +00:00
Tom Seidenberg
6c81f5a249 misc: add callback hooks and refactor pmc
Callbacks for monitoring and performance measurement:
- Add new callback list type, with context
- Add callbacks for API, CLI, and barrier sync
- Modify node dispatch callback to pass plugin-specific context
- Modify perfmon plugin to keep PMC samples local to the plugin
- Include process nodes in dispatch callback
- Pass dispatch function return value to callback

Type: refactor

Signed-off-by: Tom Seidenberg <tseidenb@cisco.com>
Change-Id: I28b06c58490611e08d76ff5b01b2347ba2109b22
2020-07-16 21:44:42 +00:00
Chenmin Sun
bab02f0b18 dpdk: fix coverity warning in the flow code
CID 211153

Type: fix

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: Ic4d518d047c3ff36d9a7b72477c3efcb554d05bb
2020-07-16 21:44:19 +00:00
Benoît Ganne
01a103bec1 vlib: fix asan compilation with gcc
clang tends to force alignment of all sections when compiling for
address sanitizer, confusing VPP plugin infra.
On the contrary, GCC does not support this attribute on sections.
Selectively enable it depending upon the compiler.

Type: fix
Fixes: cea46522e79637f6ec37c03ec3fbeb87b160a378

Change-Id: I2dd6e52e70e6b4d89c101171cafc813e175ec472
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-07-16 21:42:40 +00:00
Fan Zhang
4933849439 crypto: fix coverity issue for cryptodev
- Fixes coverity issue #210160.
- Fixes the possible issue in cryptodev when input node does
  not update mbuf, such as avf-input.
- Fixes GCM ESN packet incorrect tag.
- Code clean up to reduce binary size.

Type: fix

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Dariusz Kazimierski <dariuszx.kazimierski@intel.com>
Signed-off-by: Piotr Kleski <piotrx.kleski@intel.com>
Change-Id: Ic05ae29855ac1f7a62e4af5831a4ed9faa8f561a
2020-07-16 21:42:00 +00:00
Benoît Ganne
1bd6f61820 vppinfra: fix format_c_identifier vector overflow
In case of vector, we must check length before trying to access element.
Also fix wrong DPDK plugin workaround.

Type: fix

Change-Id: I2ecef1c88ebef2362f48cab0d462699aa43cd4b9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-07-16 21:41:12 +00:00
Dave Barach
65b65a4692 misc: add tracedump API plugin
Type: feature

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I586547508003b95eaa74e18e4a5ac6f72986822c
2020-07-16 21:39:50 +00:00
Dave Barach
ac0326fc5a adl: move allow/deny list function to plugin
Provide binary API compatibility support for the "cop" APIs until vpp
21.01.

Change the deprecation date in map.api to vpp 21.01.

Type: refactor
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I0e60d96de4ae9ae4448f134cf257934126f3b760
2020-07-16 21:39:23 +00:00
Damjan Marion
9a0f2a5e7f ip: optimize ip4_header_checksum, take 2
- add 64-bit version
- remove byte swaps, as they are actually not needed

Type: improvement
Change-Id: Ia1efe54ee80b4ae7633b9ab36b3154c3357006d7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-07-16 17:52:36 +02:00
Benoît Ganne
284e658dbf ikev2: fix race condition in child_sa update
Type: fix

Change-Id: I864d49a641b45337c0a45a0af7d996cad75f6629
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-07-16 13:21:55 +00:00
Benoît Ganne
5e60c17f49 vppinfra: enable STATIC_ASSERT with clang
For some reason clang does not support &((struct foo*)0)->field in
static assertion contrary to gcc.
Use offsetof() macro implementation provided by both compilers instead.

Type: fix

Change-Id: I3311cdd29c5861e45dc0ef92f2bbd66242ca73b8
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-07-16 13:21:27 +00:00
Damjan Marion
e5f0050c7a ip: optimize ip4_header_checksum
Type: improvement
Change-Id: I67bacb90a3dd8a9bd7beb4975ad0fe344675b65f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-07-16 12:07:20 +00:00
Aloys Augustin
cf86740a11 gre: fix outer ip6 length
This updates the computation of the outer ip6 header payload_length
field in order to take into account the GRE header length.

Change-Id: Ie9f982521aeaef7279a9e329a33272d6fae0a428
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2020-07-16 11:25:08 +00:00
Damjan Marion
94dbf95220 vppinfra: more vector inlines
Type: improvement
Change-Id: Ie0de374b89ec3a17befecf3f08e94951597609ec
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-07-15 20:26:42 +02:00
Klement Sekera
4d119a6f15 nat: add prefetching to in2out_ed/out2in_ed
This saves about 20 clocks/packet in both code paths.

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ib559c74bf8168e3ddd764d51b7e5bcd2a557f591
2020-07-15 16:27:29 +00:00
Filip Tehlar
a7b963df27 ikev2: add support for AES-GCM cipher in IKE
Type: feature
Ticket: VPP-1920

Change-Id: I6e30f3594cb30553f3ca5a35e0a4f679325aacec
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-07-15 16:12:16 +00:00
Mohsin Kazmi
8046fdc10b virtio: fix the msix for multiqueue
Type: fix

Change-Id: Ie0cff37b474f8d85a3ae376e0f547a347fb1ad8a
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-07-15 15:57:40 +00:00
Filip Tehlar
ac46e3b1db ikev2: API downgrade due to lack of ikev2 tests
Type: refactor

Change-Id: Ic7ddad20088e069887f81721cceb21f4902e8907
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-07-14 19:26:33 +00:00
Chenmin Sun
e30f9c5c63 ip: fix format_ip6_address_and_mask() bug
Previously there's a format_ip4_address in format_ip6...
This patch fixes this typo

Type: fix

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: Ice124db6594720ed35a992d069341f399c331e1d
2020-07-14 14:34:57 +00:00
jiangxiaoming
3999a4bdb7 hsa: set connected mode for echo_server app in udp mode.
Type: fix

Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Change-Id: I85a53ee049a9af371d929364400fe166cf71d53f
2020-07-13 21:41:32 +00:00
jiangxiaoming
b495e9fd6d session: fix application_lookup_name fail due to app_by_name default hash type wrong
Type: fix

Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Change-Id: I539c431d991234c6cebc0961588f5dfbc9caa3c2
2020-07-13 17:07:17 +00:00