vpp.git
3 years agoavf: add avf flow framework 01/30001/18
Chenmin Sun [Thu, 19 Nov 2020 15:13:30 +0000 (23:13 +0800)]
avf: add avf flow framework

This patch adds the flow support to VPP avf_plugin.
Currently only IP4-N-TUPLE and GTPU flow are supported as
a reference. More flows will be added later.

Type: feature

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

3 years agosvm: add producer wait function 74/31774/6
Florin Coras [Thu, 25 Mar 2021 18:24:33 +0000 (11:24 -0700)]
svm: add producer wait function

Type: refactor

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

3 years agoacl: fix the integer overflow bug in API message length validation logic 66/31766/3
Andrew Yourtchenko [Thu, 25 Mar 2021 14:13:47 +0000 (14:13 +0000)]
acl: fix the integer overflow bug in API message length validation logic

Sending the bogus acl_add_replace message with count=~0 will result in
an overflow of "expected_len" field which is a u32, thus the message
will pass the validation when it should not.

Solution - make the expected_len a u64 to avoid overflow.

The bug was found while experimenting with libfuzzer as part of
https://gerrit.fd.io/r/c/vpp/+/31763

Type: fix
Change-Id: I4a866d48f2418148236f1b1d77c487b869c7c43d
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agosvm: fix producer deadlock in svm_msg_q_wait() 59/31759/5
nandfan [Thu, 25 Mar 2021 06:24:53 +0000 (14:24 +0800)]
svm: fix producer deadlock in svm_msg_q_wait()

1. When producer invokes svm_msg_q_wait() in svm_msg_q_lock_and_alloc_msg_w_ring(), queue mutex is held by itself.
2. Sometimes, svm msg queue is not full and ring is full, svm_msg_q_wait() do nothing with mutex held, consumer will blocking at svm_msg_q_send_signal().

Type: fix

Signed-off-by: nandfan <fanyufei521@outlook.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib90b87ab76534cd42e9a4c3e11703e80d93ca678

3 years agonat: allocate enough space for full port usage 51/31751/4
Klement Sekera [Wed, 24 Mar 2021 16:28:13 +0000 (17:28 +0100)]
nat: allocate enough space for full port usage

Type: fix
Change-Id: I068bfeaf22b9e6cce967c27acdd46d4b8541bdf8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agordma: fix buggy cqe parsing (truncated packets) 72/31772/2
Mohammed Hawari [Thu, 25 Mar 2021 16:35:10 +0000 (17:35 +0100)]
rdma: fix buggy cqe parsing (truncated packets)

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

3 years agonat: fix bihash kvp print 50/31750/3
Klement Sekera [Wed, 24 Mar 2021 16:26:57 +0000 (17:26 +0100)]
nat: fix bihash kvp print

Type: fix
Change-Id: I392d348b1a38affac8761b0614b117cd991958d7
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agoavf: introduce program flow event 00/30000/11
Chenmin Sun [Thu, 19 Nov 2020 14:58:08 +0000 (22:58 +0800)]
avf: introduce program flow event

This patch introduces a 'program flow' virtchannel event.
The parameter is_add is used to identify adding or deleting the rule from avf

Type: improvement

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

3 years agotests: move vppinfra tests to src/vppinfra/test 56/31756/2
Dave Wallace [Wed, 24 Mar 2021 22:03:01 +0000 (18:03 -0400)]
tests: move vppinfra tests to src/vppinfra/test

- Refactor make test code to be co-located with
  the vpp feature source code

Type: test

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

3 years agonat: prevent usage of ED nodes in EI code 48/31748/2
Klement Sekera [Wed, 24 Mar 2021 16:20:40 +0000 (17:20 +0100)]
nat: prevent usage of ED nodes in EI code

Type: fix
Change-Id: I84d511c30eb5878a1867f5e9d2207a39d4f0926c
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agonat: fix vnet_feature_next in source hairpinning 47/31747/2
Klement Sekera [Wed, 24 Mar 2021 15:46:22 +0000 (16:46 +0100)]
nat: fix vnet_feature_next in source hairpinning

Avoid erroneous double vnet_feature_next if routing buffer manually.

Type: fix
Change-Id: I3f56c12bf57f59a1e5ddad63a2565fa195934cf6
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agotests: introduce test-checkstyle-diff 57/31757/2
Klement Sekera [Wed, 24 Mar 2021 22:24:52 +0000 (23:24 +0100)]
tests: introduce test-checkstyle-diff

Make test-checkstyle-diff is a new target which checks PEP8 compliance
only for changed files. This makes it faster to execute and also more
readable as most of the time, only changed files will fail.

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

3 years agostats: python vpp_stats rewrite to access stat segment directly 78/31678/12
Ole Troan [Thu, 18 Mar 2021 10:12:01 +0000 (11:12 +0100)]
stats: python vpp_stats rewrite to access stat segment directly

This module implement Python access to the VPP statistics segment. It
accesses the data structures directly in shared memory.
VPP uses optimistic locking, so data structures may change underneath
us while we are reading. Data is copied out and it's important to
spend as little time as possible "holding the lock".

Counters are stored in VPP as a two dimensional array.
Index by thread and index (typically sw_if_index).
Simple counters count only packets, Combined counters count packets
and octets.

Counters can be accessed in either dimension.
stat['/if/rx'] - returns 2D lists
stat['/if/rx'][0] - returns counters for all interfaces for thread 0
stat['/if/rx'][0][1] - returns counter for interface 1 on thread 0
stat['/if/rx'][0][1]['packets'] - returns the packet counter
                                  for interface 1 on thread 0
stat['/if/rx'][:, 1] - returns the counters for interface 1 on all threads
stat['/if/rx'][:, 1].packets() - returns the packet counters for
                                 interface 1 on all threads
stat['/if/rx'][:, 1].sum_packets() - returns the sum of packet counters for
                                     interface 1 on all threads
stat['/if/rx-miss'][:, 1].sum() - returns the sum of packet counters for
                                  interface 1 on all threads for simple counters

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I1fe7f7c7d11378d06be8276db5e1900ecdb8f515
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agotests: add vpp test dirs to PYTHONPATH 65/31665/6
Dave Wallace [Wed, 17 Mar 2021 02:12:07 +0000 (22:12 -0400)]
tests: add vpp test dirs to PYTHONPATH

- Required to relocate test infra modules
  to be co-located in feature test directory.
- Remove/regenerate build-root/build-test/src/
  soft links when running make test to allow
  re-running 'make test' after moving source files.
- Suppress annoying 'ls' error message when gathering
  test source files caused by 'c' test application
  directory being named 'test'.
- Use PYTHONPYCACHEPREFIX to generate all
  compiled source under build-root/build-test.
  This only works for python 3.8 or greater, but
  existing 'make test-wipe' target cleans up
  in-situ __pycache__ directories for older
  python versions.

Type: fix

Change-Id: If3c3ff0c58fb26a17395babc34783e06b1dd84e7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
3 years agotls: fix cleanup on app close with data 41/31741/2
Florin Coras [Wed, 24 Mar 2021 07:02:49 +0000 (00:02 -0700)]
tls: fix cleanup on app close with data

Type: fix

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

3 years agointerface: do subif or feature arc work in interface-output only if needed 42/31742/2
Damjan Marion [Wed, 24 Mar 2021 10:45:51 +0000 (11:45 +0100)]
interface: do subif or feature arc work in interface-output only if needed

Type: improvement
Change-Id: If3b44682e5bbf68b83adc12fb6c71899aecf8a98
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovirtio: improve compilation time 43/31743/3
Damjan Marion [Wed, 24 Mar 2021 11:24:58 +0000 (12:24 +0100)]
virtio: improve compilation time

Type: improvement
Change-Id: I56dadb852f63da0597ddf4db395a22afdf2d9cc0
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agomisc: fuse fs for the stats segment 91/31491/15
Arthur de Kerhor [Wed, 3 Mar 2021 16:49:15 +0000 (08:49 -0800)]
misc: fuse fs for the stats segment

This extra allows to mount a FUSE filesystem reflecting
the state of the stats segment.

Type: feature

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

3 years agointerface: simplify and optimize interface-output node 37/31737/3
Damjan Marion [Tue, 23 Mar 2021 20:05:18 +0000 (21:05 +0100)]
interface: simplify and optimize interface-output node

Type: improvement
Change-Id: I58a7d75da2db0ec84c7c1f08fd1ca7a72946f14d
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agomisc: allow explicitelly setting CLANG_FORMAT_VER 38/31738/1
Damjan Marion [Tue, 23 Mar 2021 20:34:08 +0000 (21:34 +0100)]
misc: allow explicitelly setting CLANG_FORMAT_VER

Type: improvement
Change-Id: I356b1b1804a2b09b25f5a285ada12db6879e2f6a
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovlib: add node adaptive mode flag 96/31696/9
Florin Coras [Fri, 19 Mar 2021 20:12:41 +0000 (13:12 -0700)]
vlib: add node adaptive mode flag

Don't switch nodes from interrupt to polling state unless adaptive mode
flag set. For starters, flag set only on interface input nodes
with no polling rx queue and at least one in adaptive mode.

Type: improvement

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

3 years agointerface: reduce duplicate code in the interface-output node 14/31714/1
Damjan Marion [Tue, 23 Mar 2021 17:47:34 +0000 (18:47 +0100)]
interface: reduce duplicate code in the interface-output node

Type: improvement
Change-Id: I46459a0c0a79677092aa9f8c92b67c0d06f7242e
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agotls: fix tlsopenssl for remaining buffer 01/31701/1
Sivaprasad Tummala [Mon, 22 Mar 2021 15:51:56 +0000 (21:21 +0530)]
tls: fix tlsopenssl for remaining buffer

Type: fix

1. added additional checks for pending data in
   openssl_ctx_read_tls().
2. fixed read/write typo issues.

Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com>
Change-Id: Id018c62bb9e02bf0d5f9abf929b6030b965a5d61

3 years agovcl: fix libc epoll pwait starved 80/31680/3
wanghanlin [Thu, 18 Mar 2021 12:00:41 +0000 (20:00 +0800)]
vcl: fix libc epoll pwait starved

We call vls_epoll_wait with 0 timeout to process unhandled_evts_vector
in ldp_epoll_pwait_eventfd. But vls_epoll_wait will then call
vppcom_epoll_wait_eventfd to process events in event queue. If there are
continuous events to be handled, then libc_epoll_pwait have no chance to be called.

Type: fix

Signed-off-by: wanghanlin <wanghanlin@corp.netease.com>
Change-Id: Ia4f61d0d438a3475bfde9f6715805274671d4e75

3 years agovlib: graphviz upgrade to allow filters 40/31340/9
Arthur de Kerhor [Thu, 18 Feb 2021 11:09:42 +0000 (03:09 -0800)]
vlib: graphviz upgrade to allow filters

Possibility to draw only the active nodes on the graph.
These are scaled and colored according to their utilization.

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

3 years agogre: Multipoint GRE fixes 43/31643/2
Neale Ranns [Mon, 15 Mar 2021 14:42:30 +0000 (14:42 +0000)]
gre: Multipoint GRE fixes

Type: fix

- the CLI was broken when a nh-table-id was present, since it overwrote
the next-hop address
- bouncing interface state stacked the adjacencies on the tunnel's
destination (which is all zeros)
- don't crash in the switch path if the interface has no hw-address

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

3 years agotests: add support for worker awareness 49/31649/13
Klement Sekera [Mon, 15 Mar 2021 15:58:10 +0000 (16:58 +0100)]
tests: add support for worker awareness

VppTestCase now has vpp_worker_count property set to number of workers.
This can be overriden by child classes. Also overriden by
VPP_WORKER_CONFIG variable for legacy reasons.

Type: improvement
Change-Id: Ic328bacb9003ddf9e92815767653bd362aa7f086
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agovxlan: add tunnel cache to graph node 27/31027/13
Junfeng Wang [Tue, 9 Mar 2021 08:44:57 +0000 (16:44 +0800)]
vxlan: add tunnel cache to graph node

Type: improvement

Signed-off-by: Drenfong Wong <drenfong.wang@intel.com>
Change-Id: Ia81aaa86fe071cbbed028cc85c5f3fa0f1940a0f

3 years agoapi: Avoid the usage of the freed registration by the API calls 22/31622/4
Andrew Yourtchenko [Thu, 11 Mar 2021 12:54:11 +0000 (12:54 +0000)]
api: Avoid the usage of the freed registration by the API calls

This issue happens if:
- the API client connects via Unix socket
- the client issues the *_dump API call and immediately disconnects

What happens after is that the API handler keeps sending the *_details
messages, however at some point the write fails, and the socket is
deleted.

The attempt of a use of the registration pointer results in interpreting
the socket as a shared memory socket. This results in a crash, because
the data in this structure then does not make sense, like the below:

|
|Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault.
|__GI___pthread_mutex_lock (mutex=0x0) at ../nptl/pthread_mutex_lock.c:67
|67      ../nptl/pthread_mutex_lock.c: No such file or directory.
|(gdb) bt
|#0  __GI___pthread_mutex_lock (mutex=0x0) at ../nptl/pthread_mutex_lock.c:67
|#1  0x00007ffff500f957 in svm_queue_lock (q=0x0) at /home/ubuntu/vpp/src/svm/queue.c:101
|#2  svm_queue_add (q=0x0, elem=0x7fffa76c2de0 "\210\365\006\060\001", nowait=0) at /home/ubuntu/vpp/src/svm/queue.c:274
|#3  0x00007ffff6e131e3 in vl_api_send_msg (rp=<optimized out>, elem=<optimized out>) at /home/ubuntu/vpp/src/vlibmemory/api.h:43
|#4  send_sw_interface_details (am=<optimized out>, rp=<optimized out>, swif=0x7fffb957a0bc, interface_name=<optimized out>, context=<optimized out>)
|    at /home/ubuntu/vpp/src/vnet/interface_api.c:353
|#5  0x00007ffff6e0edeb in vl_api_sw_interface_dump_t_handler (mp=<optimized out>) at /home/ubuntu/vpp/src/vnet/interface_api.c:412
|#6  0x00007ffff7daeb48 in msg_handler_internal (am=<optimized out>, the_msg=0x7fffb839a5e0, trace_it=<optimized out>, do_it=1, free_it=0)
|    at /home/ubuntu/vpp/src/vlibapi/api_shared.c:501
|#7  vl_msg_api_socket_handler (the_msg=0x7fffb839a5e0) at /home/ubuntu/vpp/src/vlibapi/api_shared.c:790
|#8  0x00007ffff7d7c608 in vl_socket_process_api_msg (rp=<optimized out>, input_v=0x7fffa76c2de0 "\210\365\006\060\001") at /home/ubuntu/vpp/src/vlibmemory/socket_api.c:212
|#9  0x00007ffff7d89ff1 in vl_api_clnt_process (vm=<optimized out>, node=<optimized out>, f=<optimized out>) at /home/ubuntu/vpp/src/vlibmemory/vlib_api.c:405
|#10 0x00007ffff53bf9a7 in vlib_process_bootstrap (_a=<optimized out>) at /home/ubuntu/vpp/src/vlib/main.c:1490
|#11 0x00007ffff4da0b2c in clib_calljmp () from /home/ayourtch/vpp/build-root/install-vpp-native/vpp/lib/libvppinfra.so.21.06
|#12 0x00007fffa99a4d90 in ?? ()
|#13 0x00007ffff53b6cb2 in vlib_process_startup (vm=0x7ffff56a9880 <vlib_global_main>, p=0x7fffb5d41380, f=0x0) at /home/ubuntu/vpp/src/vlib/main.c:1515
|#14 dispatch_process (vm=0x7ffff56a9880 <vlib_global_main>, p=0x7fffb5d41380, f=0x0, last_time_stamp=<optimized out>) at /home/ubuntu/vpp/src/vlib/main.c:1571
|#15 0x0000000000000000 in ?? ()
|(gdb) frame 3
|#3  0x00007ffff6e131e3 in vl_api_send_msg (rp=<optimized out>, elem=<optimized out>) at /home/ubuntu/vpp/src/vlibmemory/api.h:43
|43            vl_msg_api_send_shmem (rp->vl_input_queue, (u8 *) & elem);
|(gdb) l
|38          {
|39            vl_socket_api_send (rp, elem);
|40          }
|41        else
|42          {
|43            vl_msg_api_send_shmem (rp->vl_input_queue, (u8 *) & elem);
|44          }
|45      }
|46
|47      always_inline int
|(gdb)
|

The approach in this change is to avoid the closing operations "here and
now", but instead mark the the registration as a zombie and place
a forced RPC towards a callback that does the actual cleanup work.

Forced RPC is handled via the API processing loop with barrier sync,
so we are guaranteed not to have any API processing in-process.

Type: fix
Change-Id: I1972d42da620bdb4fd773c83262863c2781d9005
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agopolicer: Add CLI for all equivalent API functions 89/31689/2
Neale Ranns [Fri, 19 Mar 2021 08:54:38 +0000 (08:54 +0000)]
policer: Add CLI for all equivalent API functions

Type: improvement

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

3 years agointerface: add capabilities flags 40/29640/12
Mohsin Kazmi [Wed, 10 Feb 2021 11:03:53 +0000 (12:03 +0100)]
interface: add capabilities flags

Type: improvement

This patch adds flags to represent the modern NICs capabilities.

Change-Id: I96d38d9ab7eac55974d72795cd100d8337168e1e
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agodpdk: don't mask interrupts for some drivers 79/31679/3
Mohammed Hawari [Thu, 18 Mar 2021 11:02:08 +0000 (12:02 +0100)]
dpdk: don't mask interrupts for some drivers

It is well known that for some NICs, masking
interrupts results in delaying desc writebacks,
which breaks poll mode. This fix introduces an
"int-unmaskable" dpdk device flag to identify such
devices (typically Intel FVL). For such devices,
interrupts are masked by a call to
file_update(...,UNIX_FILE_UPDATE_DELETE) instead
of rte_eth_dev_rx_intr_disable (...)

Change-Id: Ifbc701aebe8572319b7aae19382bd683a47fc3cf
Type: fix
Fixes: 19ff0c3699342b512c03362b3815df684a661f49
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
3 years agotests: remove shm files created by vpp on reset 83/31683/2
Klement Sekera [Thu, 18 Mar 2021 14:22:57 +0000 (15:22 +0100)]
tests: remove shm files created by vpp on reset

Even though we don't use shm transport anymore, vpp still populates shm.
Add cleanup before running tests to avoid the nuisance of running out of
space on /dev/shm.

Type: fix
Fixes: eb506becd038f081bc7ac340412d3685425bb8b4
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I2ef87e991223ee60892d56af1482025d91e77d46

3 years agosession: fix populating chained buffers 47/31647/4
Ivan Shvedunov [Mon, 15 Mar 2021 16:05:14 +0000 (19:05 +0300)]
session: fix populating chained buffers

Type: fix

Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Change-Id: I3fdc1711d508bc5b0c2f56b3bd3fb4a56056eb54

3 years agotests: remove shm handling 60/31660/6
Klement Sekera [Tue, 16 Mar 2021 11:52:29 +0000 (12:52 +0100)]
tests: remove shm handling

Not used anymore with socket transport.

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

3 years agodpdk: cryptodev session management 27/31427/5
pibr [Mon, 22 Feb 2021 22:19:06 +0000 (22:19 +0000)]
dpdk: cryptodev session management

Ensure that dpdk_cryptodev engine async handlers are registered for the set of algorithms supported by all cryptodevices in the system.

Type: improvement

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I8293d87c6f07e935a1a0637704f24918cd3e132a

3 years agoperfmon: fixes for cache hierarchy 79/30879/9
Ray Kinsella [Thu, 21 Jan 2021 18:39:26 +0000 (18:39 +0000)]
perfmon: fixes for cache hierarchy

Account for occasional instances with the misses rates between caches
are inconsistent.

Type: fix

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

3 years agoperfmon: add support for raw and timestamps 76/30876/8
Ray Kinsella [Thu, 21 Jan 2021 18:18:45 +0000 (18:18 +0000)]
perfmon: add support for raw and timestamps

Add perfmon plugin support to output raw counter and timestamps, both
are useful for debug.

Type: improvement

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

3 years agomisc: fix checkstyle on fedora 33/31633/8
Ray Kinsella [Fri, 12 Mar 2021 15:57:29 +0000 (15:57 +0000)]
misc: fix checkstyle on fedora

The fedora clang-format command helpfully does not include the version
suffix, and places clang-format-diff in /usr/share/clang.

Have summited #1939018 in Fedora, to fix upstream.
https://bugzilla.redhat.com/show_bug.cgi?id=1939018

Until then ...

Type: fix

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

3 years agodocs: ikev2 usecases 14/31414/2
Filip Tehlar [Wed, 17 Feb 2021 17:53:27 +0000 (17:53 +0000)]
docs: ikev2 usecases

Type: docs

Change-Id: Ib607b9426572585c1c7bfc4fcbbb1591ff5d9d42
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agofib: Allow the creation of new source on the API 08/23808/8
Neale Ranns [Wed, 4 Dec 2019 06:11:00 +0000 (06:11 +0000)]
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

3 years agoapi: allow specifying no timeout 53/31653/2
Klement Sekera [Mon, 15 Mar 2021 20:30:15 +0000 (21:30 +0100)]
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

3 years agonat: get rid of worker selection callbacks 54/31654/1
Klement Sekera [Mon, 15 Mar 2021 18:52:57 +0000 (19:52 +0100)]
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

3 years agoipsec: allow inbound non-tunnel SA through CLI 06/31206/4
Mohammed Hawari [Wed, 10 Feb 2021 08:38:05 +0000 (09:38 +0100)]
ipsec: allow inbound non-tunnel SA through CLI

Change-Id: Ia304488900bd9236ab4e7cc6f17ae029ee6f2c00
Type: fix
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
3 years agonat: pnat copy and clear byte instructions 55/31255/11
Andrew Yourtchenko [Tue, 23 Feb 2021 08:56:27 +0000 (08:56 +0000)]
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>
3 years agotests: fix syntax warning in ipsec tun test 33/31533/2
Brian Russell [Thu, 4 Mar 2021 17:13:11 +0000 (17:13 +0000)]
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

3 years agodns: fix crash when printing unlikely msg 44/31644/2
Dave Barach [Mon, 15 Mar 2021 15:10:27 +0000 (11:10 -0400)]
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

3 years agoikev2: support responder hostname 25/31525/2
Filip Tehlar [Mon, 22 Feb 2021 16:15:51 +0000 (16:15 +0000)]
ikev2: support responder hostname

Type: feature
Ticket: VPP-1901

Change-Id: I1ad222b54363fd35679d0132d458345a9a18362c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agocnat: maglev fixes 51/31551/2
Nathan Skrzypczak [Fri, 5 Mar 2021 16:16:40 +0000 (17:16 +0100)]
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>
3 years agomisc: finish removing deprecated cop API 26/31626/4
Dave Barach [Thu, 11 Mar 2021 20:12:29 +0000 (15:12 -0500)]
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

3 years agodpdk: implement interrupt mode 49/31249/7
Mohammed Hawari [Wed, 10 Feb 2021 08:20:51 +0000 (09:20 +0100)]
dpdk: implement interrupt mode

Change-Id: I6ababc99ecf559327a4370914580c98d32680175
Type: feature
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
3 years agotests: use socket transport instead of shared memory 85/31485/10
Ole Troan [Wed, 3 Mar 2021 09:40:05 +0000 (10:40 +0100)]
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>
3 years agolibmemif: fix the include for ssize_t 21/31621/2
Andrew Yourtchenko [Thu, 11 Mar 2021 12:33:59 +0000 (12:33 +0000)]
libmemif: fix the include for ssize_t

Change-Id: I83830e64fb0fc302474837ebfa4f8cb133b1dccf
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agonat: remove unused parameter 45/31645/1
Klement Sekera [Mon, 15 Mar 2021 14:46:09 +0000 (15:46 +0100)]
nat: remove unused parameter

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

3 years agotests: fix NoneType printing if VPP died early 35/31635/3
Klement Sekera [Fri, 12 Mar 2021 17:16:10 +0000 (18:16 +0100)]
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>
3 years agoip: extend punt CLI for exception packets 30/31130/7
Mohammed Hawari [Fri, 5 Feb 2021 14:40:00 +0000 (15:40 +0100)]
ip: extend punt CLI for exception packets

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

3 years agointerface: fix extra locking on fib/mfib table 42/31242/12
Dmitry Vakrhushev [Thu, 11 Feb 2021 21:42:40 +0000 (00:42 +0300)]
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>
3 years agonat: remove unused import 06/31606/2
Klement Sekera [Wed, 10 Mar 2021 09:45:44 +0000 (10:45 +0100)]
nat: remove unused import

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

3 years agolibmemif: add an include of sys/types.h header file 01/31601/2
Andrew Yourtchenko [Tue, 9 Mar 2021 19:02:06 +0000 (19:02 +0000)]
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>
3 years agohsa: add support for tls to proxy 10/31610/10
Florin Coras [Thu, 11 Mar 2021 00:15:11 +0000 (16:15 -0800)]
hsa: add support for tls to proxy

Type: improvement

Change-Id: I934e1e981bfa3e5ef81a61b2180604f9b9fc991b
Signed-off-by: Florin Coras <fcoras@cisco.com>
3 years agosession tls: deq notifications for custom tx 98/31598/4
Florin Coras [Tue, 9 Mar 2021 16:36:25 +0000 (08:36 -0800)]
session tls: deq notifications for custom tx

Type: fix

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

3 years agomisc: fix gcc-11 build 20/31620/2
Damjan Marion [Thu, 11 Mar 2021 11:17:33 +0000 (12:17 +0100)]
misc: fix gcc-11 build

Type: fix
Change-Id: Ia17c8255806a2575bb75ed37050b47ddb347050c
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovlib: refactor node function variants 16/31616/7
Damjan Marion [Wed, 10 Mar 2021 13:35:28 +0000 (14:35 +0100)]
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>
3 years agomisc: remove cop API support (part 1) 02/31602/6
Dave Barach [Tue, 9 Mar 2021 21:34:57 +0000 (16:34 -0500)]
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

3 years agosession: check if fifo exists in cl bound notification 04/31604/2
Florin Coras [Wed, 10 Mar 2021 08:21:02 +0000 (00:21 -0800)]
session: check if fifo exists in cl bound notification

Type: fix

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

3 years agointerface: fix interface-output and interface-tx multiarch selection 97/31597/3
Damjan Marion [Tue, 9 Mar 2021 15:28:15 +0000 (16:28 +0100)]
interface: fix interface-output and interface-tx multiarch selection

Type: fix
Change-Id: I77723dcbf753c2a7f1ec00f034d8ab604f12214b
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agotests: re-enable the rest of NAT44ED tests for multiworker 48/31348/5
Andrew Yourtchenko [Thu, 18 Feb 2021 11:36:22 +0000 (11:36 +0000)]
tests: re-enable the rest of NAT44ED tests for multiworker

Type: test
Change-Id: I37a12e3580c3631582f366944fe30f325b46f366
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agonat: fix dst nat thread issues 99/31599/1
Klement Sekera [Tue, 9 Mar 2021 16:53:47 +0000 (17:53 +0100)]
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

3 years agovlib: remove unused function 94/31594/1
Damjan Marion [Tue, 9 Mar 2021 14:21:28 +0000 (15:21 +0100)]
vlib: remove unused function

Not used for a looong time....

Type: refactor
Change-Id: I4b1d6216dbd349dd02c1d7c884f89ece66cd6045
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agopnat: coverity fixes 92/31592/2
Ole Troan [Tue, 9 Mar 2021 08:25:33 +0000 (09:25 +0100)]
pnat: coverity fixes

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ia1cfdbd39ed458cb3fffd29a8b6d6eff64644de8

3 years agocnat: Coverity fix 83/31583/2
Nathan Skrzypczak [Mon, 8 Mar 2021 08:37:43 +0000 (09:37 +0100)]
cnat: Coverity fix

Type: fix

Change-Id: I004a49e59d8643599fc99ad6fa5848d3cf289b7a
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agotcp: account for option alignment in initial snd_mss 53/31553/3
Florin Coras [Fri, 5 Mar 2021 21:30:18 +0000 (13:30 -0800)]
tcp: account for option alignment in initial snd_mss

Type: fix

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

3 years agonat: replace main vlib with per-thread vlib 52/31552/2
Klement Sekera [Fri, 5 Mar 2021 19:34:05 +0000 (20:34 +0100)]
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

3 years agonat: fix worker selection 27/31527/7
Klement Sekera [Wed, 3 Mar 2021 21:14:55 +0000 (22:14 +0100)]
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>
3 years agonat: test - add show trace 31/31531/4
Klement Sekera [Thu, 4 Mar 2021 17:41:02 +0000 (18:41 +0100)]
nat: test - add show trace

Add missing show trace.

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

3 years agodispatch-trace: move dispatch trace pcap code to plugin 49/31549/7
Damjan Marion [Fri, 5 Mar 2021 13:41:25 +0000 (14:41 +0100)]
dispatch-trace: move dispatch trace pcap code to plugin

Type: refactor
Change-Id: I02a527f57853ebff797f0d85761b71127916d6ce
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agonat: use correct node indexes for queues 34/31534/3
Klement Sekera [Thu, 4 Mar 2021 18:53:55 +0000 (19:53 +0100)]
nat: use correct node indexes for queues

Type: fix
Change-Id: I30b847acc4653fea9d609fc0d5875c3fda0824ef
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agovppapigen: expose the values of per-message "options" in the api.json files 23/31523/4
Andrew Yourtchenko [Thu, 4 Mar 2021 10:04:41 +0000 (10:04 +0000)]
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>
3 years agoavf: don't memcpy if adminq output buffer size is 0 42/31542/2
Damjan Marion [Fri, 5 Mar 2021 10:39:02 +0000 (11:39 +0100)]
avf: don't memcpy if adminq output buffer size is 0

Type: fix
Change-Id: I0df14ff87d0bf51eeb392f72434febf6c4a2957a
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agofib: format function for adjacency flags 29/31529/3
Neale Ranns [Thu, 4 Mar 2021 16:23:26 +0000 (16:23 +0000)]
fib: format function for adjacency flags

Type: improvement

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

3 years agointerface: move vnet_pcap_t to vnet 32/31532/4
Damjan Marion [Thu, 4 Mar 2021 17:41:59 +0000 (18:41 +0100)]
interface: move vnet_pcap_t to vnet

It naturally belogns there...

Type: refactor
Change-Id: I05f7ba01103a5e9b3756f1ea69c8cc5d8f26f0a0
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agotests: improve the robustness of process cleanup on INT/TERM signals 30/31530/2
Andrew Yourtchenko [Thu, 4 Mar 2021 16:56:38 +0000 (16:56 +0000)]
tests: improve the robustness of process cleanup on INT/TERM signals

Change-Id: I3049d3d7d1212236dcc63ebf5560f87561928520
Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agomss_clamp: TCP MSS clamping plugin 44/15144/22
Neale Ranns [Thu, 4 Oct 2018 13:40:30 +0000 (06:40 -0700)]
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>
3 years agoapi: crchcecker ignore version < 1.0.0 and outside of src directory 83/30483/3
Ole Troan [Tue, 15 Dec 2020 09:19:25 +0000 (10:19 +0100)]
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

3 years agol2: coverity woe in l2_rw_mod_entry 95/31495/2
Steven Luong [Thu, 4 Mar 2021 00:56:19 +0000 (16:56 -0800)]
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

3 years agodpdk: fix rte mempool for rx_queues 40/31540/2
Vladimir Ratnikov [Fri, 5 Mar 2021 09:22:59 +0000 (04:22 -0500)]
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

3 years agoipsec: Support async mode per-SA 75/31475/7
Neale Ranns [Thu, 25 Feb 2021 19:09:24 +0000 (19:09 +0000)]
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

3 years agoipsec: Submit fuller async frames 66/31466/2
Neale Ranns [Fri, 26 Feb 2021 10:35:33 +0000 (10:35 +0000)]
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

3 years agomarvell: check return value of vlib_trace_buffer 59/31459/6
Robert Shearman [Fri, 26 Feb 2021 11:25:04 +0000 (11:25 +0000)]
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

3 years agomarvell: spelling fixes 60/31460/6
Robert Shearman [Fri, 26 Feb 2021 11:26:38 +0000 (11:26 +0000)]
marvell: spelling fixes

Fix places where "Marvel" is used incorrectly instead of "Marvell".

Type: style
Change-Id: I9247676ab08faed31e7b813f6f496ba008210c00
Signed-off-by: Robert Shearman <robertshearman@gmail.com>
3 years agomarvell: fix implicit declaration of function 58/31458/3
Robert Shearman [Fri, 26 Feb 2021 11:24:59 +0000 (11:24 +0000)]
marvell: fix implicit declaration of function

Fix compile error due to implicit declaration of
vnet_hw_if_get_rxq_poll_vector by including the header file that
declares this.

Type: fix
Fixes: b85b0df2a039b694fb2f3c09a01decfb89d7bce2
Signed-off-by: Robert Shearman <robertshearman@gmail.com>
Change-Id: I4a21743df93ffaa637641838d30b3b5c70dd79ef

3 years agocrypto: revert "fix ops flags in crypto sw scheduler" 35/31535/1
Damjan Marion [Thu, 4 Mar 2021 23:14:15 +0000 (00:14 +0100)]
crypto: revert "fix ops flags in crypto sw scheduler"

This reverts commit 30ad571cc35e4dc6d4d7e50b81b97f83f8770eea.
Type: fix

Change-Id: If8c6e388e732d2a1b5efd0677d9528a646365f94
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agodocs: Update macos doc to clang-format 31/30931/2
Nathan Skrzypczak [Tue, 26 Jan 2021 10:49:03 +0000 (11:49 +0100)]
docs: Update macos doc to clang-format

Type: docs

Change-Id: Ibf825ac8b1591e8109be0b3b8d56ee85ae5145a4
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agomisc: add ikev2 tests usecases 22/31422/3
Filip Tehlar [Sat, 20 Feb 2021 02:26:17 +0000 (02:26 +0000)]
misc: add ikev2 tests usecases

Type: test
Ticket: VPP-1893

Change-Id: Ib6ffd00e73f7110bf9e702f4a0fd5c68395d6786
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agoikev2: fix incorrect api message 87/31487/2
Filip Tehlar [Mon, 22 Feb 2021 20:46:49 +0000 (20:46 +0000)]
ikev2: fix incorrect api message

Type: fix

Change-Id: I9b3f4531070786f583e18609dfae1d95487ce93c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agocnat: Add calico/k8s src policy 87/28587/39
Nathan Skrzypczak [Thu, 25 Feb 2021 16:42:50 +0000 (17:42 +0100)]
cnat: Add calico/k8s src policy

This patch implements k8s-specific extensions
to the cnat plugin.

This could be done by exposing a richer semantic
on srcNAT policies, but this might be too complex
work at this point. Also k8s fits quite well as a
'cloud NAT' usecase.

Type: feature

Change-Id: I2266daf7b10a92e65f5ed430838a12ae826bd333
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agocnat: Prepare extended snat policies 47/31447/9
Nathan Skrzypczak [Thu, 25 Feb 2021 16:39:03 +0000 (17:39 +0100)]
cnat: Prepare extended snat policies

Type: refactor

Change-Id: I9ca3333274d6f32b6aff57f0fb3d2049c066337a
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agocnat: Fix snat with dhcp 67/31467/3
Nathan Skrzypczak [Fri, 26 Feb 2021 17:12:20 +0000 (18:12 +0100)]
cnat: Fix snat with dhcp

Type: fix

We didn't check that the srcEndpoint was resolved
when creating the session, we could end up sNATing
with 0.0.0.0 as src_addr

Change-Id: If8dfa577e659cfe90b148657a44c0390a7d383e9
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agocrypto: fix ops flags in crypto sw scheduler 17/30917/3
Benoît Ganne [Fri, 22 Jan 2021 17:11:37 +0000 (18:11 +0100)]
crypto: fix ops flags in crypto sw scheduler

The sw crypto scheduler converts crypto frames to individual crypto
operations. This is done by reusing per-thread vectors for crypto,
integrity and chained operations.
The crypto op flags must be reset to frame flags minus invalid values
depending of the operation.
The previous tentative also cleared the chained buffer flag, breaking
jumbo support.

Type: fix

Change-Id: Icce6887a9e0dae8c300c56e97b977e203e784713
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agocrypto: add support for aes-ctr+sha-1 chains 16/30916/4
Benoît Ganne [Fri, 22 Jan 2021 17:09:40 +0000 (18:09 +0100)]
crypto: add support for aes-ctr+sha-1 chains

Type: feature

Change-Id: I9d4f90bc701d2b9b903a018f8d27cec5e129d7be
Signed-off-by: Benoît Ganne <bganne@cisco.com>