12092 Commits

Author SHA1 Message Date
Dave Wallace
1513b381d8 misc: VPP 22.06.1 Release Notes
Type: docs
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I8770a35c801126ffd2de8f58d79e6616642709a9
v22.06.1
2023-02-10 13:28:46 -05:00
Benoît Ganne
9b8dc82531 ipsec: fix AES CBC IV generation (CVE-2022-46397)
For AES-CBC, the IV must be unpredictable (see NIST SP800-38a Appendix
C). Chaining IVs like is done by ipsecmb and native backends for the
VNET_CRYPTO_OP_FLAG_INIT_IV is fully predictable.
Encrypt a counter as part of the message, making the (predictable)
counter-generated IV unpredictable.

Fixes: VPP-2037
Type: fix

Change-Id: If4f192d62bf97dda553e7573331c75efa11822ae
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-02-03 21:04:24 -05:00
Tianyu Li
d03b3bf62f dpdk: fix arm iavf rx vector path on 22.03
dpdk 22.03 introduces iavf driver but misses rx vector path on Arm.
This causes VF fail to receive packet when running VPP device test
with no-multi-seg configuration.

Add iavf basic Neon RX support to fix this.

Type: fix
Fixes: 2f132efc3caf ("dpdk: bump to DPDK v22.03")

Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I75ae74c8060428cee0e1c235feab1246c014801e
2022-08-25 17:19:46 +08:00
Matthew Smith
0ded107caf wireguard: increment interface RX counters
Type: improvement

When packets were received and processed successfully, increment the
byte/packet counters for the tunnel interface.

Change-Id: I42855607ac6916de641be42aac86c9942cc97140
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
(cherry picked from commit 42928beec9f4dc87dcf61332a39801a454c1d7bc)
2022-08-14 21:43:07 +00:00
Jon Loeliger
9dac6f9675 ipfix-export: Fix frame leak in flow_report_process_send()
The flow_report_process_send() function always allocates a frame.
However, when no template_send is needed, template_bi is ~0.
When this happens, no vectors are placed in the frame.  When
the frame is then "put", a check for n_vectors == 0 prevents
the frame from actually being placed back on the free list.
Fix that by using a direct call to vlib_frame_free() when
there are no frame vctors.

Type: fix
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Change-Id: I936b5cea4cb3c358247c3d2e1a77d034a322ea76
(cherry picked from commit eaa83c0439c13b76525224267c23d0cf52a6668b)
2022-08-14 21:42:44 +00:00
Alexander Skorichenko
fa27d4d4f1 nat: disable nat44-ei-in2out-output ttl check
Type: fix

A packet passing through nat44-ei-in2out-output,
has its ttl value validated in earlier nodes.
"ip4-input" node checks ttl for locally generated packets.
"ip4-rewrite" node validates ttl in forwarded packets.

Thus for example, the ED counterpart disables ttl checks
in its "nat44-ed-in2out-output" node.
This patch updates nat44 EI conditions for ttl checks to
those currently used in nat44 ED case, meaning no extra ttl
validation for in2out when output-feature is enabled.

Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
Change-Id: Idd15d7c9a746b60c0a6dac5537d00ef10c257fdc
(cherry picked from commit d1ca70c7e11dac7b9fff802ca5f1d9051c984c34)
2022-07-19 12:24:51 +00:00
Andrew Yourtchenko
0d352a97c5 misc: VPP 22.06 Release Notes
Type: docs
Change-Id: I15971b21fd660b4893218640c0d5e5a5247868f1
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
v22.06
2022-06-29 12:13:49 +00:00
Florin Coras
0ffc5016dd vcl: check if listener valid on disconnect cleanup
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie057d0d5a51d3226a1a188cf9d48a5d82dc4a3c7
2022-06-29 11:55:45 +00:00
fanxb
6777efdda0 quic:fix crash rx_fifo full or grow
if when the rx_fifo grows, svm_fifo_enqueue() return -4,
stream_data->app_rx_data_len += rlen type conversion occurs,
Finally,stream->recvstate.data_off calculation is wrong.

Type:fix

Signed-off-by: fanxb <fxb_mail@163.com>
Change-Id: Iae11f0c453f32d836f4148d70e3b121545a53a90
(cherry picked from commit 5b4b4c05ff06b866b90b0df9b2be2ed28e606f16)
2022-06-29 02:15:30 +00:00
Pratikshya Prasai
996550c62f docs: fix broken links
Type: docs

Signed-off-by: Pratikshya Prasai <pratikshyaprasai2112@gmail.com>
Change-Id: I729de9e18624c63a72ec415a05c55617cb360c47
(cherry picked from commit 365fabea1eac892b838a258d39e6e6eee8adbd2d)
2022-06-29 02:02:03 +00:00
Florin Coras
b65e76e108 session: fix connected udp accepts
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0963bae4b56b08c0a9ab4ee1f2738013217e1fb7
(cherry picked from commit fc20c8e50f2784ad62b97bdb0094605d2b86f596)
2022-06-29 00:36:02 +00:00
Florin Coras
40d811fee8 session quic: allow custom config of rx mqs seg size
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: Idc0fdebfea29c241d8a36128241ccec03eace5fd
(cherry picked from commit cf5c774b594d4b403e817886c8d41efd927f06b4)
2022-06-28 22:42:01 +00:00
Florin Coras
ea4bcec987 hsa: allow first segments larger than 4g for proxy
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I9c502a491ff56806a2e631f7a4c18903a2e93ab2
(cherry picked from commit c2ab1bdbc73f2743979f8779c027adc04d79bf22)
v22.06-rc2
2022-06-10 16:34:43 +00:00
Florin Coras
2d4b5c3670 hsa: dealloc proxy fifos on right thread
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia66c12e1da126d0d8d101b645e6dc8454c3826d6
(cherry picked from commit db8dd260d5d8ac798a9524f29e746b9094eb73bf)
2022-06-09 19:06:43 +00:00
Florin Coras
d9f83ae3f1 hsa: refactor proxy session lookup and cleanup
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic68627bbca676cc78b0be05bc1fa0f386f5d27fa
(cherry picked from commit 7b8d26c136081563c89e50df3d16a37f2ad3e489)
2022-06-08 15:27:42 +00:00
Filip Tehlar
ea7a4cb891 session: fix double free in CLI
Type: fix

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I646ac946d0b07929dfdd1966a4f4a3b697768040
(cherry picked from commit af21b2e6994893e97ad0fef52ca154c69a4a09cb)
2022-06-03 15:44:02 +00:00
Dave Wallace
5373a6bcc8 docs: update spelling word list and fix typos
- update wordlist and fix typos so that 'make docs-spell' passes
- sort spelling_wordlist.txt
- update docs maintainers list

Type: docs

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I38ac7850c604c323427d2bb6877ea98bd10bcc38
(cherry picked from commit dac97e2c627ca3a911dac7fd8eb268bde23f853f)
2022-05-25 21:24:04 +00:00
Andrew Yourtchenko
211fa4748c misc: Initial changes for stable/2206 branch
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Ib8092fd21db3d21254ebdc7d7ace270c035fced8
v22.06-rc1
2022-05-25 12:08:44 +00:00
Nathan Skrzypczak
1e167a4aad docs: make docs build incremental
This patch makes the `make docs` directive incremental
avoiding re-running the siphon when the source hasn't
changed, and leveraging sphinx internal cache.
It adds a `make rebuild-docs` directive for cases where
this caching logic might break, e.g. in CI.
The virtualenv doesn't also get recreated on each build,
which might be enough when writing docs, provided
automated process leverage its rebuild counterpart.

Type: improvement

Change-Id: Ie90de3adebeed017b249cad81c6c160719f71e8d
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2022-05-24 16:58:36 -04:00
Tianyu Li
26c39878ad tests: fix ipsec sdp cases with parrallel job
Serveral IPSec SPD cases re-use the same test class name,
leads to test error when do parrallel test with TEST_JOBS=16,
change the test class names to unique values.

Type: fix
Fixes: 7cd35f5d688d9e3bddf66602655274dae944b086
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: Ia5768654ddb6274531222761cc82b226d97325a9
2022-05-24 18:01:43 +00:00
Klement Sekera
152a9b6165 tests: fix default failed dir setting
When running tests via run.sh, default setting of None would cause
failed directory symlink to appear in vpp workspace with an ugly name.
This patch places the symlink in temporary directory.

Type: fix
Fixes: b23ffd7ef216463c35b75c831e6a27e58971f4ec
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: Ic1715eba7ac1f82f71855e2aeb9b659d27bbb3af
2022-05-24 16:13:09 +00:00
Mohsin Kazmi
0bfc222e3d devices: add af-packet v3 api
Type: improvement

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I4679acbe4fd4400d57c0a79b0a6c74c8f1639703
2022-05-24 15:09:33 +00:00
Ting Xu
337960b8a4 flow: support generic flow and RSS action in vapi
Add generic flow type and rss action type to vapi. It is to support
creating generic flow rule via vapi.

Type: feature

Signed-off-by: Ting Xu <ting.xu@intel.com>
Change-Id: Ifeaa007679487e02bd2903dc591d80a1caba33bc
2022-05-24 14:04:41 +00:00
Leung Lai Yung
69be089900 vppinfra: fix memory trace
Type: fix

reset the memory trace if mem trace is turned on

Signed-off-by: Leung Lai Yung <benkerbuild@gmail.com>
Change-Id: Ib99355b9ed42ff66c720bbea5cbbf03c65820d12
2022-05-24 14:04:06 +00:00
Mohammed Hawari
e71492655f vlib: implement aux data handoff
Type: improvement
Change-Id: I20b41537a249a55f01004e45392b34adaa8fd792
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2022-05-24 14:03:00 +00:00
Filip Varga
9a8d3d7107 api: start enum values from 0
C enum values by default start from 0.
All unassigned names should get value as value of previous name plus one.
The problem was that default value was 0 and adding one for the first
value would make generated api files start from 1 instead of 0.

Type: fix

Change-Id: I772d6411435648de3ec514f57025ef1acae87338
Signed-off-by: Filip Varga <fivarga@cisco.com>
2022-05-24 12:36:29 +02:00
Alexander Skorichenko
d8366d085f dpdk: fix update link state
Type: fix

Correct vnet_hw_interface_t flags update on link state changes.
Currently incomplete set of flags is applied on each change,
only flags related to the most recent change are being set correct.
E.g. setting the link up would erase the duplex part of the flags.

Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
Change-Id: I5b95e1c0eaea0c283b108dbf7f809682ec9064eb
2022-05-23 16:33:51 +00:00
Anton Nikolaev
8abbdf509b linux-cp: fix display of link_speed
Type: fix

Don't set link speed for tap interface when link speed is unknown

Signed-off-by: Anton Nikolaev <anikolaev@netgate.com>
Change-Id: Ia97277b3bf7c958fa665e4ead8d0e48f02921e69
2022-05-23 15:36:51 +00:00
Vijayabhaskar Katamreddy
beafecfc2e ip: reassembly - fixing stepping index in a better way
Type: fix

pool_is_free_index() check is performed only for the first element

Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
Change-Id: Icadc715a9b54761ec69805a134a69a262137536d
2022-05-23 09:40:18 +00:00
Vijayabhaskar Katamreddy
bc8c210f1d ip: reassembly - adding custom reassembly node
Type: fix

Custom node functionality is missing in v6,  so bringing in similar to v4 functionality into ip6 as well

Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
Change-Id: I28b0be2fc55a00bfc0b456b1caaa1dcf5641a44e
2022-05-23 09:39:41 +00:00
Mohsin Kazmi
096c8cc680 virtio: use the internal hdr offsets of buffer metadata for offloads
Type: improvement

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ie63c360f2e42e9e5799f5c536453823ea95ed3b8
2022-05-20 12:46:54 +00:00
Damjan Marion
cada9eb789 api: refactor api data storage
single struct to hold all api handler, flags, etc.
Provide functions to toggle flags instead of writing directly to
internal data.

Type: refactor
Change-Id: I4730d7290e57489de8eda34a72211527e015b721
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-19 18:32:23 +02:00
Stanislav Zaikin
bf95e3efde ikev2: fix tunnel direction
Type: fix

Change-Id: I480b1fcace1c27a5cb2d2956cec80b379105b55d
Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com>
2022-05-19 14:51:17 +00:00
Vijayabhaskar Katamreddy
8b874fc6a8 ip: reassembly - pacing reassembly timeouts
Type: fix

Pace the main thread activity for reassembly timeouts, to avoid barrier syncs

Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
Change-Id: If8c62a05c7d28bfa6ac530c2cd5124834b4e8a70
2022-05-19 13:35:33 +00:00
Arthur de Kerhor
add6a384e9 stats: fix collector updates of symlinks
A node name is not bound to a node index. For example, if an interface
is deleted and re-added, the indexes of its nodes "<itfc_name>-tx"
and "<itfc_name>-output" may change. Thus, when the collector updates
the nodes stats, it should first delete all the symlinks for nodes that
have changed their names before adding new symlinks. Otherwise, it
could attempt to add already existing symlinks or delete valid ones.

Example of a series of command that triggers a crash in the assert
`ASSERT (node_data[i].symlinks[j] != CLIB_U32_MAX);`:

```
create loopback interface
create loopback interface
```
Wait for the nodes stats to update, then:
```
delete loopback interface intfc loop0
delete loopback interface intfc loop1
create loopback interface
create loopback interface
```

Type: fix

Change-Id: Ief8e7135e5c02dc6bc64dc94b76cff21ea9ab3a9
Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
2022-05-19 12:30:58 +00:00
Vijayabhaskar Katamreddy
14a7442e73 ip: reassembly - increasing the nbuckets for reass
Type: fix

Adding stats from debugging point of view

Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
Change-Id: I3118d3fd5d630fad80a42ab960e30459789123cf
2022-05-19 07:17:42 +00:00
Damjan Marion
01e593e8e5 vppinfra: fix non-vector build on x86_64
Type: fix
Fixes: 56f54af
Change-Id: Id03185953eb16da3a3276d2f21d64499784bbf17
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-18 20:10:16 +00:00
Filip Tehlar
9196ed798a misc: update config script in IKEv2 test
Type: fix

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Iba82f8e0f18f3e1e4da57f4c23ba9272e87afd93
2022-05-18 09:46:33 +00:00
Vijayabhaskar Katamreddy
3fda200c4c ip: reassembly - increasing the nbuckets for reass
Type: fix

as number of reass contexts increasing based on workers, increasing the number of nbuckets for bihash

Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
Change-Id: I83d061a709ecb8845ce745b18d03fdefc795787f
2022-05-18 07:47:39 +00:00
Anton Nikolaev
61f6a4c4f0 interface: fix overflow of link speed.
Type: fix

There were several places where mbps were converted to kbps for
link_speed, but often drivers of devices set link speed to unknown
(0xFFFFFFFF) on initialization, so there was multiplication of
link_speed equal 0xFFFFFFFF(UINT32_MAX) by 1000, this provides
overflow of unsigned int, and as result link_speed was equal
4295 Gbps, but actually link_speed is unknown.

Signed-off-by: Anton Nikolaev <anikolaev@netgate.com>
Change-Id: Ib462ed6ed685654af4687041e115bfb74e640f13
2022-05-17 19:42:17 +00:00
Steven Luong
59a08e6509 acl: memory leak in acl_fa_session_cleaner_process
The statement
  pw0->pending_clear_sw_if_index_bitmap =
    clib_bitmap_dup (pw0->serviced_sw_if_index_bitmap);
will cause pw0->pending_clear_sw_if_index_bitmap's previous
vector to be gone. Need to free it prior to calling clib_bitmap_dup()

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I20de780e73daea7be17efa0bf660af2592cd4680
2022-05-16 18:54:44 -07:00
Alexander Chernavin
86c7856eda flowprobe: add api messages to obtain current state
Type: improvement

With this change:
 - add dump/details messages to obtain interfaces for which IPFIX flow
   record generation is enabled;
 - add get message to obtain parameters;
 - add a new message to set parameters with validation present and to
   correspond with get/set naming;
 - add tests for get/set parameters and dump/details interfaces.

Change-Id: I09f6ec990171ac8bcb9d2f5c92629803b8ab6c28
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2022-05-16 20:53:19 +00:00
Nathan Skrzypczak
99b9639845
ip: format table ids with %u
Type: fix

Change-Id: I69f7e23b23e8cfcfe57ba019862470e0eb4b06db
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2022-05-16 10:44:45 +02:00
Damjan Marion
3153f007c0 vlib: exec cli line-by-line processing and script updates
Type: improvement
Change-Id: I82e7c0acc547794bcc7c42f4b8881a8251bf7a9b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-16 01:31:54 +00:00
Damjan Marion
342044a3b5 session: revert "fix session cli maybe parse wrong args if executed in files"
Fixed at infra level.

Type: improvement
Change-Id: I43cf16870c1d2e12189073f7786d62375c46e2c2
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-14 00:30:42 +02:00
Damjan Marion
c50bcbd6c2 vlib: process startup config exec scripts line by line
This fixes long standing annoyance that CLIs with optional args cannot
be executed from file, as they cannot distinguish between valid optional
args and next line in the file.

Multiline statements can be provided simply by using backslash before \n.
Also comments are supported - everything after # is ignored up to the
end of the line.

Example:

 # multiline cli using backslash
show version \
       verbose # end of line comment

packet-generator new { \
   name x \
   limit 5 \
   # comment inside cmultiline cli \
   size 128-128 \
   interface local0 \
   node null-node \
   data { \
       incrementing 30 \
   } \
}

Type: fix

Change-Id: Ia6d588169bae14e6e3f18effe94820d05ace1dbf
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-13 16:58:03 +00:00
Mohammed Hawari
c0a08cadee dpdk: fix overflow in mtu arithmetic
When the driver's max_rx_pktlen is >= 65536, max_supported_frame_size
overflows and queue creation fails.

Change-Id: If78707cb698adf8619ec44a852dd05d570917577
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: fix
2022-05-13 09:35:13 +00:00
Alexander Chernavin
d0e0e06984 tests: fix pnat tests formatting
Type: fix

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: I944dc8418e7ab541ae96141c15e04abb33635ac4
2022-05-13 08:34:34 +00:00
Vijayabhaskar Katamreddy
e0f901a048 ip: reassembly - Fixing buffer leaks, corruption
Type: fix

*Buffer leaks and corruptions during internal errors, either overriding
or missing to add the buffer to the list

Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
Change-Id: I6c2406cff53a741e800e2d05593696f3e9fd6ff5
2022-05-13 07:41:24 +00:00
Alexander Chernavin
6f5ddf3461 flowprobe: add support for reporting on inbound packets
Type: feature

Currently, the plugin supports only IPFIX flow record generation for
outbound packets.

With this change:
 - add a new API message for enabling the feature on an interface that
   accepts direction (rx, tx, both);
 - update existing debug command for feature enabling to accept
   direction;
 - update existing debug command for showing currently enabled feature
   on interfaces to display direction;
 - update templates to include a direction field;
 - generate flow records on the specified direction and data path;
 - report direction in flow data;
 - update tests to use the new API;
 - add tests for inbound flows.

Change-Id: I121fd904b38408641036ebeea848df7a4e5e0b30
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2022-05-13 07:34:41 +00:00