11609 Commits

Author SHA1 Message Date
Damjan Marion
b97bec0ae5 vppinfra: multiple perf bundle support in test_vector_funcs
Type: improvement
Change-Id: I93be722f4dabc2b49a5e83f61f4eb1d72f5f7d45
Signed-off-by: Damjan Marion <dmarion@me.com>
2021-12-13 12:17:14 +00:00
Mercury
d089206126 arp: fix arp_vft callback
arp proxy is not enabled correctly by ip4_neighbor_proxy_enable()

Type: fix
Signed-off-by: Mercury <mercury124185@gmail.com>
Change-Id: I672b5d4a9652030b5604e9d39743c39cb93a2531
2021-12-12 08:45:38 +08:00
Mercury
8ade4a568a tcp: fix the tcp src-address cli
When the src-address to add match a route
without a valid output interface(such as default route 0.0.0.0/0),
fib_entry_get_resolving_interface() will return (u32)~0,
which will cause crash in ip4_neighbor_proxy_enable().

Type: fix
Signed-off-by: Mercury <mercury124185@gmail.com>
Change-Id: I5aee5676a2ff43ec06745ebed4dba2b9e5b98c4d
2021-12-12 08:26:49 +08:00
Klement Sekera
7c3275e84b ip: reassembly: handle atomic fragments correctly
If a fragment arrives with fragment offset = 0 and M = 0, it means that
this is actually a complete packet and per RFC 8200, it should be
treated independently from other fragments. This patch does that.
Fragmentation header is stripped and fragment is forwarded irregardles
of other existing reassemblies in case of full reassembly and treated
the same way as regular packet in shallow virtual reassembly.

Type: improvement
Change-Id: If3322d5e3160cd755b8465a642702a9166d46cc2
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-12-10 08:41:00 +00:00
Florin Coras
514df6f931 dpdk: disable l4 csum offload for vmxnet3
TCP csum offload fails although udp seems to work.

Type: fix
Fixes: fa1fb60

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie0651887b09920365806eaad776b0d13059faee8
2021-12-09 11:42:50 -08:00
Damjan Marion
99704b58a1 build: fix PYTHONPYCACHEPREFIX path
Type: make
Change-Id: I20fd245585e5b62ff20fe3adf20b14bfef47a9ca
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-09 11:35:08 +01:00
Florin Coras
74254b5c60 vcl: validate closed sessions on disconnect and reset
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0375d639e979e29d287dc9fee16b0434fb5c788b
2021-12-08 18:53:36 +00:00
Han Wu
efb64836f1 memif: fix the memory leak when memif cli getting wrong parameters inputs
Type: fix

Signed-off-by: Han Wu <wuhan9084@163.com>
Change-Id: I0aeafd273b3d1d01df02d638c72461943f91ef90
2021-12-08 17:53:13 +00:00
Klement Sekera
0eb83f484c api: improve REPLY_MACRO safety
Improve vppapigen to generate per-message #define indicating whether
said message is dynamically sized (due to VLA or string) or not. Use
these #defines in REPLY_MACROs to prevent improper usage. Fix existing
improper REPLY_MACRO* usage.

Type: improvement
Change-Id: Ia77aaf9f6cf3ed68ea21075a4cc8deda78a68651
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-12-08 09:39:21 +00:00
Florin Coras
074f3970c6 session: stricter tx checks for ct sessions
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ied4fe0f2b35eeca4e3e82fa21346de7f243aa52a
2021-12-08 00:13:02 +00:00
Florin Coras
13987dab0d session: fix duplicate segment del message
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I42b5a5a07aae6708a20ed424c8f26ddbe91278fb
2021-12-08 00:12:51 +00:00
Florin Coras
5ffb9649bf vcl: debug code improvements
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I18cd4131c692e776c98eba36161813035e9dec53
2021-12-07 21:38:02 +00:00
Florin Coras
f0fe1ea326 vcl: handle reordering of disconnect and reset msgs
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I817e8510029a060876697701b81a952286597db1
2021-12-07 20:06:27 +00:00
Jakub Grajciar
8caf9ece87 libmemif: reset memif buffer flags
Reset memif_buffer_t flags in memif_buffer_alloc and
memif_rx_burst

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: If62ba510fad783afb9f7f58411562b6989fa1573
2021-12-07 18:11:47 +00:00
Klement Sekera
e46ea1d0c5 fib: fix coverity warning/don't dereference NULL
fib_sas6_get is called with NULL dst explicitly so add a NULL check to
avoid a NULL dereference.

Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I8ebcba98832f374991f5442c1b83a4b6e64771d0
2021-12-07 14:54:57 +00:00
Florin Coras
674d5651e2 vcl: fix ldp shared listener bitmap leak
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id1e273bf80c1cc687ce7e5ea3b8cc6a3ec3862f9
2021-12-06 16:37:35 +00:00
Damjan Marion
68843d1b6c vppinfra: add 'filter' option to test_vector_funcs
Type: improvement
Change-Id: I5ed9029e5dc1368b7debbef04a3ac439a61af9ea
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-06 13:11:10 +00:00
Damjan Marion
de3735f828 vppinfra: sha2 tests
Type: improvement
Change-Id: I8a5d8d5db4e4a8ee3a1164bfbe91badff181d06a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-06 12:28:01 +00:00
Damjan Marion
9c412e9ee5 build: leave to CMake to deal with -fPIE
Type: make
Change-Id: Icced0e09b75b3114b1652d552e288091968ee7cc
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-06 12:27:22 +00:00
Matthew Smith
c14b8cfe60 ipsec: fix async buffer leak
Type: fix
Fixes: f16e9a5507

If an attempt to submit an async crypto frame fails, the buffers that
were added to the frame are supposed to be dropped. This was not
happening and they are leaking, resulting in buffer exhaustion.
There are two issues:

1. The return value of esp_async_recycle_failed_submit() is used to
figure out how many buffers should be dropped. That function calls
vnet_crypto_async_reset_frame() and then returns f->n_elts. Resetting
the frame sets n_elts to 0. So esp_async_recycle_failed_submit() always
returns 0. It is safe to remove the call to reset the frame because
esp_async_recycle_failed_submit() is called in 2 places and a call to
reset the frame is made immediately afterwards in both cases - so it
is currently unnecessary anyway.

2. An array and an index are passed to esp_async_recycle_failed_submit().
The index should indicate the position in the array where indices of the
buffers contained in the frame should be written. Across multiple calls,
the same index value (n_sync) is passed. This means each call may overwrite
the same entries in the array with the buffer indices in the frame rather
than appending them to the entries which were written earlier. Pass n_noop
as the index instead of n_sync.

Change-Id: I525ab3c466965446f6c116f4c8c5ebb678a66d84
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2021-12-04 12:52:29 +00:00
Mohsin Kazmi
0d05c0d214 interface: add multi tx-queues support for new tx infra
Type: feature

Change-Id: I231f782b3c56dc2b10321e4569ac7acdad1c11da
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-12-03 13:12:13 +00:00
Klement Sekera
5d5f85f5e4 api: refactor to use REPLY_MSG_ID_BASE #define
REPLY_MSG_ID_BASE is the standard way to define reply message id base,
so this refactor makes all the files use that. This is a preparation
patch for future safety add-ons which rely on REPLY_MACRO* parameters to
be preprocessor tokens identifying the message instead,

Type: refactor
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ibe3e056a3d9326d08af45bbcb25588b11e870141
2021-12-03 10:51:11 +00:00
Ole Troan
03092c1982 ip: extension header parsing fails for fragment header
Refactor and improve boundary checking on IPv6 extension header handling.
Limit parsing of IPv6 extension headers to a maximum of 4 headers and a
depth of 256 bytes.

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ide40aaa2b482ceef7e92f02fa0caeadb3b8f7556
Signed-off-by: Ole Troan <ot@cisco.com>
2021-12-03 09:35:30 +00:00
Neale Ranns
2008912b56 fib: Fix the display (or lack of) for fib node types in dependent children lists
Type: fix

When registering a new FIB node type, no name was required on the API, and so no name was printed.

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I8a99cf29c194637a550061b0a5e9782ffe8b31dd
2021-12-03 09:04:44 +00:00
Filip Tehlar
f68798626c tests: add segment manager tests
Type: test
Change-Id: Ic9fddc9fedd5140984c5901c4cac53dec022dcec
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2021-12-02 17:53:11 +00:00
Damjan Marion
e31c48a66b perfmon: compile dispatch wrapper once for each number of counters
A bit ugly, but generates faster and less noisy code which
should be important for this particular use case.

Type: improvement
Change-Id: If2bba947dac33ffedb4236a5b3fb50fc783668e1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-02 17:49:49 +00:00
Damjan Marion
3323e2018d vppinfra: add perf testing to test_vector_func
Type: improvement
Change-Id: I7aacd58d113c13036c15655817400032dd8d1932
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-02 16:19:17 +00:00
Ray Kinsella
e893beab27 perfmon: refactor perf metric support
Refactoring perf metric support to remove branching on bundle type in
the dispatch wrapper. This change includes caching the rdpmc index at
perfmon_start(), so that the mmap_page.index doesn't need to be looked
up each time. It also exclude the effects of mmap_page.index.

This patch prepares the path for bundles that support general, fixed and
metrics counters simulataneously.

Type: refactor

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I9c5b4917bd02fea960e546e8558452c4362eabc4
2021-12-02 15:02:39 +00:00
Damjan Marion
c30f3006bd build: bump min cmake version to 3.13 and remove workarounds
Type: make
Change-Id: I1cd00257e132e671cbdd7b4710862afb07aa19e6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-02 13:51:08 +00:00
Damjan Marion
efd6de87d3 vppinfra: vector shuffle cleanup
Type: refactor
Change-Id: I8b3fc2ce30df313467274a174c5ac6adbf296153
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-02 13:46:23 +00:00
Damjan Marion
9ab2e5d8d7 vppinfra: add SIMD masked bitwise ops
Type: improvement
Change-Id: Id73b00a8cb3af799f9f97949bc1302f162a91a57
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-02 13:45:43 +00:00
Matthew Giassa
4a0dd383cf docs: add VPP Container Testbench example and lab
Adding a "VPP container testbench" (pair of Docker containers plus
helper scripts to test Linux and VPP interfaces). Will be part of a
larger set of labs/exercises/tutorials. Putting this baseline setup up
for review first to see if the community sees use/value in it. If so,
additional exercises using the testbench will be added gradually.

Type: improvement
Signed-off-by: Matthew Giassa <mgiassa@cisco.com>
Change-Id: I582310f7355419e907d575f640482ca49cbb282f
2021-12-01 18:41:20 +00:00
Mohsin Kazmi
342a5d472f api: add api macros for native endian
Type: improvement

Change-Id: I22fec740b30b89e7a571f8ba2bd55adb2ef305d4
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-12-01 14:53:20 +00:00
Mohsin Kazmi
376c2106ce interface: add support for outer header checksums
Type: improvement

Change-Id: I7c341dc4a99898dd1f865ac2ebd99de9898bb0bd
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2021-11-30 21:24:48 +00:00
Dave Wallace
bfcd239682 build rpm-packaging: Remove boost dependencies from VOM
- VOM was deprecated in VPP 21.06, but the boost library
  dependencies did not get cleaned up.

Type: make

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I0fb860a7a37676c1a1a0981c91f383882d9a820a
2021-11-30 19:59:02 +00:00
Florin Coras
8d42c75d6c vcl: improve handling of failed connects
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If6235888cb0870ec3e1279ab1856a00715bd6c68
2021-11-30 16:01:12 +00:00
Florin Coras
6068719f37 vcl: avoid ip format function vnet dependency
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I89103d4c99b21c5a466dbe511f0151bd754559a0
2021-11-30 16:00:58 +00:00
Benoît Ganne
db4abc4bc2 rdma: bump to rdma-core 38.0
Type: improvement

Change-Id: Ibe3e6f342f3713fa814b684e04a066a3248669d8
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-11-30 14:10:48 +00:00
Benoît Ganne
521a9f8eb9 rdma: fix rdma-core install
We should not install symlinks to local build directory.

Type: fix

Change-Id: I81e624dd5775ec9c5dd8c58f578ee51c5acfef73
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-11-30 14:10:32 +00:00
PiotrX Kleski
cd27e71f33 dpdk: cryptodev AES-CTR+SHA1 support added
Type: improvement

This patch adds AES-CTR-128/192/256 + SHA1 linked algo support to dpdk
cryptodev.

Signed-off-by: PiotrX Kleski <piotrx.kleski@intel.com>
Change-Id: Idc162b29f4075ef8be9577abd3daf6de05f84faa
2021-11-30 12:12:31 +01:00
Dastin Wilski
4d232ff5ac dpdk-cryptodev: scalable session count
Originally cryptodev allocates mempools for seesion and session private
data during its initialization. Moreover the size of these mempools are
fixed resulting in limited session count (up to value specified in
CRYPTODEV_NB_SESSION macro).

This patch allows for session count to scale up by allocating new
mempools as they are needed during session creation.

Type: improvement
Signed-off-by: Dastin Wilski <dastin.wilski@gmail.com>
Change-Id: I6ae240b474d3089d3ff50ca5bc7ff48f149983db
2021-11-30 11:02:11 +00:00
Florin Coras
bb1413bd1e vppinfra: remove duplicate api function definition
vl_api_c_string_to_api_string declared in api_types.h
and defined in api_shared.c. Remove from jsonformat

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I994c8c13b7246a857464c1f879432f73692c6d1f
2021-11-30 05:38:37 +00:00
Florin Coras
cba1c2258b vcl: fix build with older gcc
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic941065aa7d7c0002863a6391c8914089c438445
2021-11-29 17:50:53 +00:00
Florin Coras
02cc719d98 session: remove segment if empty after writer lock
Make sure segment is empty after writer lock acquired. Other workers
might add fifos in between empty test and writer lock acquire.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3400fdd14be98d9d8fb4e415d3a849be1d255241
2021-11-29 17:50:40 +00:00
Florin Coras
1a4aaf1c31 session: mark first listener segment as protected
Avoid constantly re-mapping a listener's first segment when all its
sessions are closed.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iea7033fb70f4cf9e4408d542b7c0ff2b0c5c2f92
2021-11-29 17:50:16 +00:00
Florin Coras
5babf98369 session: no deq notifications after close
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3e633f017c68e8c5446e45b577048138a387daf6
2021-11-29 17:50:05 +00:00
Florin Coras
dfd27bc0f2 session: postpone close notification if still accepting
Acceping sessions might be rejected so the notification might not make
sense.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3ababdce7c2cec62941d9722a9c06fa48ec547db
2021-11-29 17:49:48 +00:00
Paul Atkins
b779ca9324 ipfix-export: don't check the result of pool_get
The code to check the exp is set after the call to pool_get()
is marked as unreachable in coverity. This is becasue if it
fails in pool_get then the it panics. Remove the unreachable code.

Type: fix
Signed-off-by: Paul Atkins <patkins@graphiant.com>
Change-Id: Iabb51b6b6788b6c12ef37c28dde2118c798de831
2021-11-29 16:21:27 +00:00
wanghanlin
19f6e260ac session: fix clib_rwlock_writer_unlock lost
Type: fix

Signed-off-by: wanghanlin <wanghanlin@corp.netease.com>
Change-Id: Iab857b056639f7e513f87a6095bea081b7d8349c
2021-11-29 15:05:23 +08:00
Nathan Skrzypczak
9adcc9778c devices: fix af_packet GSO check
Type: fix

This fixes the GSO size calculation in af_packet
which didn't include the ethernet size.
This is not ideal, as we default to the host
side mtu to check whether a packet is GSO or not
and to set the GSO size. But there doesn't seem
to be more info passed with the packets.

Change-Id: I9769e1dd21d5989b4cf67295352b5535454f88d1
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-11-27 15:31:46 +00:00