9911 Commits

Author SHA1 Message Date
Damjan Marion
ccbb0665ae avf: don't switch process if already running process node
Type: fix
Change-Id: I82b11339402b5848b27c600f6484aaeee66cc888
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-12 16:39:38 +00:00
Florin Coras
fb9d374020 tcp: push last buffered sequence
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iba914ac69585e89f174f09e74ae716df1b080c59
2020-11-12 16:31:29 +00:00
Matthew Smith
aeb7d80c84 nat: use table ID for nat44 ipfix session events
Type: fix

IPfix messages about NAT44 session create/delete were being populated
with the FIB table index instead of the table ID. The table ID is the
correct identifier to report externally (NAT64 IPfix messages for BIB
and session create/delete use table ID, as does NAT syslogging). Convert
the table index to an ID before adding it to the IPfix NAT44 session
create/delete message data.

Change-Id: I0166384752b17ff3a8c55aa19fa2af7a8140791e
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2020-11-12 15:16:46 +00:00
Damjan Marion
2db9273155 devices: remove unused code
Type: refactor
Change-Id: I3f561818bc7c221f676477a52c7c7781624c185a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-12 14:37:56 +00:00
Mohsin Kazmi
81dac0670b virtio: fix the index issue
Type: fix

Fixes: 587f9130424fd451e4ba823240d02f655fb197d1

Change-Id: I230993a54c84e22e324de2a8defeda83c517d733
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-11-12 14:22:14 +00:00
Florin Coras
c67724a224 tcp: validate fin seq in closing states
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id8673cff699cfdc1ac68797b9ab5cdf6f6b578a3
2020-11-11 16:47:50 +00:00
Florin Coras
ca78b56a7b vcl: remove unused configs
Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia8698c7ba63fc549f821863bb54fe72cc3a8d5be
2020-11-10 19:43:04 +00:00
Benoît Ganne
ec4749a20f vpp: use vpp heap for libc
This makes libc use vpp main heap instead of the default libc heap.
This gives better visibility (accounting, tracing) on allocations
happening in external libraries called from vpp (eg. OpenSSL).

Type: feature

Change-Id: I5d8a673472145a4e090bedb443b8c58a967d1cca
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-10 17:13:53 +00:00
Florin Coras
ab0a87f327 tcp: fix test for trailing bytes
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6455f2d38a2927f16fd4cb0e26b8560a2357cebe
2020-11-10 16:46:48 +00:00
Ahmed Abdelsalam
448bc81d36 sr: Show IPv6 address used as SRv6 Encaps source
Implements CLI to show the IPv6 address used as source address for the SRv6 encapsulation.

Type: feature
Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
Change-Id: Ia442d9345a7793836148d890745fc5dc92729b6f
2020-11-10 14:50:47 +00:00
Jon Loeliger
5f7f47ec7a classify: fix classify filter trace del cli processing
When a 'del' is used to delete a classify table, only the
mask is needed to locate the table.  Any match vector is
unneeded.  The tests failed to notice this, but if the
test is run by hand in vppctl, it issues a parse error.

Fix the test so that it doesn't supply irrelevant data.
Fix the CLI processing to read always complete newline
terminated line of input instead.  This allows unneeded
CLI parameters to be ignored.  It also necessitated
fixing a trace test which had then erroneously split
a single CLI command over multiple lines.

While in the area, fix a latent bug on table matching
where a test for compatible mask vector sizes were
not matching impedance properly (byte vs ux32x4).

Type: fix
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Change-Id: I1177ab1dd417f3d11f30eecbaa2b0fb1015c3ab5
2020-11-10 10:58:54 +00:00
Nathan Skrzypczak
212ec2af92 cnat: Fix invalid adj_index
Type: fix

When using sNAT in combination with cnat translations
it might happen that the cnat_node_vip.c picks up a
translation on a session that has an invalid lb index,
thus resulting in a later crash in ip4-load-balance

Change-Id: I82607086b2d672a9dcf26bfb82ad7f83e6474562
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2020-11-10 10:33:02 +00:00
Dave Barach
5f09efe70c ip6-nd: fix memory leaks
Quite a noticeable amount of memory. Recoded ra event tx and rx fns in
the usual manner, which terminated the leaks.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I486d348456b465ad3940a280d4cf489e8dd655a5
2020-11-10 08:49:23 +00:00
Florin Coras
9ed4866440 hsa: remove fake binary api registration in echo apps
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I73fbf991f42e643f906b6a3badd95ef46106eb25
2020-11-09 22:47:36 +00:00
Florin Coras
165f3ae967 vcl: remove support for shm api connections
Session layer only supports bapi with socket transport or app socket api
attachements. Going forward this will be further restricted to the
latter.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib368cf2ce92bbca192cca977664800879cd4058e
2020-11-09 21:19:29 +00:00
Florin Coras
6c10ab22e9 session: remove support for shm bapi attachment
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I21bda0c46406aff54ad8fe5e44491e8e332de170
2020-11-09 21:09:05 +00:00
Dave Barach
85866e782c vlib: support macros in initial config file
Type: improvement
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: If8a19eb6688755311a3430437331ddf13c7e28c8
2020-11-09 16:40:02 +00:00
Florin Coras
8c4fa01d13 session: delegate fifo ooo lookup init to transports
Fifo chunk ooo lookup data structures are private (not allocated on
segment heap) and should only be initialized by transport protocols that
require out-of-order enqueues/dequeues (like tcp).

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iaa15d6850385bf903cc501c54c2752e8e811449e
2020-11-09 16:04:47 +00:00
Filip Tehlar
2008e31453 ikev2: add tests for DPD
Type: test

Change-Id: I9c1129a8596344551f3f8f2e029846d22511482e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-11-09 15:26:20 +00:00
Florin Coras
45ab3ecb18 session: default to using memfd mq segments
First step towards deprecating the use of binary api's segment for mq
allocation.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I9d3d17e4d406575d64e0426bb65465130a84980a
2020-11-09 12:41:44 +00:00
Benoît Ganne
9a3973e3a3 vlib: fix trace number accounting
When using classifier to filter traces, not all packets will be traced.
In that case, we should only count traced packets.

Type: fix

Change-Id: I87d1e217b580ebff8c6ade7860eb43950420ae78
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-09 11:51:34 +00:00
Filip Tehlar
f6b02e0d0b ikev2: fix msg IDs generation
Type: fix

Change-Id: Id922895c269f0d2450e55fcb6871b6857f443462
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-11-09 10:05:21 +00:00
Filip Tehlar
67b8a7fa76 ikev2: fix udp encap
Type: fix

Change-Id: I8c66f79f2d8cfff7c6d45e1fc5b529ffb3941491
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-11-09 10:03:07 +00:00
Alexander Chernavin
a6c34a19df tap: add function to set speed
A plugin can set the speed on a host interface making it possible for
host applications to be aware of the actual interface speed, not the
one that the driver reports by default.

With this change, add a function to set speed on a host interface.

Type: feature
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: I259a52b736022bdd805e8d92dcd1bfd5c58f6f96
2020-11-09 09:46:58 +00:00
Benoît Ganne
f6422ffbc8 ipsec: fix unformat types
ipsec_{crypto,integ}_alg_t are packed and smaller than u32. Callers are
using those enums so unformat functions should too instead of u32 to
not overflow the stack.

Type: fix

Change-Id: Ifc86366f1928ca6352f06f390a88ac64668289d5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-09 09:01:52 +00:00
Benoît Ganne
27632cae3d ipsec: fix outer table id lookup in ipsec tun script
Type: fix

Change-Id: I195949b610dca1b860baca18a059d39949627961
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-09 09:01:27 +00:00
Benoît Ganne
40aa27ef7c ipsec: add support for tx-table-id in cli + example
Type: improvement

Change-Id: I840741dfe040718b682935cdbcb0ba958d45a591
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-06 21:38:31 +00:00
Florin Coras
1f85dad1e5 tcp: avoid consuming trailing bytes
Thanks to Shaligram Prakash <Shaligram.Prakash@enea.com> for reporting.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I135d23957a0dbb56a30994dfe3a316efd1eabad1
2020-11-05 13:58:52 -08:00
Klement Sekera
c4e6cd0889 nat: fix hairpinning trace
Type: fix
Fixes: 17a8ab6857f023bc1436d84808acc58dd614203e
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I597d08d1d2457116e6856fa40cd65987e13a28d4
2020-11-05 20:54:37 +00:00
Damjan Marion
dcb1db9eb1 vppinfra: mspace_get_aligned should respect MALLOC_ALIGNMENT
While underlying mspace_malloc() respects MALLOC_ALIGNMENT (16)
mspace_get_aligned moves start of data for 4 bytes making final result
not aligned to MALLOC_ALIGNED.

Type: fix
Change-Id: Ib1584f315e3658b3b748ebf4886fb7389ce640fe
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-05 20:53:43 +00:00
Damjan Marion
af7892c08b build: link time optimization for release builds
Type: improvement
Change-Id: I0e24f1d2ad5c7a11a8bd40125428f86aca867bec
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-05 20:51:03 +00:00
Damjan Marion
066cd81237 build: run garbage collection while linking plugins
Ask linker to remove symbols which are not referenced or exported.

Type: improvement
Change-Id: Iec01fda7ec5b14bab8f36d25c2652bd6fe619961
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-05 20:49:03 +00:00
Klement Sekera
a94e26db70 nat: remove unnecessary code
Type: improvement

Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I478f5dcbf7595c62611d25a40aa356d8ce09d216
2020-11-05 18:53:50 +00:00
Matthew Smith
bd50ed18de tap: allow change of carrier state on host
Type: feature

Add a function to adjust the link state of the host side of a tap
interface. If an application (e.g. route protocol daemons) running on
the host uses netlink to monitor interface state, a plugin
could use this function to communicate a loss of connectivity
to the application by making the interface appear to go down.

Requires a somewhat recent kernel. E.g. it does not have any effect
on CentOS 7 but it works on CentOS 8.

Change-Id: I677ee7889d2eb142e2395bea98f0b4d7e7e7f810
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2020-11-05 17:41:01 +00:00
Damjan Marion
d4a547144f virtio: misc optimizations
Type: improvement
Change-Id: Iaf98a60e37dd28828feca365b8fdc5d2f7ae6935
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-05 17:38:28 +00:00
Benoît Ganne
7bed48cb79 ip: fix doxygen doc for address add/del command
Type: docs

Change-Id: I96d5cdb41bd938f06d2d72f2625bf1b3d2c5b1b4
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-05 17:00:40 +00:00
Nathan Skrzypczak
38049e48a7 cnat: reduce compile time
Compile time reduced from ~30s to 2s for
cnat_node_vip.c & cnat_node_snat.c This doesn't
impact performance for now as ts update rwlock
is the main bottleneck.

Type: improvement

Change-Id: Ic92df300ae0dfddc5235c350bd021e73e7c850d9
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2020-11-05 16:47:38 +00:00
Alexander Chernavin
e019cacbe2 nat: fix byte order of vrf_id in logging
Type: fix
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: I9930a2a90caa78e848fe657ab2da863467be41ea
2020-11-05 16:37:28 +00:00
Damjan Marion
587f913042 virtio: move retry logic to outer function
Improves compile time....

Type: improvement
Change-Id: I310a2e55e5e488a953d65fd065f7795a43d2e9a7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-05 16:33:48 +00:00
Benoît Ganne
6178bdafa6 feature: reset interface feature arc on interface deletion
When removing an interface we must reset all per-interface per-feature
arc data to ensure we do not get wrong feature arc config data when the
sw_if_index is recycled.

Type: fix

Change-Id: I8c9d850d7c62b7b77193da4258ab5fb9bdda85a6
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-05 12:36:31 +00:00
Klement Sekera
9c4a582dca nat: remove unused code
Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ibbdfb0a2d1ff64044a0f6b2443b526bd1cf12f93
2020-11-05 12:34:08 +00:00
Florin Coras
ce252ca83f session: fix ct server session thread index
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I835b61f0b88a7324b09d82400debd78ad8b95401
2020-11-04 21:28:43 +00:00
Benoît Ganne
24b5107edd build: better detection of libbpf dependencies
Type: fix

Change-Id: Ib496e6eb0a76e6268aea09d5f4495f3ecd921ec2
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-04 18:40:31 +00:00
Dave Barach
27d978c913 vlib: add postmortem pcap dispatch trace
Inspired by a real-life conundrum: scenario X involves a vpp crash in
ip4-load-balance because vnet_buffer(b)->ip.adj_index[VLIB_TX] is
(still) set to ~0.

The problem takes most of a day to occur, and we need to see the
broken packet's graph trajectory, metadata, etc. to understand the
problem.

Fix a signed/unsigned ASSERT bug in vlib_get_trace_count().

Rename elog_post_mortem_dump() -> vlib_post_mortem_dump(), add
dispatch trace post-mortem dump.

Add FILTER_FLAG_POST_MORTEM so we can (putatively) capture a ludicrous
number of buffer traces, without actually using more than one dispatch
cycle's worth of memory.

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: If093202ef071df46e290370bd9b33bf6560d30e6
2020-11-04 17:39:10 +00:00
Mohammed Hawari
a210433d53 rdma: various fixes for chained buffers tx
Type: fix
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Change-Id: I428c87e581db335362fef30e274db8947a896416
2020-11-04 16:26:29 +00:00
Filip Tehlar
d7fc12f073 ikev2: add option to disable NAT traversal
Type: feature
Ticket: VPP-1935

Change-Id: I705f84047b112279377590157a1c7b4a34f693d2
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-10-31 02:58:24 +00:00
Filip Tehlar
68ad625837 ikev2: fix reply during rekey
Type: fix

Change-Id: If87f4b8ae92508215fe91178958fe2ddb91e5a35
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-11-04 08:07:55 +00:00
Filip Tehlar
761f8f0eaa ikev2: increase tick interval in process node
This helps to resolve sporadic failures in unit tests.

Type: fix

Change-Id: I3abd77ed74310f9729a841e8569eafe6d7758dcb
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-11-04 08:07:15 +00:00
Simon Zhang
34f29d8b60 tls: fix picotls engine crypto multi-thread issue
Type: fix

Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Change-Id: Ib454ccae5a81f91a744db82b72c7f1fcb29aa0cc
2020-11-04 02:57:52 +00:00
Florin Coras
89235c7ac7 session: reduce max session node frame size
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I9e6b5e245533c9ea7bb8dc4f784a31fcb0da88bd
2020-11-03 17:40:05 +00:00