10327 Commits

Author SHA1 Message Date
Filip Tehlar
04208c6cfb docs: ikev2 usecases
Type: docs

Change-Id: Ib607b9426572585c1c7bfc4fcbbb1591ff5d9d42
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2021-03-16 14:57:31 +00:00
Neale Ranns
976b259be2 fib: Allow the creation of new source on the API
Type: feature

an client can dump the existing sources, examine their
priorities, then define thier own source.
Usefull if a client wants to distingusih between say, static,
ospf, bgp, etc routes it has added over the API.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: I5158b4fa1ebe87381ff8707bb173217f56ea274a
2021-03-16 12:12:23 +00:00
Klement Sekera
400ce717ac api: allow specifying no timeout
This functionality is used in make test when DEBUG=gdb is used.

Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I1339e6460aa624a3bcb4b03db46991590e126f92
2021-03-16 09:33:00 +00:00
Klement Sekera
3a5bd85476 nat: get rid of worker selection callbacks
Make code easier to read and debug.

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ib52a4cdd3bcdcc475053aa32af3964c00859e1cd
2021-03-15 22:07:43 +01:00
Mohammed Hawari
7db75dd0d3 ipsec: allow inbound non-tunnel SA through CLI
Change-Id: Ia304488900bd9236ab4e7cc6f17ae029ee6f2c00
Type: fix
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2021-03-15 17:53:41 +00:00
Andrew Yourtchenko
ab3151c52e nat: pnat copy and clear byte instructions
Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I8e48bdcc4c311717e067bb0a4e0b409a2eb8e83d
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Signed-off-by: Ole Troan <ot@cisco.com>
2021-03-15 17:53:05 +00:00
Brian Russell
73d9c9da6a tests: fix syntax warning in ipsec tun test
Testing for equality should be done via '==' rather
than 'is' which tests identity.

Type: fix
Signed-off-by: Brian Russell <brian@graphiant.com>
Change-Id: Iade53aea61d8aadcf6bffbfbef7fdac9a1004873
2021-03-15 17:45:52 +00:00
Dave Barach
1126c90e3a dns: fix crash when printing unlikely msg
%U format, arguments out of order, etc.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I829a3e5808923f096369ccf6af6386060ee8b62f
2021-03-15 17:44:12 +00:00
Filip Tehlar
af2cc6425e ikev2: support responder hostname
Type: feature
Ticket: VPP-1901

Change-Id: I1ad222b54363fd35679d0132d458345a9a18362c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2021-03-15 17:38:05 +00:00
Nathan Skrzypczak
418abe2a25 cnat: maglev fixes
This fixes cnat_feature node LB
- use siblings instead of direct next_nodes
- only do the lookup if we have NO_NAT
- fix behavior in v6

Type: fix

Change-Id: Ie80c9912946bf55c30eadeb51340f4aec9bb297e
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-03-15 17:36:23 +00:00
Dave Barach
592dbd0ad3 misc: finish removing deprecated cop API
Fix bug in crcchecker. It must be possible to remove a non-production
.api file

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I00b953e58017cc53051e6f4d8a70403dce8219a0
2021-03-15 17:34:40 +00:00
Mohammed Hawari
19ff0c3699 dpdk: implement interrupt mode
Change-Id: I6ababc99ecf559327a4370914580c98d32680175
Type: feature
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2021-03-15 17:31:10 +00:00
Ole Troan
4376ab2a92 tests: use socket transport instead of shared memory
Type: improvement
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I9e65c94a5a05047a5104e9361ea36eac77b40442
Signed-off-by: Ole Troan <ot@cisco.com>
2021-03-15 17:23:53 +00:00
Andrew Yourtchenko
387a08a8be libmemif: fix the include for ssize_t
Change-Id: I83830e64fb0fc302474837ebfa4f8cb133b1dccf
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-03-15 17:22:56 +00:00
Klement Sekera
350771de79 nat: remove unused parameter
Type: refactor
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ifb4a9c52fd2c5dd9f3f5cf41214aa1851f6d7acd
2021-03-15 16:36:35 +01:00
Klement Sekera
79a31db11d tests: fix NoneType printing if VPP died early
Make error message more meaningful.
Type: fix

Change-Id: I3c49cb179c3ee7a59657b3ae9a06311f57dc52ac
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-03-15 12:42:29 +00:00
Mohammed Hawari
45723b8d30 ip: extend punt CLI for exception packets
Change-Id: I20e48a5ac8068eccb8d998346d35227c4802bb68
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: feature
2021-03-14 14:37:01 +00:00
Dmitry Vakrhushev
4e3f7b2869 interface: fix extra locking on fib/mfib table
Unlocking previeous fib/mfib table before bind it to a new.

Currently if rebind interface table from one to another,
previous table's lock wouldn't decrease the locks count.

Type: fix

Change-Id: I09340baf1c7039aed3be15ee231eded7364b213e
Signed-off-by: Dmitry Vakrhushev <dmitry@netgate.com>
2021-03-12 13:47:40 +00:00
Klement Sekera
0ac8d857a5 nat: remove unused import
Type: style
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I66b7ed03f784f3992a910ad6a52ed89116a39297
2021-03-12 13:46:16 +00:00
Andrew Yourtchenko
085e8d4027 libmemif: add an include of sys/types.h header file
the ssize_t is defined there.

Change-Id: Ie46d196347ab91d0a92c15f331db14fe3b57061c
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-03-12 09:01:04 +00:00
Florin Coras
d5403ac610 hsa: add support for tls to proxy
Type: improvement

Change-Id: I934e1e981bfa3e5ef81a61b2180604f9b9fc991b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2021-03-11 20:15:25 +00:00
Florin Coras
1e6a0f6465 session tls: deq notifications for custom tx
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6ed2104e9d79c367ca36460047586f9b632c3315
2021-03-11 19:30:48 +00:00
Damjan Marion
143610014a misc: fix gcc-11 build
Type: fix
Change-Id: Ia17c8255806a2575bb75ed37050b47ddb347050c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-11 19:00:20 +00:00
Damjan Marion
a31698bb74 vlib: refactor node function variants
It allows default variant selection from startup.conf

Type: improvement
Change-Id: Idff95e12dd0c105dab7c905089548b05a6e974e0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-11 17:30:34 +00:00
Dave Barach
aa479bb91d misc: remove cop API support (part 1)
API marked for deprecation last year due to non-inclusive language.
Last supported release: 21.01. See the "adl" plugin.

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I931e58ced9cc8403ca5b23fd6b07e50d0ff7306b
2021-03-11 17:10:54 +00:00
Florin Coras
8694fbc882 session: check if fifo exists in cl bound notification
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I316575a4b199916920cad6be8f9b49025d6ccc2d
2021-03-10 19:10:28 +00:00
Damjan Marion
f91098e49c interface: fix interface-output and interface-tx multiarch selection
Type: fix
Change-Id: I77723dcbf753c2a7f1ec00f034d8ab604f12214b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-10 10:45:00 +01:00
Andrew Yourtchenko
4e4864112a tests: re-enable the rest of NAT44ED tests for multiworker
Type: test
Change-Id: I37a12e3580c3631582f366944fe30f325b46f366
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-03-09 18:43:11 +01:00
Klement Sekera
d2b6997573 nat: fix dst nat thread issues
Make sure packet lands on the right thread for dst nat case.

Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I0ec4e4c2bb3fa80ff73fac588c36d36420ba68fa
2021-03-09 17:54:22 +01:00
Damjan Marion
31f0526852 vlib: remove unused function
Not used for a looong time....

Type: refactor
Change-Id: I4b1d6216dbd349dd02c1d7c884f89ece66cd6045
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-09 15:21:32 +01:00
Ole Troan
d01caf7fa2 pnat: coverity fixes
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ia1cfdbd39ed458cb3fffd29a8b6d6eff64644de8
2021-03-09 10:11:57 +00:00
Nathan Skrzypczak
b0c2ec5e7c cnat: Coverity fix
Type: fix

Change-Id: I004a49e59d8643599fc99ad6fa5848d3cf289b7a
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-03-08 15:26:29 +00:00
Florin Coras
7a588fc781 tcp: account for option alignment in initial snd_mss
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I24225ada6623c5b5543341ecac0d6c1db43cc8a9
2021-03-08 15:26:28 +00:00
Klement Sekera
e3416e307e nat: replace main vlib with per-thread vlib
Fix incorrect vlib main usage.

Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ic5304ca844f1b27756818eb6995b1d9c08412674
2021-03-07 23:39:25 +00:00
Klement Sekera
76401c5767 nat: fix worker selection
Use correct ports from SVR. Perform lookup of existing session for all
cases to pick any created bypasses and derive correct thread indexes.

Type: fix
Change-Id: I1e3814c9e13cd4d9b8d65f514f7e9ab42df3c22e
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-03-07 17:57:32 +00:00
Klement Sekera
e79bbe918b nat: test - add show trace
Add missing show trace.

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I2f216bfc1bc70ebcbf5593214d46601f44f0b6e2
2021-03-07 17:56:51 +00:00
Damjan Marion
25ab6c5410 dispatch-trace: move dispatch trace pcap code to plugin
Type: refactor
Change-Id: I02a527f57853ebff797f0d85761b71127916d6ce
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-07 15:58:54 +01:00
Klement Sekera
46353f0693 nat: use correct node indexes for queues
Type: fix
Change-Id: I30b847acc4653fea9d609fc0d5875c3fda0824ef
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-03-06 17:29:25 +00:00
Andrew Yourtchenko
ef9c23503c vppapigen: expose the values of per-message "options" in the api.json files
Also fix the vapi parser's assumption about what
the container with CRC is supposed to look like..

Change-Id: I3a23ef6c1502232742c03d227eb3654fb757709c
Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-03-05 21:12:56 +00:00
Damjan Marion
9cc765559c avf: don't memcpy if adminq output buffer size is 0
Type: fix
Change-Id: I0df14ff87d0bf51eeb392f72434febf6c4a2957a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-05 14:27:58 +00:00
Neale Ranns
d89de31489 fib: format function for adjacency flags
Type: improvement

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ib01ed3231321f0f38c4b1deb885c4cf718cc0147
2021-03-05 12:23:54 +00:00
Damjan Marion
8fb5add318 interface: move vnet_pcap_t to vnet
It naturally belogns there...

Type: refactor
Change-Id: I05f7ba01103a5e9b3756f1ea69c8cc5d8f26f0a0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-05 11:59:24 +00:00
Andrew Yourtchenko
3efd4e9998 tests: improve the robustness of process cleanup on INT/TERM signals
Change-Id: I3049d3d7d1212236dcc63ebf5560f87561928520
Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-03-05 10:57:26 +00:00
Neale Ranns
bf55e9931c mss_clamp: TCP MSS clamping plugin
Type: feature

Configure TCP MSS clamping on an interface as follows:
set interface tcp-mss-clamp [rx|tx] <interface-name>
  ip4 [enable|disable|rx|tx] ip4-mss <size>
  ip6 [enable|disable|rx|tx] ip6-mss <size>

Change-Id: I45b04e50a0b70a33e14a9066f981c651292ebffb
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Signed-off-by: Miklos Tirpak <miklos.tirpak@gmail.com>
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2021-03-05 10:55:26 +00:00
Ole Troan
ab9f57355f api: crchcecker ignore version < 1.0.0 and outside of src directory
- For check patchset ignore files outside of src directory
- For check patchset ignore files that have version < 1.0.0
- fix Pylint warnings
- Modify vppapigen_crc to include version in JSON output

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I171cf6397e129e2438b2a494c5656236a7810f7b
2021-03-05 10:52:51 +00:00
Steven Luong
d936017448 l2: coverity woe in l2_rw_mod_entry
Coverity complains that the statement
 if (!e)
   return -1;
is never true and is logically dead code in the subject function. It is
right. e is assigned in both the if and else statementes immediately above
and can never be null.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ic2d0e76eff696ee689a68a07913876dcecf5c647
2021-03-05 10:50:48 +00:00
Vladimir Ratnikov
60c397711a dpdk: fix rte mempool for rx_queues
Change dpdk_ops_vpp_get_count() return value from 0
 to actual available pool size;
For some drivers/envs(azure,vmbus) rx_queue size
 will be zero and the only 1 element will be created
(0 + 1)
When more than one packet will arrive, it will cause
SEGFAULT

Type: fix
Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
Change-Id: Ibe7da6acc91200bec33d99f580044456d8984110
2021-03-05 10:50:24 +00:00
Neale Ranns
f16e9a5507 ipsec: Support async mode per-SA
Type: feature

This feautre only applies to ESP not AH SAs.
As well as the gobal switch for ayncs mode, allow individual SAs to be
async.
If global async is on, all SAs are async. If global async mode is off,
then if then an SA can be individually set to async. This preserves the
global switch behaviour.

the stratergy in the esp encrypt.decrypt nodes is to separate the frame
into, 1) sync buffers, 2) async buffers and 3) no-op buffers.
Sync buffer will undergo a cyrpto/ath operation, no-op will not, they
are dropped or handed-off.

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ifc15b10b870b19413ad030ce7f92ed56275d6791
2021-03-05 10:34:55 +00:00
Neale Ranns
fc81134a26 ipsec: Submit fuller async frames
Type: improvement

In the current scheme an async frame is submitted each time the crypto
op changes. thus happens each time a different SA is used and thus
potentially many times per-node. thi can lead to the submision of many
partially filled frames.

change the scheme to construct as many full frames as possible in the
node and submit them all at the end. the frame owner ship is passed to
the user so that there can be more than one open frame per-op at any
given time.

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ic2305581d7b5aa26133f52115e0cd28ba956ed55
2021-03-05 10:34:55 +00:00
Robert Shearman
3a9bd7608f marvell: check return value of vlib_trace_buffer
Check the value of vlib_trace_buffer in mrvl_pp2_input_trace to fix a
compiler error for an unused result of the function.

Type: fix
Fixes: 9a3973e3a36bfd4dd8dbffe130a92649fc1b73d3
Signed-off-by: Robert Shearman <robertshearman@gmail.com>
Change-Id: Ib005ae662885ed8ef902607037b843a524789a19
2021-03-05 10:18:32 +00:00