vpp.git
2 years agoethernet: api cleanup 14/32814/4
Filip Tehlar [Mon, 21 Jun 2021 13:45:44 +0000 (13:45 +0000)]
ethernet: api cleanup

Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Iacaefbf04834f000a14f151c4b848f280ac46d63

2 years agopolicer: api cleanup 29/32829/2
Filip Tehlar [Tue, 22 Jun 2021 08:37:26 +0000 (08:37 +0000)]
policer: api cleanup

Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I5dd30870443a22a7da65f6b5a6d3967991e2aceb

2 years agobfd: api cleanup 12/32812/4
Filip Tehlar [Mon, 21 Jun 2021 13:21:59 +0000 (13:21 +0000)]
bfd: api cleanup

Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I7a0a189ce635a4a74e63ac4cb133686b8b7ba53a

2 years agostats: add a retry mechanism in a symlink test 13/32813/4
Arthur de Kerhor [Mon, 21 Jun 2021 13:35:01 +0000 (15:35 +0200)]
stats: add a retry mechanism in a symlink test

When creating a new node, a corresponding node symlink is created when
the nodes counters update. To be sure we are able to access this
symlink, a retry mechanism was added.

Type: fix

Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
Change-Id: Ieb08d8554b4fd13d01e79062b5f820b235be9a13

2 years agobuild: vpp-ext-deps rpm version check may fail if system language is not English 59/30559/3
jiangxiaoming [Wed, 30 Dec 2020 07:25:15 +0000 (15:25 +0800)]
build: vpp-ext-deps rpm version check may fail if system language is not English

Type: fix

Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com>
Change-Id: Ib691d8f66b0d6047d23a0bdc4f3d15e6380f31eb

2 years agovlib: fix coverity warning 16/32816/2
Dave Barach [Mon, 21 Jun 2021 14:31:35 +0000 (10:31 -0400)]
vlib: fix coverity warning

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ib563e2c09d46cc26fb983ffde3d5fcb88166f6a5

2 years agovppinfra: asan: fix overflow support 64/32764/2
Benoît Ganne [Wed, 9 Jun 2021 15:20:16 +0000 (17:20 +0200)]
vppinfra: asan: fix overflow support

In some part of VPP we are accessing memory past what was allocated for
efficiency when we know it is safe to do so. We need to tell ASan about
it so it does not complain.
The initial attempt was too simple and could not manage cases where the
poisoned memory was scattered. This new attempt is more robust as we
save and restore the full shadow state.
Note it will still not work properly if we poison/unpoison memory while
in an overflow context, but this should not be a big issue as overflow
should only be temporary.

Type: fix

Change-Id: I636f44eb59aa8455a4d13929a3791b56619af7b4
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agoudp: api cleanup 11/32811/3
Filip Tehlar [Mon, 21 Jun 2021 13:01:24 +0000 (13:01 +0000)]
udp: api cleanup

Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I0994241df94ad7536be323b9d7c48caf38cc4267

2 years agofeature: api cleanup 10/32810/2
Filip Tehlar [Mon, 21 Jun 2021 12:43:35 +0000 (12:43 +0000)]
feature: api cleanup

Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I76be91715953c7cbe704961d1a56c48334656e19

2 years agopg: api cleanup 08/32808/2
Filip Tehlar [Mon, 21 Jun 2021 12:11:28 +0000 (12:11 +0000)]
pg: api cleanup

Use autogenerated code.
Does not change API definitions.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Idf0c24c9c8f8f3c267285c6a231c9c1a364a902a

2 years agomisc: ipfix api cleanup 07/32807/2
Filip Tehlar [Mon, 21 Jun 2021 10:57:49 +0000 (10:57 +0000)]
misc: ipfix api cleanup

Use autogenerated code.
Does not change API definitions.

Type: improvement

Change-Id: I864979ce490651bf1f5fed107620e9bc4ca4bf93
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2 years agoflow: api cleanup 03/32803/2
Filip Tehlar [Mon, 21 Jun 2021 09:49:31 +0000 (09:49 +0000)]
flow: api cleanup

Use autogenerated code

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I02f53486723f7ac7e9026ff092b63e86dff13232

2 years agogso: api cleanup 04/32804/2
Filip Tehlar [Mon, 21 Jun 2021 10:08:43 +0000 (10:08 +0000)]
gso: api cleanup

Use autogenerated code

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Id373c7828d77cca0121baf9c7635cfe2c5f938d7

2 years agovxlan: api cleanup 23/32723/8
Filip Tehlar [Fri, 4 Jun 2021 13:37:00 +0000 (13:37 +0000)]
vxlan: api cleanup

use autogenerated code

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I163eefa86f3248260481181818d70fa1b6eaa220

2 years agoclassify: api cleanup 24/32724/5
Filip Tehlar [Fri, 4 Jun 2021 13:50:34 +0000 (13:50 +0000)]
classify: api cleanup

Use autogenerated code.

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Id7d4d23e4fe707f7049828fec44df7ff0419d23c

2 years agobier: api cleanup 22/32722/9
Filip Tehlar [Thu, 17 Jun 2021 01:28:22 +0000 (01:28 +0000)]
bier: api cleanup

use autogenerated code

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I86459d918ac46bed523e847db9f9c7179147d022

2 years agofib: Add unit test for RR source using covers labels 57/32757/3
Neale Ranns [Thu, 17 Jun 2021 08:43:55 +0000 (08:43 +0000)]
fib: Add unit test for RR source using covers labels

Type: test

UT for patch: 4fc68ee

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I96fac9a6407a7f3ebeecc5e68a7683e541063de7

2 years agosession: improve ct locking with multiple workers 74/32774/11
Florin Coras [Thu, 17 Jun 2021 22:53:38 +0000 (15:53 -0700)]
session: improve ct locking with multiple workers

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id91c3be57d49745cb3db6c768a8d5d14133f899e

2 years agosession: udp accept session state should be updated by app 75/32775/1
jxm [Fri, 18 Jun 2021 03:42:31 +0000 (03:42 +0000)]
session: udp accept session state should be updated by app

Type: fix
Signed-off-by: jxm <jiangxiaoming@outlook.com>
Change-Id: I6fb2620e7076e1e38a2ab85a70febe614b079e67

2 years agosession: optimize ct fifo segment allocations 51/32651/29
Florin Coras [Wed, 9 Jun 2021 21:55:24 +0000 (14:55 -0700)]
session: optimize ct fifo segment allocations

Allocate per app pair segments with space for more than one fifo.

Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib96fe12b899cb14ff20c0be607814011e2c3fc6a

2 years agotls: increase engine bits room in handle to support custom engine type 53/32753/3
jxm [Thu, 17 Jun 2021 04:44:40 +0000 (04:44 +0000)]
tls: increase engine bits room in handle to support custom engine type

Type: improvement
Signed-off-by: jxm <jiangxiaoming@outlook.com>
Change-Id: I80a51e841f9727b68d1de713b6b6d51675ef53c5

2 years agofib: changing parsing order to avoid corner case 55/32755/2
Arthur de Kerhor [Thu, 17 Jun 2021 07:34:12 +0000 (09:34 +0200)]
fib: changing parsing order to avoid corner case

mfib interface flags are parsed before the interface name. For some
specific names, this creates a bug when adding routes.

ex: ip route add 10.0.2.0/24 via FortyGigabitEthernetd8/0/0
The 'F' at the beginnig of the interface name is parsed as the
"Forward" flag. Because of that, the interface name parsed is
"ortyGigabitEthernetd8/0/0" which results in a parsing error.

Type: fix

Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
Change-Id: Ib76c2f86416455841f910f7b466b467001072b70

2 years agotests: Tests for cross AF routing 64/32464/3
Neale Ranns [Thu, 27 May 2021 12:18:52 +0000 (12:18 +0000)]
tests: Tests for cross AF routing

Type: test

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Iebee39d0974c6f458863ce6144c6a83bc3cf4cb7

2 years agompls: CLI to show the MPLS forwarding state of an interface 34/32734/3
Neale Ranns [Tue, 15 Jun 2021 12:43:12 +0000 (12:43 +0000)]
mpls: CLI to show the MPLS forwarding state of an interface

Type: improvement

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I28b98154bbff36e8391a09a2b30302dda4349946

2 years agovcl: fix fifo sharing 52/32752/3
Florin Coras [Wed, 16 Jun 2021 21:46:57 +0000 (14:46 -0700)]
vcl: fix fifo sharing

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iec1fe8315a057214901250d5fb06d1c1e33dda46

2 years agovcl: fix worker cleanup 51/32751/2
Florin Coras [Wed, 16 Jun 2021 21:41:01 +0000 (14:41 -0700)]
vcl: fix worker cleanup

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I575068df56623f24c0290fa42b8d301548a089d4

2 years agovcl: basic support for epoll level-triggered evts 99/32599/15
Florin Coras [Fri, 4 Jun 2021 17:07:55 +0000 (10:07 -0700)]
vcl: basic support for epoll level-triggered evts

Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2d5039cd35edd02ffa2439bcac119d0647234385

2 years agofib: copy the path extentions when creating fib src rr entry 76/31276/2
Stanislav Zaikin [Sat, 13 Feb 2021 13:32:15 +0000 (16:32 +0300)]
fib: copy the path extentions when creating fib src rr entry

Type: fix
Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com>
Change-Id: Ib4957bfc03b0dfc90fd28689d5b32cc3d82e7b74

2 years agonat: test all intf addrs in is_interface_addr() 53/32453/4
Alexander Chernavin [Wed, 26 May 2021 13:55:42 +0000 (09:55 -0400)]
nat: test all intf addrs in is_interface_addr()

Type: fix

Currently, is_interface_addr() tests if a given IPv4 address belongs to
an interface by a given sw_if_index. However, there are several issues:
 * only the first found address on the interface is actually tested,
 * sw_if_index is always cached even if the interface hasn't been
   assigned any addresses yet.

With this change, is_interface_addr() tests all IPv4 addresses on an
interface by a given sw_if_index and caches sw_if_index only if there
are addresses present.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: If1acc4a534647a5f0ce8e9b565b867c92a016dc3

2 years agonat: fix crash when translate unknown proto packets 67/32467/2
Alexander Chernavin [Thu, 27 May 2021 14:05:17 +0000 (10:05 -0400)]
nat: fix crash when translate unknown proto packets

Type: fix

Currently, there might be a crash in NAT ED mode:
 * if a session for an unknown proto packet cannot be created in2out,
 * if a session for an unknown proto packet cannot be found out2in.

With this change, translate packets only if a session is given in NAT
ED mode.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: Iafb332db1ae9a3e76435964ad636037d1b8a51e8

2 years agostats: fix counters name overflow 43/32643/2
Benoît Ganne [Tue, 8 Jun 2021 14:27:38 +0000 (16:27 +0200)]
stats: fix counters name overflow

sm_directory_vector_by_name is a C-string hashtable, make sure the names
are NULL-terminated.

Type: fix

Change-Id: If44456ef9da69ed012f2b981b58ce732663af67d
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agoapi: remove custom dump 28/32728/3
Filip Tehlar [Tue, 15 Jun 2021 10:29:54 +0000 (10:29 +0000)]
api: remove custom dump

Type: improvement
Change-Id: I4b9b2be8817be10e46accc19219deb2b544f266b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2 years agoipsec: fix length check when adding footer+icv 25/32725/2
Benoît Ganne [Mon, 14 Jun 2021 15:23:56 +0000 (17:23 +0200)]
ipsec: fix length check when adding footer+icv

Length check must also take current_data into account.

Type: fix

Change-Id: I7a1b1752868892d40f59490d05452ef24565cca6
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agotcp: prevent timer handler being called frequently 18/32718/3
liuyacan [Mon, 14 Jun 2021 10:09:01 +0000 (18:09 +0800)]
tcp: prevent timer handler being called frequently

In the current implement, tcp would start or up an one tick
retransmit timer for that connection if vlib_buffer_alloc()
return 0. Now the tick is 0.1ms, this means that if VPP is
in a buffer shortage state, there would be a large number of
burst timer expirations.

This commit limits the minimum interval of the retransmission
timer to 100ms.

Type: fix

Signed-off-by: liuyacan <liuyacan@corp.netease.com>
Change-Id: Ia11d693fe46119c5dc16b24ca93c30c31109057a

2 years agonsh: api cleanup 21/32721/2
Filip Tehlar [Fri, 4 Jun 2021 11:55:48 +0000 (11:55 +0000)]
nsh: api cleanup

use autogenerated code

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I91a55412f96b138c3c00cbb8943d271c8a6452c9

2 years agovcl: improve shutdown() 92/32692/3
liuyacan [Sun, 13 Jun 2021 06:54:55 +0000 (14:54 +0800)]
vcl: improve shutdown()

This commit does following:

- Change the behavior of shutdown() with SHUT_RDWR flag.
- Check SHUT_RD flag when read()
- Change the errno when write() after SHUT_WR
- Remove unused code

All the above modification passed the packetdrill test.

Type: improvement

Signed-off-by: liuyacan <liuyacan@corp.netease.com>
Change-Id: I0c81f52e563562e58580d70976526b898e65e915

2 years agolinux-cp: Add tests for tun devices 13/32613/3
Neale Ranns [Mon, 7 Jun 2021 09:34:07 +0000 (09:34 +0000)]
linux-cp: Add tests for tun devices

Type: test

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Iec69d8624b15766ed65e7d09777819d2242dee17

2 years agopg: A Tunnel mode variant of a pg interface 64/32564/5
Neale Ranns [Thu, 3 Jun 2021 14:43:21 +0000 (14:43 +0000)]
pg: A Tunnel mode variant of a pg interface

Type: feature

this allows VPP to simulate linux tun devices.

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I3adf38b49a254804370f78edd5d275d192fd00a6

2 years agovlib: fix dangling reference in node_by_name hash 88/32688/2
Dave Barach [Fri, 11 Jun 2021 16:57:23 +0000 (12:57 -0400)]
vlib: fix dangling reference in node_by_name hash

When recycling a debug CLI process node, unix_cli_file_add() needs to
delete and recreate the related node_by_name hash table entry.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I635da4918509d5b22eae37627c2d9b3608380ca6

2 years agosession: fix listener ct transport retrieval on accept 91/32691/4
Florin Coras [Sat, 12 Jun 2021 18:56:19 +0000 (11:56 -0700)]
session: fix listener ct transport retrieval on accept

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ied2608e7a28c59c908803ca676abbe93072fadb8

2 years agotcp: fix proto in port reuse check 90/32690/2
Florin Coras [Sat, 12 Jun 2021 18:47:37 +0000 (11:47 -0700)]
tcp: fix proto in port reuse check

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I338e61654a62ed6308ecd8bb15e1a8b13cd859b9

2 years agosession: half-open free only on main thread 80/32680/4
Florin Coras [Fri, 11 Jun 2021 05:50:26 +0000 (22:50 -0700)]
session: half-open free only on main thread

TCP and (D)TLS clean up half-opens on main without a lock/barrier so
cleanup initiated from first worker, e.g., cut-throughs, can corrupt the
session pool.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2e5162831c0e201b22454f17fe55bfac44b85fa9

2 years agogso: fix the gro re-ordering for packets with PSH 68/32568/6
Mohsin Kazmi [Fri, 28 May 2021 15:11:23 +0000 (17:11 +0200)]
gso: fix the gro re-ordering for packets with PSH

Type: fix

This prevents reordering when a push flag is received.
GRO appends the segment with the push flag to the existing
flow and flushes it immediately.

Change-Id: I61b36209b3381f340594a9cb3ed816d43b02bdff
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2 years agodocs: cleanup, remove stale material 45/32645/2
Dave Barach [Wed, 9 Jun 2021 11:49:34 +0000 (07:49 -0400)]
docs: cleanup, remove stale material

Point https://fd.io/docs/vpp/master/links/index.html at docs.fd.io/vpp
instead of at one specific stale release

Remove https://fd.io/docs/vpp/master/featuresbyrelease/index.html

Remove https://fd.io/docs/vpp/master/events/index.html

Remove dead projects from
https://fd.io/docs/vpp/master/relatedprojects/index.html

Remove unsupported distros from
https://fd.io/docs/vpp/master/whatisvpp/supported.html

Reduce (doxygen) list of test framework doc files to actively
supported releases

Type: docs

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I179966fbbe09ac123e5f2647787a8dea93190b5c

2 years agomemif: fix crash with zero-copy slave 79/32679/2
Damjan Marion [Thu, 10 Jun 2021 15:41:57 +0000 (17:41 +0200)]
memif: fix crash with zero-copy slave

Type: fix
Change-Id: I456cc0b0a6f2dc32b14791baf9d4a7f67279e8df
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agovcl: touch fifo on epoll del only if session open 78/32678/3
Florin Coras [Thu, 10 Jun 2021 15:08:53 +0000 (08:08 -0700)]
vcl: touch fifo on epoll del only if session open

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0971c18a183319d09486459b0da08d44ce38acef

2 years agomemif: fix the spinlock and unlock issue. 08/32608/4
fangtong [Sat, 5 Jun 2021 13:45:36 +0000 (21:45 +0800)]
memif: fix the spinlock and unlock issue.

when the configuration of tx queues is larger than the worker-threads,
the clib_spinlock_lock_if_init will not be executed, and then this function
will executed the clib_spinlock_unlock_if_init, so this may caused the issue.

Type: fix

Signed-off-by: fangtong <fangtong2007@163.com>
Change-Id: I3ce244cd5e1f410e9f14bd060b929238f069b9fa

2 years agol2: fix vrrp prefix mac comparison 38/32638/3
Tianyu Li [Wed, 26 May 2021 06:20:57 +0000 (14:20 +0800)]
l2: fix vrrp prefix mac comparison

VRRP prefix length is 5 bytes, doesn't make sense
to compare with 6 bytes mac address

Type: fix

Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I70a9c9ca769f34a81cd568f9e6b9a3538e6ec710

2 years agocnat: fix spinlock 71/32571/2
Nathan Skrzypczak [Fri, 4 Jun 2021 09:17:40 +0000 (11:17 +0200)]
cnat: fix spinlock

Type: fix

Change-Id: Id6406702061ada54e51ebcf5c367328605de2b6b
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agofib: make sure dpo is valid even when path pool expands 44/32644/1
Benoît Ganne [Tue, 8 Jun 2021 16:44:37 +0000 (18:44 +0200)]
fib: make sure dpo is valid even when path pool expands

The path pool can expand during in fib_path_attached_next_hop_get_adj()
when calling adj_nbr_add_or_lock(). If dpo points to a path->fp_dpo, its
reference becomes stale.
Use a temporary copy instead.

Type: fix

Change-Id: Ie966cb5f3f7b416425964dca12f1f586bfc2010c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agofib: make sure adj is valid during walk 42/32642/2
Benoît Ganne [Tue, 8 Jun 2021 14:25:14 +0000 (16:25 +0200)]
fib: make sure adj is valid during walk

The adj can be deleted during fib_walk_sync(), make sure it can happen
only after clearing the SYNC_WALK_ACTIVE flag.

Type: fix

Change-Id: I68be00e9602e2783d9dced71c51547c38b7e8a00
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agoipsec: fix async crypto frame leak 96/32596/3
Matthew Smith [Fri, 4 Jun 2021 14:18:37 +0000 (09:18 -0500)]
ipsec: fix async crypto frame leak

Type: fix

If an async crypto frame is allocated during ESP encrypt/decrypt but
a buffer/op is not subsequently added to the frame, the frame leaks. It
is not submitted if the count of async ops is zero nor is it
returned to the frame pool. This happens frequently if >= 2 worker
threads are configured and a vector of buffers all have to be handed
off to other threads.

Wait until it is almost certain that the buffer will be added to the
frame before allocating the frame to make it more unlikely that an
allocated frame will not have any operations added to it.

For encrypt this is sufficient to ressolve the leak. For decrypt there
is still a chance that the buffer will fail to be added to the frame, so
remove the counter of async ops and ensure that all frames that were
allocated get either submitted or freed at the end.

Change-Id: I4778c3265359b192d8a88ab9f8c53519d46285a2
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2 years agovppinfra: pool_free_elts() now supports fixed-size pools 50/32550/3
Dave Barach [Wed, 2 Jun 2021 22:18:18 +0000 (18:18 -0400)]
vppinfra: pool_free_elts() now supports fixed-size pools

Test added to the unittest plugin / test_vlib.py

Type: improvement
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I73445e57918347c102ff6f5e8c9ddb9bd96f1407

2 years agovcl: accept zero length writes 06/32606/4
Florin Coras [Sat, 5 Jun 2021 00:31:53 +0000 (17:31 -0700)]
vcl: accept zero length writes

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I84985f59274e77219a38ea6ac865fc73ac635d72

2 years agovcl: avoid multiple reads on peek 05/32605/5
Florin Coras [Fri, 4 Jun 2021 23:28:18 +0000 (16:28 -0700)]
vcl: avoid multiple reads on peek

Only try once and return what was found.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I50b1d26babf1b7431d36f6b7472a1fb01475bb35

2 years agotls: change picotls plugin crypto module to accommodate new version picotls 09/32609/3
Simon Zhang [Mon, 7 Jun 2021 15:19:33 +0000 (23:19 +0800)]
tls: change picotls plugin crypto module to accommodate new version picotls

Type: fix

Change-Id: I58931e235535be7d596ca578790f389b64a4fbd2
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
2 years agopg: Reduce the inclusion of pg.h 57/32557/2
Neale Ranns [Thu, 3 Jun 2021 14:59:47 +0000 (14:59 +0000)]
pg: Reduce the inclusion of pg.h

Type: style

reduce the number of files recompiled after changing pg.h from 1110 to
102.

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I50611eba818eeb3a2dffd437a3c72c77766bed80

2 years agovcl: epoll error handling fixes and improvements 04/32604/4
Florin Coras [Fri, 4 Jun 2021 22:59:41 +0000 (15:59 -0700)]
vcl: epoll error handling fixes and improvements

- return VPPCOM_EEXIST if attempting to re-add a session
- return VPPCOM_ENOENT if the session to be removed is not epolled
- generate EPOLLIN if adding it through a mod operation on a session
that has data and did not have the event previously set.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I728a06b8cf84af8d8c1dea7406e284de8886dffc

2 years agobuild: fix centos-8 cmake missing package dependency 07/32607/2
Dave Wallace [Sat, 5 Jun 2021 02:55:18 +0000 (22:55 -0400)]
build: fix centos-8 cmake missing package dependency

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I199fea4607cf38a127ed31b2ddf1dd993a2462ba

2 years agoipsec: fix crypto ops in esp decrypt 72/32572/2
Benoît Ganne [Thu, 27 May 2021 16:49:42 +0000 (18:49 +0200)]
ipsec: fix crypto ops in esp decrypt

When both chained and non-chained buffers are processed in the same
vector, make sure the non-chained buffers are processed as non-chained
crypto ops.

Type: fix

Change-Id: I19fc02c25a0d5e2e8a1342e2b88bbae3fe92862f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agodpdk: silence coverity warning on use of uninitialized value 98/32598/1
pibr [Fri, 4 Jun 2021 16:16:26 +0000 (16:16 +0000)]
dpdk: silence coverity warning on use of uninitialized value

Type: fix

Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I76923ad5035498aae821db4fd42a127617476fbb

2 years agobuild: fix build error after make wipe 65/32565/1
Tianyu Li [Fri, 4 Jun 2021 09:43:01 +0000 (17:43 +0800)]
build: fix build error after make wipe

ninja: error: '/home/vpp/src/vpp-api/vapi/fake.api.json',
needed by 'CMakeFiles/vpp-api/vapi/fake.api.vapi.h',
missing and no known rule to make it

Recent fake.api.json has been moved from test/ to src/,
update make wipe to reflect the movement.

Type: fix

Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I1e8ef414a3f8a2fce11767e0778fe21e14d54e6f

2 years agopolicer: fix vnet/policer cli <policer bind [unbind] name <name> <worker>> handle 94/32494/3
jinshaohui [Sun, 30 May 2021 04:40:56 +0000 (05:40 +0100)]
policer: fix vnet/policer cli <policer bind [unbind] name <name> <worker>> handle
an exception

Type: fix

Signed-off-by: jinshaohui <jinsh11@chinatelecom.cn>
Change-Id: I67b7d0b52c33a5b13ace8fe2d918139d2820e9bf

2 years agovcl: avoid updating errno on ldp init check 51/32551/7
Florin Coras [Thu, 3 Jun 2021 04:22:21 +0000 (21:22 -0700)]
vcl: avoid updating errno on ldp init check

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7f5887865aa29c9881b5063be1d7d42369a493c1

2 years agobuild: fix install-deps on centos-8 61/32561/1
Dave Wallace [Thu, 3 Jun 2021 21:37:27 +0000 (17:37 -0400)]
build: fix install-deps on centos-8

- Required to fix CI jobs failing due to errant
  upgrade of glibc-devel which cannot be found.

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: Iea5ae51de25b7ade1f75e3ce34d8383ed97f12ef

2 years agosvm: release mem order for fifo chunk list CAS 46/32546/5
Florin Coras [Wed, 2 Jun 2021 18:17:29 +0000 (11:17 -0700)]
svm: release mem order for fifo chunk list CAS

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: Ifad679f46abd6e9c18a3eaf7e55800a09f3791ab

2 years agosession: avoid ct connects loop 52/32552/3
Florin Coras [Thu, 3 Jun 2021 04:32:39 +0000 (21:32 -0700)]
session: avoid ct connects loop

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I99af136ecab9be1f9e00de6d197b8f1c74ab4b20

2 years agosession: lcl transport info on accept 03/31603/6
Florin Coras [Wed, 10 Mar 2021 02:36:06 +0000 (18:36 -0800)]
session: lcl transport info on accept

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia46b0b8afed30f84b244c06f0457303f9e8832cd

2 years agolinux-cp: use default adjacency 34/32434/2
Matthew Smith [Tue, 25 May 2021 14:41:05 +0000 (09:41 -0500)]
linux-cp: use default adjacency

Type: fix

Outbound packets from the host have an adjacency lookup performed so
buffer metadata can be filled in and output features can be applied.
If no adjacency is found for a packet, it gets dropped. This breaks
DHCP and possibly other things since the DHCP reply to a discover
request is sent to a destination MAC address that is determined by
the contents of the request packet rather than any existing neighbor
table entry.

If adjacency lookup for outbound packets does not find an entry, use
the default adjacency for the interface & address family.

Change-Id: Ia53a4df3a5bad2991768cfe4a84c560b879e656f
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2 years agofib: fix flags updates when adding routes with a udp encap path 07/32507/6
Arthur de Kerhor [Tue, 1 Jun 2021 09:42:20 +0000 (11:42 +0200)]
fib: fix flags updates when adding routes with a udp encap path

When adding a route via a udp encap instance, FIB_ENTRY_FLAG_IMPORT
should not be set. In particular, fib_route_attached_cross_table should
always return false for such paths.
Modified test_udp_encap to leverage the bug that needed to be fixed.

Type: fix
Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
Change-Id: Iaa9489e96d1cff09751f92c62caf7999d924fd7f

2 years agomisc: bug fixes and improvements for stats Fuse fs 41/32541/3
Arthur de Kerhor [Wed, 24 Mar 2021 14:32:07 +0000 (07:32 -0700)]
misc: bug fixes and improvements for stats Fuse fs

Added syslogs
Added support for symlinks
Relocated make commands in a local Makefile
Dumping stats on index instead of paths
Updated README
Added go.mod and go.sum with relevant dependencies for the module

Type: fix
Change-Id: I2c91317939b2f4d765771ab7038372ae27d3109d
Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
2 years agovcl: ldp placeholder for SO_LINGER 45/32545/3
Florin Coras [Wed, 2 Jun 2021 15:23:50 +0000 (08:23 -0700)]
vcl: ldp placeholder for SO_LINGER

Make sure we don't return error if app tries to setsockopt it.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1a9a6a8da03380b0b6a6d01efed9b672a3f0b1f9

2 years agosrtp: cleanup build and default to disabled 89/32489/4
Florin Coras [Fri, 28 May 2021 16:06:51 +0000 (09:06 -0700)]
srtp: cleanup build and default to disabled

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I62fb56257445a05105e556d1ea6cc6280b5eeccc

2 years agoudp: calculate inner checksums if needed before udp encap 06/32506/2
Arthur de Kerhor [Tue, 1 Jun 2021 09:27:48 +0000 (11:27 +0200)]
udp: calculate inner checksums if needed before udp encap

We do not want to encap headers containing wrong checksums.

Additionnally, this clears the checksums offlads flags, which
was something missing since the outer headers checksums were
calculated during the encap. Hence, those should not be
recalculated afterwards.

Type: fix
Change-Id: I7fd07987b4f13f76c6990a1c08dc2f960bdd8de1
Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
2 years agonat: fix broken nat44-ed cli 02/32502/1
Ruslan Babayev [Tue, 1 Jun 2021 03:23:57 +0000 (20:23 -0700)]
nat: fix broken nat44-ed cli

snat_set_frame_queue_nelts has been replaced with
nat44_ed_set_frame_queue_nelts.

Type: fix
Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
Change-Id: I8d970be71376fdbb2bfd383d4d5824a8def93bb3

2 years agointerface: fix vnet_sw_interface_update_unnumbered 93/32493/2
Dave Barach [Sat, 29 May 2021 13:00:45 +0000 (09:00 -0400)]
interface: fix vnet_sw_interface_update_unnumbered

Unless a software interface is actually unnumbered, do not set
ip[46]_main.lookup_main.if_address_pool_index_by_sw_if_index [sw_if_index]
to ~0

Fixes this scenario:

loop create
set int state loop0 up
create sub-interface loop0 1
set interface ip addr loop0.1 192.168.1.1/24
delete sub-interface loop0.1
set int ip addr loop0 192.168.1.1/24

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I46141d862fa57d70b93d7bb0c105403708165264

2 years agotls: fix handling of failed connects 91/32491/6
Florin Coras [Sat, 29 May 2021 01:29:08 +0000 (18:29 -0700)]
tls: fix handling of failed connects

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ifbf43dd69aa07be485fe7fa01c917512e423036e

2 years agoudp: add udp decapsulation 92/32392/6
Arthur de Kerhor [Thu, 20 May 2021 09:48:00 +0000 (11:48 +0200)]
udp: add udp decapsulation

Possibility to register a port via CLI or API to decap incoming UDP
packets:
 - For CLI, a user needs to specify the inner protocol (only MPLS
   supported for now)
 - For API, the protocol is specified by index
Added unittests

Type: feature
Change-Id: Ifedd86d8db2e355b7618472554fd67d77a13a4aa
Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
2 years agohsa: proxy listener support addition of fifo segments 92/32492/5
Florin Coras [Sat, 29 May 2021 01:34:12 +0000 (18:34 -0700)]
hsa: proxy listener support addition of fifo segments

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I59218f784140ef5ecb8468af6aebfe25fd7703a4

2 years agotls: fix handling of failed accepts 90/32490/3
Florin Coras [Sat, 29 May 2021 01:28:05 +0000 (18:28 -0700)]
tls: fix handling of failed accepts

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I34b53dcaf4f049157b538ea40a39033d43e525a5

2 years agosvm: fix inadequate atomic load for chunk mgr 77/32477/3
Dave Wallace [Thu, 27 May 2021 23:44:50 +0000 (19:44 -0400)]
svm: fix inadequate atomic load for chunk mgr

- Fixes intermittent LDP cut thru iperf3 test
  failure on AARCH64

Type: fix

Change-Id: Id21a078d642e03d974bacacd1f4d0faa42fb6652
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2 years agobuild: bash set in ./configure 87/32487/1
Damjan Marion [Fri, 28 May 2021 15:32:58 +0000 (17:32 +0200)]
build: bash set in ./configure

Type: make
Change-Id: I29dce242579d130afe031715b328d6bba73ec6dd
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agogso: fix the error handling 75/32475/2
Mohsin Kazmi [Thu, 27 May 2021 19:05:41 +0000 (21:05 +0200)]
gso: fix the error handling

Type: fix

Change-Id: I7ada1b780b5c40261f6b14cfadc3f382e4e39086
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2 years agovlib: handoff rework 76/32276/16
Damjan Marion [Tue, 11 May 2021 07:39:24 +0000 (09:39 +0200)]
vlib: handoff rework

Type: improvement
Change-Id: I1e199ae31e969154319e94c5cd286b8d8adc6660
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agobuild: kindly ask python not to polute src/ 40/32440/5
Damjan Marion [Tue, 25 May 2021 17:28:21 +0000 (19:28 +0200)]
build: kindly ask python not to polute src/

Type: make
Change-Id: I1ec82e0f3c19dee79f942996339240c73d4e380c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agodpdk: bump to 21.05 41/32441/6
Fan Zhang [Thu, 27 May 2021 12:24:52 +0000 (13:24 +0100)]
dpdk: bump to 21.05

Type: feature

This patch bumps DPDK version to 21.05 and updated VPP to
accomodate the changes in DPDK latest version.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: If217441f70c9ab531196dca7ec7a486ec9931cff

2 years agointerface: add tx-queue cli support for new tx infra 30/32430/5
Mohsin Kazmi [Mon, 24 May 2021 16:33:50 +0000 (18:33 +0200)]
interface: add tx-queue cli support for new tx infra

Type: improvement

set interface tx-queue tap1 queue 2 threads 1-2
show hardware-interfaces tap1
              Name                Idx   Link  Hardware
tap1                               2     up   tap1
  Link speed: unknown
  RX Queues:
    queue thread         mode
    0     vpp_wk_1 (2)   polling
  TX Queues:
    queue shared thread(s)
    0     no     0
    1     no     1
    2     yes    1-2
    3     no     3
    4     no     4
  Ethernet address 02:fe:09:3a:48:ff
  VIRTIO interface
     instance 1

set interface tx-queue tap0 queue 4 threads
show hardware-interfaces tap0
              Name                Idx   Link  Hardware
tap0                               1     up   tap0
  Link speed: unknown
  RX Queues:
    queue thread         mode
    0     vpp_wk_0 (1)   polling
  TX Queues:
    queue shared thread(s)
    0     no     0
    1     no     1
    2     no     2
    3     no     3
    4     no
  Ethernet address 02:fe:03:6a:66:fc
  VIRTIO interface
     instance 0

Change-Id: I6154476ec9ff0b14287098529c88a14b779371a5
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2 years agoip: allow the 'ip6 enable' on tunnel interface types 03/32403/8
Neale Ranns [Thu, 20 May 2021 16:28:12 +0000 (16:28 +0000)]
ip: allow the 'ip6 enable' on tunnel interface types

Type: feature

This was limited to HW interface types (for historical reason AFAICT)

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I3785a356ae31722fa60d84f64ec9aa53ebdd615f

2 years agodpdk: fix missing symbol 36/32436/2
Fan Zhang [Tue, 25 May 2021 14:50:30 +0000 (15:50 +0100)]
dpdk: fix missing symbol

Type: fix

This patch fixes the missing symbol of dpdk_plugin.so when
creating symmetric key. The solution is to add dependency
of libssl to dpdk cryptodev and disable cryptodev engine
when libssl is not presented.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: I30aa6e3e3af1faefa82883bad613e1d82235a2ec

2 years agovppinfra: explicit blocking mode for sock connects 57/32457/3
Florin Coras [Wed, 26 May 2021 17:21:10 +0000 (10:21 -0700)]
vppinfra: explicit blocking mode for sock connects

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3a33230de13fef613dc9523cf24a9968d200c2e5

2 years agotests: Fix 'test-wipe' 50/32450/3
Neale Ranns [Wed, 26 May 2021 12:57:14 +0000 (12:57 +0000)]
tests: Fix 'test-wipe'

Type: fix

Error:
vagrant@ ~/vpp (make-test-wipe) $ make test-wipe
make[1]: Entering directory '/home/vagrant/vpp/test'
make[2]: Entering directory '/home/vagrant/vpp/test'
make[2]: *** ext: No such file or directory.  Stop.
make[2]: Leaving directory '/home/vagrant/vpp/test'
make[1]: *** [Makefile:239: wipe] Error 2
make[1]: Leaving directory '/home/vagrant/vpp/test'
make: *** [Makefile:440: test-wipe] Error 2

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I3615a962882d5d56c394aa628e9942fed07cde84

2 years agomisc: Initial 21.10-rc0 commit 49/32449/2 v21.10-rc0
Andrew Yourtchenko [Wed, 26 May 2021 11:34:39 +0000 (11:34 +0000)]
misc: Initial 21.10-rc0 commit

- Add 21.10 Release Notes placeholder
- Add test framework link

Type:docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I30770a0968bb7215f2727afec4cdc4ef87e49a5e

2 years agofib: During the mfib lookup set the unicast FIB index in the packet so that a uRPF... 98/32298/5
Neale Ranns [Thu, 13 May 2021 15:28:27 +0000 (15:28 +0000)]
fib: During the mfib lookup set the unicast FIB index in the packet so that a uRPF check on a for-us packet is done in the correct VRF

Type: fix

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Iafa6efea0d96962aa9136dccefc148a961f74476

2 years agopg: revert exec file fixes 38/32438/3
Ray Kinsella [Tue, 25 May 2021 14:55:52 +0000 (15:55 +0100)]
pg: revert exec file fixes

This reverts commit fd4fd0d1853ae7384e7a64c4cad17a3469720b95.

Type: fix
Change-Id: I6ef84f646372270ded486eacee81817067e49106
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
2 years agonat: add thread index assertions 68/31768/6
Klement Sekera [Thu, 25 Mar 2021 14:39:15 +0000 (15:39 +0100)]
nat: add thread index assertions

Add extra assertions to debug build.

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ib20130365e8f9dbb556fcbb4321dd184c7eff603

2 years agoapi: socket client connect set to blocking 28/32428/3
Florin Coras [Mon, 24 May 2021 15:58:15 +0000 (08:58 -0700)]
api: socket client connect set to blocking

Binary api client must otherwise check the returned error and if it was
EAGAIN/EINPROGRESS poll for connect completion.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I89845b1a59b9fa2ab0968029435ceb203bfa8f6c

2 years agovlib: revert exec cmd handle scripts with blank lines 37/32437/2
Ray Kinsella [Tue, 25 May 2021 14:55:30 +0000 (15:55 +0100)]
vlib: revert exec cmd handle scripts with blank lines

This reverts commit 269e1569e1f7798bf7d7f539daf505b2f1997a08.

Type: fix

Change-Id: I40bd71ae3b5e9dc8345fb2460aae437de8a9a5ba
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
2 years agoperfmon: revert raw column support 24/32424/2
Ray Kinsella [Fri, 21 May 2021 15:17:39 +0000 (16:17 +0100)]
perfmon: revert raw column support

Revert raw column from the perfmon plugin.

Type: refactor

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: If127f57ee2022cc1c0ea5177f1655a792f195f1d

2 years agotests: move vapi C/C++ test files into src/ 39/32439/4
Damjan Marion [Tue, 25 May 2021 16:29:24 +0000 (18:29 +0200)]
tests: move vapi C/C++ test files into src/

Type: improvement
Change-Id: Iaad004661db1e9076e6c27227878f1612fa7289f
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2 years agosrtp: basic implementation based on libsrtp2 52/30652/47
Florin Coras [Thu, 7 Jan 2021 01:35:17 +0000 (17:35 -0800)]
srtp: basic implementation based on libsrtp2

Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic5e99938a5f130e83de6d590d2f89252d055bceb