vpp.git
3 years agoipsec: add support for AES CTR 95/30895/5
Benoît Ganne [Fri, 22 Jan 2021 17:03:09 +0000 (18:03 +0100)]
ipsec: add support for AES CTR

Type: feature

Change-Id: I9f7742cb12ce30592b0b022c314b71c81fa7223a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agoikev2: fix bad ip in logs 23/31123/2
Filip Tehlar [Thu, 4 Feb 2021 17:07:30 +0000 (17:07 +0000)]
ikev2: fix bad ip in logs

Type: fix

Change-Id: Icd01491043e9fd1bb8f51f4f55e1252fd78512de
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agointerface: RX/TX direction type in API 15/30415/4
Neale Ranns [Mon, 14 Dec 2020 16:50:33 +0000 (16:50 +0000)]
interface: RX/TX direction type in API

Type: feature

Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Change-Id: I982205b48615395f19cbb36c73854fb5c3db45e8

3 years agopapi: remove unused name from __all__ 49/30449/3
Paul Vinciguerra [Wed, 16 Dec 2020 17:37:57 +0000 (17:37 +0000)]
papi: remove unused name from __all__

missed in https://gerrit.fd.io/r/c/vpp/+/30238

Type: fix

Change-Id: I342868a77d7ca87896d97847ca6525ad1abcd1b6
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agonat: configurable handoff frame queue size 33/30933/4
Elias Rudberg [Tue, 26 Jan 2021 12:56:45 +0000 (13:56 +0100)]
nat: configurable handoff frame queue size

Make number of worker handoff frame queue elements configurable as
a set nat frame-queue-nelts command. The default value is 64 which
is the same value that was previously hard-coded. The idea is that
allowing larger values can be useful in some cases, to avoid
congestion drops. Also add nat_set_fq_options API support and a
corresponding test case.

Type: improvement

Change-Id: I5c321eb2d7997f76fac2703d9c4a5b2516375db3
Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
3 years agovxlan: add udp-port configuration support 04/30204/10
Artem Glazychev [Mon, 30 Nov 2020 19:39:21 +0000 (02:39 +0700)]
vxlan: add udp-port configuration support

Type: improvement

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: Ie30d51ab4df5599b52f7335f863b930cd69dbdc1

3 years agosr: Fix the issue that L3VPN SRv6 encapsulated packets could not be forwarded. 28/31028/12
Tetsuya Murakami [Mon, 1 Feb 2021 00:38:56 +0000 (16:38 -0800)]
sr: Fix the issue that L3VPN SRv6 encapsulated packets could not be forwarded.

Type: fix

Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
Change-Id: Ia12feee9e46d4951519d5c6f9d1a21d89701dc0f
Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
3 years agotests: ikev2: non-default table id test 77/31077/3
Filip Tehlar [Wed, 27 Jan 2021 18:08:21 +0000 (18:08 +0000)]
tests: ikev2: non-default table id test

Test whether responder sends info requests using correct ip table

Type: test

Change-Id: I9e97576f9d80686961f92de3cbc3e6f8d6341587
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agompls: MPLS Hash fixes 10/31110/2
Neale Ranns [Thu, 4 Feb 2021 10:54:22 +0000 (10:54 +0000)]
mpls: MPLS Hash fixes

Type: fix

MPLS hash includes the IP hash at the bottom of the stack. Default this
to the IP default and use the value passed in to the compute function.

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

3 years agoikev2: add hint to the log when IDs do not match 47/30947/5
Filip Tehlar [Tue, 26 Jan 2021 22:06:48 +0000 (22:06 +0000)]
ikev2: add hint to the log when IDs do not match

Type: improvement
Ticket: VPP-1908

Change-Id: I1d86ea18fcb6174b86c449d5d9403fd0e5715318
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agoikev2: fix msgid 36/30936/2
Filip Tehlar [Tue, 26 Jan 2021 15:08:25 +0000 (15:08 +0000)]
ikev2: fix msgid

Type: fix

In responder initialize msgid in requests to 1 as the previous value (0) was
causing retransmision on the initiator.

Change-Id: I8f5b84331ecac5943129f4c9a377076768fec455
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agocrypto-ipsecmb: add support for AES CTR 56/30956/2
Benoît Ganne [Fri, 22 Jan 2021 17:41:06 +0000 (18:41 +0100)]
crypto-ipsecmb: add support for AES CTR

Type: feature

Change-Id: Ide2901f5d2111a518b2c8212aa84468cef1d72ca
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agovppinfra: fix mem map mt issue due to snprintf 96/31096/7
Florin Coras [Tue, 2 Feb 2021 23:40:35 +0000 (15:40 -0800)]
vppinfra: fix mem map mt issue due to snprintf

Type: fix

Apparently snprintf is not thread safe!?

Thread 6 "vpp_wk_3" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffeed1a3700 (LWP 819375)]
0x00007ffff58fc2b4 in __GI__IO_default_xsputn (n=<optimized out>,
data=<optimized out>, f=<optimized out>) at genops.c:394
394     genops.c: No such file or directory.
(gdb) bt
0  0x00007ffff58fc2b4 in __GI__IO_default_xsputn (n=<optimized out>,
data=<optimized out>, f=<optimized out>) at genops.c:394
1  __GI__IO_default_xsputn (f=0x7ffeec35e050, data=<optimized out>,
n=9) at genops.c:370
2  0x00007ffff58e127c in __vfprintf_internal (s=s@entry=0x7ffeec35e050,
format=format@entry=0x7ffff5f833ce "%s",
    ap=ap@entry=0x7ffeec35e1d0, mode_flags=mode_flags@entry=2) at
../libio/libioP.h:948
3  0x00007ffff58f611a in __vsnprintf_internal (string=0x7ffed57ed018
"", maxlen=<optimized out>, format=0x7ffff5f833ce "%s",
    args=args@entry=0x7ffeec35e1d0, mode_flags=2) at vsnprintf.c:114
4  0x00007ffff5997fd1 in ___snprintf_chk (s=<optimized out>,
maxlen=<optimized out>, flag=<optimized out>, slen=<optimized out>,
    format=<optimized out>) at snprintf_chk.c:38
5  0x00007ffff5f7fd74 in clib_mem_vm_map_internal (base=<optimized
out>, log2_page_sz=<optimized out>, size=<optimized out>,
    fd=<optimized out>, offset=<optimized out>, name=0x0) at
/scratch/fcoras/vpp/src/vppinfra/linux/mem.c:502

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

3 years agovlib: "revert startup multi-arch variant configuration fix for interfaces" 11/30911/3
Damjan Marion [Wed, 27 Jan 2021 14:21:36 +0000 (14:21 +0000)]
vlib: "revert startup multi-arch variant configuration fix for interfaces"

Type: fix

This reverts commit 5a48b3b9d88fa2793793e2bf3db8bf156fe2951f.

Change-Id: Ifa91b18bdbbc32bb729abc09d95637d9cdf42c3b
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agonat: reduce number of hash tables for EI NAT 90/31090/4
Klement Sekera [Tue, 26 Jan 2021 11:18:53 +0000 (12:18 +0100)]
nat: reduce number of hash tables for EI NAT

Making code more simple and storing thread index along with session
index as a preparation step for fixing thread safety patches.

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

3 years agoapi: Fold the empty pool check into the main macro 70/30970/2
Neale Ranns [Thu, 28 Jan 2021 11:38:16 +0000 (11:38 +0000)]
api: Fold the empty pool check into the main macro

Type: improvement

the empty pool chekc is always required, so make it alwayd happen.

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

3 years agolinux-cp: Linux Interface Mirroring for Control Plane Integration 59/30759/11
Neale Ranns [Thu, 24 Dec 2020 09:16:09 +0000 (09:16 +0000)]
linux-cp: Linux Interface Mirroring for Control Plane Integration

Type: feature

please see FEATURE.yaml for details.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Signed-off-by: Pim van Pelt <pim@ipng.nl>
Change-Id: I04a45c15c0838906aa787e06660fa29f39f755fa

3 years agoipsec: one thread index per-SA 13/31113/1
Neale Ranns [Thu, 4 Feb 2021 11:33:32 +0000 (11:33 +0000)]
ipsec: one thread index per-SA

Type: improvement

AN SA is uni-drectional therefore it can be used only for encrypt or
decrypt, not both. So it only needs one thread ID. free up some space on
the 1st cacheline.

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

3 years agovlib: increase the stats epoch only when necessary 93/30693/7
Miklos Tirpak [Tue, 12 Jan 2021 14:14:02 +0000 (15:14 +0100)]
vlib: increase the stats epoch only when necessary

When the counter vectors are validated and they are already long enough
to fit the given index in memory, there is no need to increase the stats
segment epoch. In this case, the counter vectors do not change as a
result of the validation.

This optimization is necessary for the case when the configuration is
changed at multiple thousands per second rate. The counter vectors grow
at the beginning and their size stabilizes after a while. Without this
improvement, it can still take several seconds for a stats reader to
succeed.

Type: improvement
Signed-off-by: Miklos Tirpak <miklos.tirpak@gmail.com>
Change-Id: I5a6c30255832716a1460018d0bd0f63031de102b

3 years agovxlan: fix interface naming 97/30997/5
Ray Kinsella [Thu, 28 Jan 2021 17:09:45 +0000 (17:09 +0000)]
vxlan: fix interface naming

Previous commit broke naming of vxlan interfaces.

Type:fix
Fixes:a4b0541f6

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

3 years agovppapigen: Support an 'autoendian' keyword for message definitions in 85/31085/3
Neale Ranns [Tue, 2 Feb 2021 09:21:52 +0000 (09:21 +0000)]
vppapigen: Support an 'autoendian' keyword for message definitions in
.api files

Type: feature

Make the auto-endian nature explicit, rather than hidden in the x_api.c
file.

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

3 years agovppapigen: fix enum types 94/30394/6
Paul Vinciguerra [Sun, 13 Dec 2020 04:12:55 +0000 (04:12 +0000)]
vppapigen: fix enum types

enums can return signed or unsigned integers
enumflags are unsigned integers

Type: fix

Change-Id: Iafc8f8f09c96679c5983d2cb807699fcf90ca0d7
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agotests: verify policer stats in punt tests 73/30973/2
Brian Russell [Wed, 27 Jan 2021 14:45:22 +0000 (14:45 +0000)]
tests: verify policer stats in punt tests

Add verification of policer stats in the IP[46] punt paths.

Type: test
Signed-off-by: Brian Russell <brian@graphiant.com>
Change-Id: I8b1035afc2d3abe4e98bdb3a76e87a0dd131ef4b

3 years agopolicer: add counters 72/30972/2
Brian Russell [Wed, 27 Jan 2021 11:34:33 +0000 (11:34 +0000)]
policer: add counters

Add counters to the policer against each of the 3 possible results:
conform, exceed and violate.

Type: improvement
Signed-off-by: Brian Russell <brian@graphiant.com>
Change-Id: Ia98a2f5655df6873259197d6bbf0ff2709b7d60e

3 years agovcl: remove verbose output from vcl iperf tests 82/31082/2
Florin Coras [Mon, 1 Feb 2021 19:59:49 +0000 (11:59 -0800)]
vcl: remove verbose output from vcl iperf tests

For high throughput tests the amount of debug output can be
considerable.

Type: improvement

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

3 years agoquic: clean setup_cipher function 75/30975/2
Mathias Raoul [Wed, 27 Jan 2021 15:35:54 +0000 (15:35 +0000)]
quic: clean setup_cipher function

Type: fix

Change-Id: I02e473440a8732ddfb1a13ad6552779adaa67f60
Signed-off-by: Mathias Raoul <mathias.raoul@gmail.com>
3 years agomisc: remove duplicated gbp entry in maintainers 81/31081/2
Vratko Polak [Mon, 1 Feb 2021 17:42:04 +0000 (18:42 +0100)]
misc: remove duplicated gbp entry in maintainers

Type: style

Change-Id: Iba79915b78daf6eec6affa4efce66d3670d3f3c0
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
3 years agomisc: mark vnet and plugin in maintainers 80/31080/2
Vratko Polak [Mon, 1 Feb 2021 17:25:59 +0000 (18:25 +0100)]
misc: mark vnet and plugin in maintainers

Type: style

Change-Id: Ibbc33d92e3663aea0b33a2f961a9ceebc975b51c
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
3 years agomisc: use tab as separator in maintainers file 79/31079/2
Vratko Polak [Mon, 1 Feb 2021 17:20:06 +0000 (18:20 +0100)]
misc: use tab as separator in maintainers file

Type: style

Change-Id: I9bf61b0b9fd35941fda52c0eef99c7c95db9cba8
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
3 years agovppinfra: add defines for bihash add and delete 71/30971/2
Paul Atkins [Tue, 19 Jan 2021 15:22:23 +0000 (15:22 +0000)]
vppinfra: add defines for bihash add and delete

When calling the bihash_add_del... functions some callers add a comment
beside the value to indicate this is the is_add param. Make the code
easier to read by adding defines for add and delete that the callers
can use instead of having to use 0 or 1.

Type: improvement
Signed-off-by: Paul Atkins <patkins@graphiant.com>
Change-Id: Iab5f7c8e8df12ac62fc7e726ca1798622dcdb42c

3 years agomisc: Volunteer as maintainer for the policer 33/31033/2
Neale Ranns [Mon, 1 Feb 2021 10:19:15 +0000 (10:19 +0000)]
misc: Volunteer as maintainer for the policer

Type: improvement

I volunteer myself as maintainer of the policer code.

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

3 years agomisc: Remove duplicate "classify" entry in MAINTAINER list 31/31031/2
Neale Ranns [Mon, 1 Feb 2021 10:15:01 +0000 (10:15 +0000)]
misc: Remove duplicate "classify" entry in MAINTAINER list

Type: fix

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

3 years agodocs: fix up the markdown 12/30912/2
Andrew Yourtchenko [Wed, 27 Jan 2021 13:53:42 +0000 (13:53 +0000)]
docs: fix up the markdown

Type: docs
Change-Id: Ia541839e1f1ceddfae4579dece43b9cc820702e2
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit de569048a504cf211d80b86882e6781684301790)

3 years agomisc: 21.01 Release Notes 13/30913/2
Andrew Yourtchenko [Wed, 16 Dec 2020 22:28:30 +0000 (22:28 +0000)]
misc: 21.01 Release Notes

Change-Id: I8fa48e631b9405f2882ea975927c42dbbd32cf1f
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Type: docs
(cherry picked from commit 3d2d96e5547484290c9368bac0a420afa8c4c068)

3 years agomisc: Update my email address in MAINTAINERS 34/31034/2
Neale Ranns [Mon, 1 Feb 2021 10:21:33 +0000 (10:21 +0000)]
misc: Update my email address in MAINTAINERS

Type: fix

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

3 years agofib: Changes to interpose source 32/30932/3
Neale Ranns [Tue, 26 Jan 2021 12:08:25 +0000 (12:08 +0000)]
fib: Changes to interpose source

Type: improvement

1) stack the interpose on any path-extensions (e.g. labels) from the
next best source
2) allow more than 1 source to contribute a DPO for a given prefix

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

3 years agotap: fix the interrupt handling 51/30951/2
Mohsin Kazmi [Wed, 27 Jan 2021 14:16:56 +0000 (14:16 +0000)]
tap: fix the interrupt handling

Type: fix

Interrupt are suppressed from kernel on tx path.

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I9f39f343b7e16bad09910766adf0b09654721f67

3 years agointerface: fix interface name overflow in logs 14/30114/11
Benoît Ganne [Tue, 24 Nov 2020 17:15:07 +0000 (18:15 +0100)]
interface: fix interface name overflow in logs

hi->name is a non-NULL-terminated vector.

Type: fix

Change-Id: I1a9f128f24f137b43cb47169677cc4288043fbd7
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agomisc: fix a trunccation on vhost dump 71/29971/6
Steven Luong [Tue, 17 Nov 2020 23:56:10 +0000 (15:56 -0800)]
misc: fix a trunccation on vhost dump

feature is u64. We need to print it with %llx and enough precision to
avoid truncation

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I9f5dd523400473b4881b01b8e6cecf439a8060d9

3 years agovlib: acquire barrier before exit call 67/30967/3
Kommula Shiva Shankar [Thu, 28 Jan 2021 07:35:59 +0000 (13:05 +0530)]
vlib: acquire barrier before exit call

Type: fix

A plugin exit callback function registered via
VLIB_MAIN_LOOP_EXIT_FUNCTION() is called without stopping worker cores
doing data path processing. Following error is observed while exiting
vpp.

error log:
vppctl# q
0: /vpp_master/src/vnet/interface.c:1058 (vnet_delete_hw_interface) assertion `ii == 0 || this_vlib_main->parked_at_barrier == 1' fails

This patch calls all exit() functions after acquiring barrier

Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
Reviewed-by: Nitin Saxena <nsaxena@marvell.com>
Change-Id: I2fd565f0afaa62cb0fb0389922f49e4d382f028c

3 years agovcl: support set/get vrf attribute 99/30999/1
Florin Coras [Thu, 28 Jan 2021 19:39:27 +0000 (11:39 -0800)]
vcl: support set/get vrf attribute

Type: improvement

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

3 years agovcl: fix select want deq ntf for ct sessions 58/30958/2
Florin Coras [Wed, 27 Jan 2021 23:33:51 +0000 (15:33 -0800)]
vcl: fix select want deq ntf for ct sessions

Type: fix

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

3 years agosvm vcl: add helper fn that discovers mqs in segment 61/30961/3
Florin Coras [Thu, 28 Jan 2021 02:08:25 +0000 (18:08 -0800)]
svm vcl: add helper fn that discovers mqs in segment

Type: improvement

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

3 years agovcl: honor time wait in eventfd epoll wait 59/30959/4
Florin Coras [Thu, 28 Jan 2021 00:05:24 +0000 (16:05 -0800)]
vcl: honor time wait in eventfd epoll wait

Type: fix

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

3 years agocnat: Fix session with deleted tr 73/30273/5
Nathan Skrzypczak [Fri, 4 Dec 2020 09:23:34 +0000 (10:23 +0100)]
cnat: Fix session with deleted tr

Type: fix

When a translation gets deleted, hiting a
session pointing to it sefaults. We're better
off directly storing the next node index.

Change-Id: I4f0716d775202b4ecf54d6cdb827bbeebd23056c
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agocnat: Fix throttle hash & cleanup 55/29955/7
Nathan Skrzypczak [Mon, 16 Nov 2020 17:57:52 +0000 (18:57 +0100)]
cnat: Fix throttle hash & cleanup

Type: fix

This fixes two issues :
- We used a hash to throttle RPC for adding fib entries,
but as we rely on a refcount, we cannot accept loosing an
entry, which could happen in case of a collision.
- On client cleanup we weren't freeing the fib entry correctly
which resulted in crashes when recreating an entry.
Added a test that ensures proper cleanup

Change-Id: Ie6660b0b02241f75092737410ae2299f8710d6b9
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agotests: add ip6 punt policer handoff test 92/30892/2
Brian Russell [Tue, 19 Jan 2021 16:58:34 +0000 (16:58 +0000)]
tests: add ip6 punt policer handoff test

Add a test for ip6 punt policer thread handoff. A child class is
created that uses common punt test setup but is configured to have 2
worker threads.

Type: test
Signed-off-by: Brian Russell <brian@graphiant.com>
Change-Id: I65c44f5d79455129accd7cf405c15920a5a9b678

3 years agotests: move ip6 punt setup to its own class 91/30891/2
Brian Russell [Tue, 19 Jan 2021 16:58:14 +0000 (16:58 +0000)]
tests: move ip6 punt setup to its own class

Move interface and packet setup for the ip6 punt test to its own
class so that child classes can be created that use it.

Type: test
Signed-off-by: Brian Russell <brian@graphiant.com>
Change-Id: I14acedc1bcd12cb320835a36833cd32303c5f793

3 years agotests: add ip4 punt policer handoff test 90/30890/2
Brian Russell [Tue, 19 Jan 2021 16:57:42 +0000 (16:57 +0000)]
tests: add ip4 punt policer handoff test

Add a test for ip4 punt policer thread handoff. A child class is
created that uses common punt test setup but is configured to have 2
worker threads.

Type: test
Signed-off-by: Brian Russell <brian@graphiant.com>
Change-Id: I34defee85bc5636f9355d0b9aaa007bfaf5e001e

3 years agotests: move ip4 punt setup to its own class 89/30889/2
Brian Russell [Tue, 19 Jan 2021 16:56:32 +0000 (16:56 +0000)]
tests: move ip4 punt setup to its own class

Move interface and packet setup for the ip4 punt test to its own
class so that child classes can be created that use it.

Type: test
Signed-off-by: Brian Russell <brian@graphiant.com>
Change-Id: I1a976e8fc0e8a44a86fe923a3ae093fe0c9057a8

3 years agoip: do policer thread handoff from punt policers 88/30888/2
Brian Russell [Thu, 21 Jan 2021 14:44:09 +0000 (14:44 +0000)]
ip: do policer thread handoff from punt policers

Pass packets arriving at the ip[46] punt policer nodes to punt policer
handoff nodes if the worker thread they arrive on is not the same one
configured in the policer. Initially, the policer will be tied to the
worker thread that it first received a packet on. This will be expanded
in future to be a configuration API option.

Type: improvement
Signed-off-by: Brian Russell <brian@graphiant.com>
Change-Id: Ic39d936084c354af1859ad3d946da6cd0f6e34d9

3 years agopolicer: add policer handoff 87/30887/2
Brian Russell [Tue, 19 Jan 2021 16:50:56 +0000 (16:50 +0000)]
policer: add policer handoff

Add thread handoff for packets being policed. Note that the handoff
currently requires the policer index to be passed in. This is suitable
for use in the ip[46] punt paths where each policer node will only
ever use a single policer. For the more general case, this will be
expanded in future to use a policer index stored in packet metadata.

Type: improvement
Signed-off-by: Brian Russell <brian@graphiant.com>
Change-Id: I85a0ecbcfb025f8844e763224cd3de1561249aca

3 years agoip: add frame queues to punt policer nodes 86/30886/2
Brian Russell [Tue, 19 Jan 2021 16:48:56 +0000 (16:48 +0000)]
ip: add frame queues to punt policer nodes

The policer is not thread safe. In order that handoff could be
performed, add a frame queue to each of the punt policer nodes.

Type: improvement
Signed-off-by: Brian Russell <brian@graphiant.com>
Change-Id: Iee50267ee7e36f0e6c95b9b43bf651648198b834

3 years agopolicer: add thread index to policer 85/30885/2
Brian Russell [Tue, 19 Jan 2021 16:46:08 +0000 (16:46 +0000)]
policer: add thread index to policer

Add a thread index field to the policer structure. The policer is not
thread safe. The thread index will be used to tie it to one worker
thread and other workers can use thread handoff.

Type: improvement
Signed-off-by: Brian Russell <brian@graphiant.com>
Change-Id: I650e983a9ed800bf660d6f06368717484c4a83bf

3 years agoip: Router ID included in flow hash 94/30894/2
Neale Ranns [Fri, 22 Jan 2021 16:12:38 +0000 (16:12 +0000)]
ip: Router ID included in flow hash

Type: feature

A device/router needs to have a unique ID which is included in the flow
has so that flows are not polarised through the network, i.e. each deice
in the network chooses the same nth link for the same flow.

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

3 years agocrypto-openssl: fix iv size for AES CTR 55/30955/3
Benoît Ganne [Wed, 27 Jan 2021 16:43:41 +0000 (17:43 +0100)]
crypto-openssl: fix iv size for AES CTR

Type: fix

Change-Id: I79258a95cfb75587685dffae671255063f57cbef
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agobuild: do not _FORTIFY_SOURCE in debug mode 84/30884/3
Mohammed Hawari [Fri, 22 Jan 2021 13:30:56 +0000 (14:30 +0100)]
build: do not _FORTIFY_SOURCE in debug mode

When compiling in -O0, the glibc feature.h ignores _FORTIFY_SOURCE and,
in some distributions, throws a #warning, which fails the build. This
patch removes -D_FORTIFY_SOURCE in all debug configurations.

Change-Id: Ic30229c038353e49ff9419779e082a7083c1ea5f
Type: fix
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
3 years agoChange unformat_init_string API in doc to match code 46/30846/2
hemant_mnkcg [Tue, 19 Jan 2021 19:20:04 +0000 (14:20 -0500)]
Change unformat_init_string API in doc to match code

Signed-off-by: hemant_mnkcg <hemant@mnkcg.com>
Change-Id: I4ec487054f928d52fe06d530df095b30edf66ae5

3 years agovhost: vhost interface hardware address not set 46/30946/2
Steven Luong [Wed, 27 Jan 2021 07:44:19 +0000 (23:44 -0800)]
vhost: vhost interface hardware address not set

The check args->hwaddr is always true and it always copies the
mac address from args->hwaddr even though none was set.

Check args->use_custom_mac instead.

Type: fix
Fixes: gerrit 29970

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I0c51bf1ea79b02c4fbdc3c52e694f186bdd96600

3 years agoikev2: add per SA stats 24/30924/2
Filip Tehlar [Mon, 25 Jan 2021 10:09:27 +0000 (10:09 +0000)]
ikev2: add per SA stats

Type: feature

Change-Id: Ic502d806410ea3c8f3f1eac70b694114ccb053bf
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agosession: clear ct fifo flag prior to notification 41/30941/3
Florin Coras [Tue, 26 Jan 2021 22:10:43 +0000 (14:10 -0800)]
session: clear ct fifo flag prior to notification

Type: fix

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

3 years agointerface: remove vnet_device_input_runtime_t 71/30671/8
Mohammed Hawari [Fri, 8 Jan 2021 16:19:09 +0000 (17:19 +0100)]
interface: remove vnet_device_input_runtime_t

Change-Id: I85a463b4ca15baf11e3eb70189f5190ba2585170
Type: refactor
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
3 years agomisc: fix snap image build 37/30937/3
Dave Barach [Tue, 26 Jan 2021 15:51:13 +0000 (10:51 -0500)]
misc: fix snap image build

Clean up snapcraft.yaml bit rot, switch to Ubuntu 20.04, add README.md

Type: improvement

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

3 years agosvm: add custom q implementation for mq 20/30920/6
Florin Coras [Fri, 22 Jan 2021 23:05:14 +0000 (15:05 -0800)]
svm: add custom q implementation for mq

Add separate queue implementation for the message queue as it's custom
tailored for fifo segments as opposed to binary api.

Also move eventfds to the private data structures.

Type: refactor

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

3 years agovlib: add show trace limit warning at the end of output too 59/29259/2
Benoît Ganne [Mon, 5 Oct 2020 12:55:00 +0000 (14:55 +0200)]
vlib: add show trace limit warning at the end of output too

Users tend to miss the warning too often, add it to the end of the
output in hope it would be easier to catch.

Type: improvement

Change-Id: I264df7e3b6ab1ffb1a383807f4444d9cbaf40999
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agocrypto-ipsecmb: more explicit errors reporting 18/30918/2
Benoît Ganne [Fri, 22 Jan 2021 17:43:14 +0000 (18:43 +0100)]
crypto-ipsecmb: more explicit errors reporting

Use error counters related to ipsec-mb return codes instead of
'bad-hmac' only.

Type: improvement

Change-Id: I9329da300a70d76b4d4ab30fa45f0a2a85d6519b
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agovlib: startup multi-arch variant configuration fix for interfaces 28/30228/3
Radu Nicolau [Wed, 2 Dec 2020 11:45:11 +0000 (11:45 +0000)]
vlib: startup multi-arch variant configuration fix for interfaces

Propagate the multi-arch variant selection to interfaces.

Type: fix

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Change-Id: I99c4a7896f172f0d14d2ded22a27383825529a7d

3 years agosvm: use standard function to reset stale mutex 62/30862/2
Benoît Ganne [Wed, 20 Jan 2021 18:10:59 +0000 (19:10 +0100)]
svm: use standard function to reset stale mutex

Avoid accessing the private data structure of mutexes which is
implementation-dependent, eg. musl is different from glibc.

Type: improvement

Change-Id: I20ec0c1c9faef0749d89a1969cd2430c80ac04b3
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agoquic: quicly v0.1.2 update 45/27845/24
Mathias Raoul [Tue, 19 Jan 2021 14:02:34 +0000 (14:02 +0000)]
quic: quicly v0.1.2 update

- update quic plugin with new quicly/picotls API
- remove packet allocator
- remove crypto batching
- update picotls plugin
- add cli for quicly congestion control configuration

Type: feature

Change-Id: If76ef31c43b430eea2f7674539b2112aee0f351e
Signed-off-by: Mathias Raoul <mathias.raoul@gmail.com>
3 years agotests: add generalized tags for tests, use them for run-solo tests 63/30763/12
Andrew Yourtchenko [Thu, 14 Jan 2021 10:19:08 +0000 (10:19 +0000)]
tests: add generalized tags for tests, use them for run-solo tests

We have accumulated several scenarios in prod or wishlists
where it would be useful to have a general infra to say yes/no
about a certain test, and potentially make decisions based on that,
for example:

- runs solo (aka 'time-dependent')
- (wishlist) part of quick smoke-test set
- (wishlist) intermittent failure unrelated to timing
- (wishlist) test broken with a multi-worker config in vpp

Refactor the current "run-solo" code to allow for this extension.

Type: test

Change-Id: Ia5b3810e57c0543753c8e0dc4dc0cfb4a30b36ac
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agodocs: vpp stateless traffic generator 61/30861/2
Dave Barach [Wed, 20 Jan 2021 17:20:13 +0000 (12:20 -0500)]
docs: vpp stateless traffic generator

Add a use-case writeup.

Type: docs

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

3 years agointerface: fix rx-placement api/cli for new infra 91/30391/12
Mohammed Hawari [Fri, 11 Dec 2020 18:36:37 +0000 (19:36 +0100)]
interface: fix rx-placement api/cli for new infra

Change-Id: Ic977ffe761efc2129c61aec581da5479fe4838da
Type: fix
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
3 years agointerface: let drivers control polling when down 27/30527/8
Mohammed Hawari [Mon, 21 Dec 2020 17:19:46 +0000 (18:19 +0100)]
interface: let drivers control polling when down

Change-Id: I03e164d8d5a329497f422e99f8b0058135241b4e
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: fix

3 years agodevices: adapt af_packet to new rxq framework 85/30485/12
Mohammed Hawari [Fri, 18 Dec 2020 15:29:45 +0000 (16:29 +0100)]
devices: adapt af_packet to new rxq framework

Change-Id: If8077280cef501599f810ad9255efa2a5a451ced
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: improvement

3 years agointerface: fix vnet_hw_if_update_runtime_data 30/30530/9
Mohammed Hawari [Tue, 22 Dec 2020 14:12:27 +0000 (15:12 +0100)]
interface: fix vnet_hw_if_update_runtime_data

Take into account pending interrupts when resizing rxq_interrupts

Type: fix
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Change-Id: I64f6f4404738c90ed5a2c10d72c7ce59cf96a644

3 years agosr: SRv6 FlowLabel Added 71/30871/2
Jakub Horn [Thu, 21 Jan 2021 12:14:58 +0000 (12:14 +0000)]
sr: SRv6 FlowLabel Added

Type: improvement

Signed-off-by: Jakub Horn <jhorn@cisco.com>
Change-Id: I06401a8645615d139893dca27d07bb3b3214bea7

3 years agodpdk: do not use TSO for small packets 88/30188/12
Somnath Kotur [Mon, 30 Nov 2020 02:54:45 +0000 (08:24 +0530)]
dpdk: do not use TSO for small packets

Asking for TSO (TCP Segmentation Offload) on packets that are already
smaller than (headers + MSS) does not make sense and may not work
on some HW.
Fix to only set the TSO flag when a segmentation offload is
really required, i.e when packet is large enough.

Type: improvement

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Change-Id: I7830ae8474581c8e518fb4910f7863e10346bb62
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
3 years agoavf: use write combining store for queues tail update 61/29861/8
Radu Nicolau [Thu, 14 Jan 2021 10:25:02 +0000 (10:25 +0000)]
avf: use write combining store for queues tail update

Performance improvement: on supported platforms, currently only Intel Tremont,
use a write combining store to update the tail pointers.
Also, Tremont node variant is added for all.

Type: improvement

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Change-Id: Ie9606e403b7d9655184f778e3ffee3027c8c9edd

3 years agolibmemif: buffer enqueue refactor 69/30669/6
Jakub Grajciar [Fri, 8 Jan 2021 14:01:13 +0000 (15:01 +0100)]
libmemif: buffer enqueue refactor

Refactored memif_buffer_enq_tx - dequeue buffers from any queue (rx/tx) and
enqueue them to any tx queue.

Added memif_buffer_requeue - swap descriptors of provided buffers.

Type: refactor

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I8482824df920aaaf8325d52a297ed57a815aaba6

3 years agodpdk: dpdk i40e patch cherry-pick 77/30677/3
Chenmin Sun [Mon, 11 Jan 2021 12:03:13 +0000 (20:03 +0800)]
dpdk: dpdk i40e patch cherry-pick

This patch fixes flex payload flow creation failure issue

Type: fix

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I3ac0a168dadd033a668d7bd6f5e78798aedb61a5

3 years agordma: adapt to new vnet rxq framework 29/30129/10
Mohammed Hawari [Wed, 25 Nov 2020 13:44:37 +0000 (14:44 +0100)]
rdma: adapt to new vnet rxq framework

Change-Id: Id539d36635f0ab9625dc2fc73630be39bead09af
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: improvement

3 years agoip: do not return uninitialized IPv6 ll attributes 12/30812/2
Benoît Ganne [Mon, 18 Jan 2021 18:37:55 +0000 (19:37 +0100)]
ip: do not return uninitialized IPv6 ll attributes

Type: fix

Change-Id: If35cf7da0c3d1b92532cc2e45c164d6b5a08592c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agomemif: adapt to new rxq framework 19/30419/14
Mohammed Hawari [Tue, 15 Dec 2020 08:48:45 +0000 (09:48 +0100)]
memif: adapt to new rxq framework

Change-Id: Ifa8bccd8a34ec1b14e772ee53757e9083373e3de
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: feature

3 years agoaf_xdp: update interrupt mode to new infra 21/30121/10
Benoît Ganne [Wed, 25 Nov 2020 09:41:26 +0000 (10:41 +0100)]
af_xdp: update interrupt mode to new infra

Type: improvement

Change-Id: Icb23af5f5e458a555f416cb0a829e84646b25dd9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agomarvell: adapt pp2 to new rxq framework. 54/30854/3
Mohammed Hawari [Wed, 20 Jan 2021 09:40:31 +0000 (10:40 +0100)]
marvell: adapt pp2 to new rxq framework.

Change-Id: I8759a07a24692b8b418ef8eb2025b61a62d2dda1
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
3 years agointerface: rx queue infra rework, part one 08/29808/30
Damjan Marion [Fri, 6 Nov 2020 22:25:57 +0000 (23:25 +0100)]
interface: rx queue infra rework, part one

Type: improvement
Change-Id: I4008cadfd5141f921afbdc09a3ebcd1dcf88eb29
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoperfmon: added cache hits and misses 66/30766/2
Ray Kinsella [Thu, 14 Jan 2021 13:18:59 +0000 (13:18 +0000)]
perfmon: added cache hits and misses

Added basic support for counting cache hits and misses per node.

Type: improvement

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

3 years agodpdk: terminate device devargs string 78/30778/2
Matthew Smith [Thu, 14 Jan 2021 22:51:57 +0000 (16:51 -0600)]
dpdk: terminate device devargs string

Type: fix

When a device is whitelisted with devargs arguments specified, the
string that is generated and added to conf->eal_init_args is not
explicitly terminated with 0. If the formatted string takes up all
of the memory allocated to the vector which stores it and it is
used later as a string in a format() or printf() call, any nonzero
characters stored in memory at the address immediately following the
memory allocated for the vector will be erroneously appended to the
string.

Terminate the string with 0 to ensure that this does not happen.

Change-Id: I20a78d994daad93bf5aecab5c03d705022e882ec
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agobuild: deprecate debian-9 support 35/30735/2
Dave Wallace [Wed, 13 Jan 2021 22:27:47 +0000 (17:27 -0500)]
build: deprecate debian-9 support

Type: make

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

3 years agodpdk: add support for system libdpdk 63/30863/2
Nathan Moos [Wed, 20 Jan 2021 19:34:11 +0000 (11:34 -0800)]
dpdk: add support for system libdpdk

Type: improvement

This patch enables dynamically linking the dpdk plugin against a
system-wide packaged version of dpdk.

Change-Id: I2276d125f39986b0e1788c7b52b94485cdbcd855
Signed-off-by: Nathan Moos <nmoos@cisco.com>
3 years agovppinfra: ensure _GNU_SOURCE is present 90/30790/8
Nathan Moos [Sat, 16 Jan 2021 00:45:14 +0000 (16:45 -0800)]
vppinfra: ensure _GNU_SOURCE is present

Type: fix

When building with musl, _GNU_SOURCE is required to be defined in more
places. This patch defines it in those required places. Additionally,
this patch changes the udphdr field names to the standard names.

Change-Id: I0fec54214ccc8458289176488afb4218761e9d51
Signed-off-by: Nathan Moos <nmoos@cisco.com>
3 years agoip: Use correct enum type in ip_address_set 60/30760/2
Neale Ranns [Thu, 14 Jan 2021 10:04:44 +0000 (10:04 +0000)]
ip: Use correct enum type in ip_address_set

Type: refactor

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

3 years agoip: use IPv6 flowlabel in flow hash computation 54/30054/11
Ahmed Abdelsalam [Fri, 20 Nov 2020 18:56:09 +0000 (18:56 +0000)]
ip: use IPv6 flowlabel in flow hash computation

extends ip6_compute_flow_hash() to include IPv6 flowlabel in flowhash computation

Type: improvement

Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Change-Id: Id1aaa20c9dac729c22b714eea1cdd6e9e4d1f75e

3 years agoipsec: Honour IPSec SA table-ID over API 15/30815/3
Neale Ranns [Tue, 19 Jan 2021 13:30:23 +0000 (13:30 +0000)]
ipsec: Honour IPSec SA table-ID over API

Type: fix

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

3 years agoipsec: Tunnelled packets are locally generated 36/30836/3
Neale Ranns [Tue, 19 Jan 2021 13:38:47 +0000 (13:38 +0000)]
ipsec: Tunnelled packets are locally generated

Type: fix

this means we 1) don't decrement TTL and (for v6) can fragment.

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

3 years agoip: set correct error in ip6-local 38/30838/2
Benoît Ganne [Tue, 19 Jan 2021 15:40:07 +0000 (16:40 +0100)]
ip: set correct error in ip6-local

Type: fix

Change-Id: Ib23f823e46494f80d9d857ddde88f4939bf2b3d1
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agovppinfra: add bihash with 32 byte key 60/30860/3
Matthew Smith [Wed, 20 Jan 2021 14:59:10 +0000 (08:59 -0600)]
vppinfra: add bihash with 32 byte key

Type: feature

Add header to define bihash_32_8.

Change-Id: Ia8a21a1e76cf0c05b8f8a2d1f5dbc0dc586d7801
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agofib: fix includes for musl 87/30787/8
Nathan Moos [Fri, 15 Jan 2021 22:47:24 +0000 (14:47 -0800)]
fib: fix includes for musl

Type: fix

When building with musl, the type `uint` is not available unless you
include <sys/types.h>.

Signed-off-by: Nathan Moos <nmoos@cisco.com>
Change-Id: I0003b0c373d9fd532b4135c43d78f36d6cd7afa4

3 years agotests: do not skip solo-run tests if running within a single job and all remaining... 58/30858/3
Andrew Yourtchenko [Wed, 20 Jan 2021 14:53:55 +0000 (14:53 +0000)]
tests: do not skip solo-run tests if running within a single job and all remaining tests are solo-run

There was a logic error, which results in not running solo tests
if TEST_JOBS=1, and we have finished running the regular test
and the remaining tests are all solo-run. They all get put into
that pile, but the new runners never start.

Solution: check the pile of solo-run jobs unconditionally.

Thanks to Klement Sekera for spotting the issue.

Type: fix
Change-Id: Iaecacbe4de44050cd8d0ff2d524559df99f2bae4
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agobuild: add python files to ctags 75/30675/2
Jerome Tollet [Sat, 9 Jan 2021 00:47:36 +0000 (01:47 +0100)]
build: add python files to ctags

Type: improvement

Signed-off-by: Jerome Tollet <jtollet@cisco.com>
Change-Id: Ifb97b3a52d8bf4ecc09dc1e8ff94992fef309a65