Mohsin Kazmi [Mon, 11 Apr 2022 12:52:28 +0000 (12:52 +0000)]
devices: remove redundant access in af-packet input
Type: fix
current_data is set to 0 for each packet in af-packet input node.
It is not required to include it to calculate the headers offset.
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I538d8c04e24c758155b3f8d6a1532472ef549459
Florin Coras [Fri, 15 Apr 2022 19:37:48 +0000 (12:37 -0700)]
session: add support for listen proxies
Listener proxies are allowed to listen on IPs that are not local.
Configurable only by builtin apps for now.
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idb380ee3584a088878a03d45fd85e7bb0deeb590
Alexander Skorichenko [Fri, 15 Apr 2022 16:32:18 +0000 (16:32 +0000)]
nat: fix deleting nat ei out interface feature
Type: fix
Set is_add function argument to 0 when deleting interface role.
Change-Id: I6ca88d6511e1c88285e51b3750eb501fde2b341b
Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
Florin Coras [Mon, 18 Apr 2022 16:29:59 +0000 (09:29 -0700)]
rpm-packaging: remove mbedtls dependency
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idf325b7f1ce75e973dbea4d5836609590c85dc38
Florin Coras [Fri, 15 Apr 2022 23:01:43 +0000 (16:01 -0700)]
hsa: vcl test client allow non-blocking connects
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If7dd56e76efc31ed66b865e2c7231d22ec2322b4
Florin Coras [Wed, 13 Apr 2022 05:16:11 +0000 (22:16 -0700)]
hsa: support configurable vcl client wrk loop
Type: refactor
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5e49f43b18ff011ce0b7259ed58854d81f910826
Damjan Marion [Fri, 15 Apr 2022 13:27:24 +0000 (15:27 +0200)]
stats: store heap in the directory_entry vector
Type: improvement
Change-Id: I878803d14d1070ef5a00ed9d3f72022906d55191
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Thu, 14 Apr 2022 20:18:19 +0000 (22:18 +0200)]
build: c compiler version warnings
Type: make
Change-Id: I9455da47f03383df822436d1adc4c4b5e58c7cf9
Signed-off-by: Damjan Marion <damarion@cisco.com>
Andrew Yourtchenko [Fri, 15 Apr 2022 14:23:41 +0000 (14:23 +0000)]
api: fix infinite loop in show api dump CLI
The following illustrates the problem:
./build-root/install-vpp_debug-native/vpp/bin/vpp api-trace { on } unix { cli-listen /tmp/vpp-api-cli.sock } plugins { plugin dpdk_plugin.so { disable } }
sleep 5
./build-root/install-vpp_debug-native/vpp/bin/vppctl -s /tmp/vpp-api-cli.sock show version
./build-root/install-vpp_debug-native/vpp/bin/vppctl -s /tmp/vpp-api-cli.sock show api dump file /tmp/api-table.master-api-baseline compare
The last CLI hangs in an infinite loop.
Fix the typo which got in during the conversion of _vec_len to read-only:
.@@ -1285,7 +1285,7 @@ extract_name (u8 * s)
. rv = vec_dup (s);
.
. while (vec_len (rv) && rv[vec_len (rv)] != '_')
.- _vec_len (rv)--;
.+ vec_dec_len (rv, 0);
.
Type: fix
Fixes:
8bea589cfe0fca1a6f560e16ca66a4cf199041a2
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I4f895348ae0ebaaba9da97c3a440912d38210f10
Benoît Ganne [Thu, 9 Dec 2021 17:24:21 +0000 (18:24 +0100)]
vlib: disable cpu pinning if not configured
In some environment like when running a lot of functional tests, it can
be useful to run more VPP instances than CPU and let the Linux scheduler
decide what to do. This change disable cpu pinning altogether in the
single-threaded case, provided that no main-core is explicitely
specified in the config
Type: improvement
Change-Id: I8c2f36fdd49c00f9adaaeb4c81aefb27c3420a9b
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Leung Lai Yung [Sat, 9 Apr 2022 10:45:12 +0000 (10:45 +0000)]
gtpu: fix memory leak
Type: fix
Free the old rewrite string before assigning a new rewrite string for the updated new tteid value.
Signed-off-by: Leung Lai Yung <benkerbuild@gmail.com>
Change-Id: I1ec19bce6afda3dfdc31c8724b32ac7b9bc84e89
Renato Botelho do Couto [Thu, 14 Apr 2022 12:03:30 +0000 (09:03 -0300)]
build: Ignore buildinfo file
During deb package build, a .buildinfo file is created at build-root.
Add this to .gitignore.
Type: make
Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
Change-Id: Id86c21e22aa2b9e4b559cfc0bc662de835fa1621
Zachary Leaf [Fri, 25 Jun 2021 13:11:15 +0000 (08:11 -0500)]
ipsec: perf improvement of ipsec4_input_node using flow cache
Adding flow cache support to improve inbound IPv4/IPSec Security Policy
Database (SPD) lookup performance. By enabling the flow cache in startup
conf, this replaces a linear O(N) SPD search, with an O(1) hash table
search.
This patch is the ipsec4_input_node counterpart to
https://gerrit.fd.io/r/c/vpp/+/31694, and shares much of the same code,
theory and mechanism of action.
Details about the flow cache:
Mechanism:
1. First packet of a flow will undergo linear search in SPD
table. Once a policy match is found, a new entry will be added
into the flow cache. From 2nd packet onwards, the policy lookup
will happen in flow cache.
2. The flow cache is implemented using a hash table without collision
handling. This will avoid the logic to age out or recycle the old
flows in flow cache. Whenever a collision occurs, the old entry
will be overwritten by the new entry. Worst case is when all the
256 packets in a batch result in collision, falling back to linear
search. Average and best case will be O(1).
3. The size of flow cache is fixed and decided based on the number
of flows to be supported. The default is set to 1 million flows,
but is configurable by a startup.conf option.
4. Whenever a SPD rule is added/deleted by the control plane, all
current flow cache entries will be invalidated. As the SPD API is
not mp-safe, the data plane will wait for the control plane
operation to complete.
Cache invalidation is via an epoch counter that is incremented on
policy add/del and stored with each entry in the flow cache. If the
epoch counter in the flow cache does not match the current count,
the entry is considered stale, and we fall back to linear search.
The following configurable options are available through startup
conf under the ipsec{} entry:
1. ipv4-inbound-spd-flow-cache on/off - enable SPD flow cache
(default off)
2. ipv4-inbound-spd-hash-buckets %d - set number of hash buckets
(default 4,194,304: ~1 million flows with 25% load factor)
Performance with 1 core, 1 ESP Tunnel, null-decrypt then bypass,
94B (null encrypted packet) for different SPD policy matching indices:
SPD Policy index : 2 10 100 1000
Throughput : Mbps/Mbps Mbps/Mbps Mbps/Mbps Mbps/Mbps
(Baseline/Optimized)
ARM TX2 : 300/290 230/290 70/290 8.5/290
Type: improvement
Signed-off-by: Zachary Leaf <zachary.leaf@arm.com>
Signed-off-by: mgovind <govindarajan.Mohandoss@arm.com>
Tested-by: Jieqiang Wang <jieqiang.wang@arm.com>
Change-Id: I8be2ad4715accbb335c38cd933904119db75827b
Guillaume Solignac [Wed, 13 Apr 2022 13:52:05 +0000 (15:52 +0200)]
crypto-openssl: use getrandom syscall
The sys/random.h header, which provides the getrandom syscall wrapper,
was only added in glibc2.25. To make it compatible with older version,
we can directly call the syscall.
Type: improvement
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: I93c5f8a49c0323511a4e34273f0b3c0e24663bfd
Guillaume Solignac [Wed, 13 Apr 2022 10:03:48 +0000 (12:03 +0200)]
vppinfra: fix GCC 7.3 build error with asm inline
GCC added asm inline in 8.3, so we change asm inline to asm volatile.
Type: fix
Fixes:
d5045e68a782 ("vppinfra: introduce clib_perfmom")
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: I9f7781ba9de66211404348ff477a17059b408a78
Tianyu Li [Tue, 12 Apr 2022 07:05:08 +0000 (15:05 +0800)]
build: fix rpm build nasm not found
Type: make
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I7ac1d0472edf8d48eac21a7b580a06456bf60c30
Tianyu Li [Tue, 12 Apr 2022 03:58:29 +0000 (03:58 +0000)]
vppinfra: fix clang-10 build error with asm inline
clang start to support parse asm inline from clang-11,
Use asm volatile instead.
Type: fix
Fixes:
d5045e68a782 ("vppinfra: introduce clib_perfmom")
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I00e5e19856caaed94e22f8fa6cf4f918483976a4
Damjan Marion [Mon, 11 Apr 2022 16:41:49 +0000 (18:41 +0200)]
vppinfra: vector perf improvements
Type: improvement
Change-Id: I37c187af80c21b8fb1ab15af112527a837e0df9e
Signed-off-by: Damjan Marion <damarion@cisco.com>
Alexander Chernavin [Mon, 11 Apr 2022 13:02:11 +0000 (13:02 +0000)]
ip: fix arc start in ip46-local for local mfib entries
Type: fix
After changes made in
f840880, VRRP IPv6 cannot reply for neighbor
solicitations requesting the link layer address of the configured
virtual address.
VRRP IPv6 enables the vrrp6-nd-input feature in the ip6-local feature
arc for an interface on which a virtual router is configured. When
neighbor solicitations arrive on that interface, ip6-local should start
feature arc walk for that interface and the messages should be processed
by vrrp6-nd-input. The problem is that currently, the feature arc is
started for the interface obtained from the receive DPO that has
interface unset (i.e. max u32) for local mfib entries. Thus, the feature
arc is started not on the interface the messages were received on and
vrrp6-nd-input is not traversed.
With this fix, if interface obtained from the receive DPO is unset, use
RX interface from the buffer to start the ip46-local feature arc.
Also, enable tests of this case for both IPv4 and IPv6 address families
that are currently tagged as extended and not run on every change. They
configure VRRP with priority 255 and are expected to be stable.
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: I11ef3d5a7a986e04431e8613d1510b8666094bd7
Florin Coras [Tue, 12 Apr 2022 14:34:35 +0000 (07:34 -0700)]
hsa: fix coverity warning
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I9cf21ee7ad363dd1af5ca75f07bfe38d8fe749f9
Florin Coras [Tue, 12 Apr 2022 02:28:11 +0000 (19:28 -0700)]
hsa: vcl test client option to close only client
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I45c63e0a7d7179a0f27ca3f093bd3cf7458a12d3
Florin Coras [Tue, 15 Mar 2022 21:24:59 +0000 (14:24 -0700)]
tcp: limit persist segment size if window available
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie1ae401d5105aa42761d3cac5dfbe523f3995c87
Jing Peng [Mon, 11 Apr 2022 20:36:28 +0000 (16:36 -0400)]
tests: fix bihash unit test threads count
In test_bihash_threads, if a test thread fails to be created,
it is still counted towards the total thread count, which could
lead to never-ending test loop. This patch fixes the issue.
Type: fix
Signed-off-by: Jing Peng <pj.hades@gmail.com>
Change-Id: Ic0f1d4dde9c5ea672b52f0e2e49f16d42f982b77
Benoît Ganne [Mon, 11 Apr 2022 08:45:43 +0000 (10:45 +0200)]
teib: use nexthop table id
Use the specified nexthop table id instead of the interface table id.
Type: fix
Change-Id: I61bf61d50d2716fcd9a6e35df4d60222dc4f36d5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Mohsin Kazmi [Fri, 1 Apr 2022 13:42:20 +0000 (13:42 +0000)]
interface: fix the offloads
Type: fix
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I9f3d1a8574b15f09a458baad98c815e087fd60b8
Florin Coras [Sun, 10 Apr 2022 20:34:47 +0000 (13:34 -0700)]
tls: fix connected notifications with no app wrk
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I805131b4e3d0cb2fab1d3bf76db659c67522c2e8
Jing Peng [Fri, 8 Apr 2022 18:19:32 +0000 (14:19 -0400)]
tests: fix bihash unittest error reporting
This patch fixes test_bihash_unittest in two ways:
1. The number of searches, namely tm->search_iter, defaults to 0,
thus disabling the test. This patch changes the default to 1.
2. Test errors are reported by clib_warning() instead of being
returned, thus the caller test/test_bihash.py is never aware of them.
This patch returns the errors constructed by clib_error_return().
Type: fix
Signed-off-by: Jing Peng <pj.hades@gmail.com>
Change-Id: I60e99a829ebe6aa2a56e7a9332cf973afa100311
Mohsin Kazmi [Tue, 5 Apr 2022 13:08:53 +0000 (13:08 +0000)]
devices: refactor fanout support
Type: refactor
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I9e68ecb91f6433f68a8a87dd066f3e369f25a3c9
Damjan Marion [Sun, 10 Apr 2022 09:48:29 +0000 (11:48 +0200)]
build: add clang-14
clang-14 is default for Upcoming Ubuntu 22.04 LTS...
Type: make
Change-Id: I65328d0e90a4c13d5766e51da8b90a8899b773d9
Signed-off-by: Damjan Marion <dmarion@me.com>
Mohsin Kazmi [Fri, 8 Apr 2022 17:49:32 +0000 (17:49 +0000)]
devices: fix the offset for af-packet
Type: fix
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I12b2e53ddb797cc809a2d742d17a1a60edde385d
Matthew Smith [Tue, 5 Apr 2022 18:20:07 +0000 (18:20 +0000)]
linux-cp: fix setting mtu on hardware interfaces
Type: fix
Fixes:
616447c39231
In lcp_router_link_mtu(), either vnet_hw_interface_set_mtu() or
vnet_sw_interface_set_mtu() is called, based on whether this appears to
be a physical interface. The test to determine whether this is true was
incorrect and probably never worked right so vnet_sw_interface_set_mtu()
was always being called. This causes some breakage with Recent changes
to code which manages interface MTUs. Fix the test so the right function
is called.
Change-Id: I1ecccbce37d5a1e53b2349ed40f3d0d27eb03569
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Mohsin Kazmi [Thu, 31 Mar 2022 21:59:15 +0000 (21:59 +0000)]
dpdk: add multi-txq support
Type: improvement
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I9f061a05d947bc2867e1b962bf0522ad344bcc1a
Laszlo Kiraly [Wed, 6 Apr 2022 14:25:32 +0000 (16:25 +0200)]
build: opensuse: remove nasm, change to clang
Type: make
Signed-off-by: Laszlo Kiraly <laszlo.kiraly@est.tech>
Change-Id: I3951be5be95a7fb76f54c4ce0daab0748cb8419c
Dmitry Valter [Fri, 8 Apr 2022 10:08:32 +0000 (10:08 +0000)]
stats: fix vector overrun in expend check
Do not access allocated elements beyond the end of the vector. They are
allocated, but not yet valid both logically (they are at best NULLs) and
according to ASAN.
Type: fix
Change-Id: Iaf43767d6d3bd4c24c7c5a0ba9b3410bbeeb0556
Signed-off-by: Dmitry Valter <d-valter@yandex-team.ru>
Damjan Marion [Wed, 6 Apr 2022 19:16:37 +0000 (21:16 +0200)]
vppinfra: introduce clib_perfmom
Type: improvement
Change-Id: I85a90774eb313020435c9bc2297c1bdf23d52efc
Signed-off-by: Damjan Marion <damarion@cisco.com>
Paul Atkins [Wed, 6 Apr 2022 13:51:21 +0000 (14:51 +0100)]
vppinfra: clib_interrupt_get_next reading unallocated memory
The clib interrupt structure has a couple of fields at the start of
the cacheline, and then in the next cacheline it has a bitmap, which
is then followed by an atomic bitmap. The size of the bitmaps is
based on the number of interrupts, and when the memory is allocated
the number of interrupts needed is used to size the overall block of
memory. The interrupts typically map to pool entries, so if we want
to store 512 entries then we store them in indices 0..511. This
would then take 8 6 4bit words, so each bitmap would be this size
when the struct is allocated.
It is possible to walk over the end of the allocated data with certain
sizes, one of which is 512. The reason this happens with 512 is that
the check to see when to exit the loop is returning when offset is
greater than the value needed to fit all the values. In this case
512 >> 6 = 8. If there had only been 511 entries then the size would
have been 511 >> 6 = 7, and so it would have fitted in the space.
Therefore modify the check to also check that we are not looking into
the memory beyond what we have allocated in the case where the
number of interrupt is one of the boundary values like 512.
Also add a similar check first time round the loop as it is
possible we could have ate same problem there too.
Add a new test file to verify the new code works. The old version
of the code made this test fail when run with the address
sanitizer. Without the sanitiser it tended to pass because the
following memory was typically set to 0 even though it was
uninitialised.
Type: fix
Signed-off-by: Paul Atkins <patkins@graphiant.com>
Change-Id: I2ec4afae43d296a5c30299bd7694c072ca76b9a4
Damjan Marion [Fri, 8 Apr 2022 11:42:41 +0000 (13:42 +0200)]
vppinfra: add bright colors to format_table
Type: improvement
Change-Id: I21de21af6dea9e39df5e912e20e56d878a40659f
Signed-off-by: Damjan Marion <damarion@cisco.com>
Neale Ranns [Fri, 25 Mar 2022 08:34:53 +0000 (08:34 +0000)]
api: Do not assert of short message lengths
Type: improvement
Short message lengths are correctly handled by the code, asserting makes unit tests that verify this behaviour (e.g. test_ip_punt_api_validation) fail/crash with a debug image.
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ib3a377e5d49fde0eee252b92f0e58a8a0d0d83ec
Florin Coras [Wed, 6 Apr 2022 22:10:13 +0000 (15:10 -0700)]
tls http: run config fns after init ones
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia4d8aaafeb3629f421601edffefe9c61c3e69dba
Florin Coras [Thu, 7 Apr 2022 02:05:05 +0000 (19:05 -0700)]
tls: fix session pool realloc on accept
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I68ada775810bb4a4f280962a979605b211562a52
Mohsin Kazmi [Tue, 5 Apr 2022 12:43:13 +0000 (12:43 +0000)]
devices: add cli support for checksum and gso disable
Type: improvement
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I33a29cf11998736347eca5016eee112619d847c1
Damjan Marion [Wed, 6 Apr 2022 10:31:15 +0000 (12:31 +0200)]
vppinfra: add vec_new_heap()
Type: improvement
Change-Id: Iab3d65b6276829ad1e522e66380d1797e37579b8
Signed-off-by: Damjan Marion <damarion@cisco.com>
Mohsin Kazmi [Tue, 5 Apr 2022 12:03:47 +0000 (12:03 +0000)]
devices: add cli support to disable qdisc bypass
Type: improvement
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ie5f2bdb8fb559680bab863a7c24a49360e005b58
Damjan Marion [Wed, 6 Apr 2022 10:06:41 +0000 (12:06 +0200)]
stats: avoid linear search for empty entry
Type: improvement
Change-Id: Ie4cdc6d8906da3d1cd18a8f1d7076283546d3003
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 6 Apr 2022 09:07:35 +0000 (11:07 +0200)]
interface: unregister node counters on interface delete
Type: fix
Change-Id: I2562ae5833b542c29bcd5025a9a6756e5de95a42
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 6 Apr 2022 10:01:47 +0000 (12:01 +0200)]
vppinfra: add MAX macros for clib types
Type: improvement
Change-Id: I1bca733d2a35733275efa46ee0a23bf572365c74
Signed-off-by: Damjan Marion <damarion@cisco.com>
Stanislav Zaikin [Thu, 31 Mar 2022 12:16:28 +0000 (14:16 +0200)]
vlib: clear frame flags on free
Type: fix
Change-Id: If4a7ac244832ef72d82c71b0277bc110b9500537
Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com>
Damjan Marion [Tue, 5 Apr 2022 17:26:51 +0000 (19:26 +0200)]
build: remove nasm
Type: make
Change-Id: I5ee34e9d7156ccdc7a8310e8332347d850459495
Signed-off-by: Damjan Marion <damarion@cisco.com>
Jon Loeliger [Tue, 5 Apr 2022 19:05:38 +0000 (14:05 -0500)]
wireguard: prevent segfault on non-adj packets
An unexpected packet that shows up on a Wireguard interace
that happens not to have a forwarding peer will cause a
segfault trying to index the vector of peers by adjacency.
Rather than segfaulting, recognize a non-adjacent packet
and drop it instead.
This leaves open the question of what _should_ be
happening to, say, IPv6 multicast packets.
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Type: fix
Fixes:
edca1325cf296bd0f5ff422fc12de2ce7a7bad88
Change-Id: Ic0a29e6cf6fe812a4895ec11bedcca86c62e590b
Dastin Wilski [Wed, 30 Mar 2022 12:19:00 +0000 (14:19 +0200)]
dpdk: bump to DPDK v22.03
This patch bumps dpdk version from 21.11 to 22.03.
Type: feature
Signed-off-by: Dastin Wilski <dastin.wilski@gmail.com>
Change-Id: I152a7857378371d3fd26d7473421c2b3113cd3ee
Dastin Wilski [Wed, 30 Mar 2022 12:15:56 +0000 (14:15 +0200)]
dpdk: macros changes for dpdk 22.03
New dpdk version deprecates some macros used by VPP.
This patch changes them to 22.03 version.
Type: improvement
Signed-off-by: Dastin Wilski <dastin.wilski@gmail.com>
Change-Id: Ic362ed318dc1ad88bb682ef13fbd6159171fbaef
Dastin Wilski [Wed, 30 Mar 2022 12:06:44 +0000 (14:06 +0200)]
dpdk: compatibility layer for dpdk 22.03 bump
New version of dpdk changes some macros names.
This patch ensures VPP will be compatible with older dpdk versions.
Type: improvement
Signed-off-by: Dastin Wilski <dastin.wilski@gmail.com>
Change-Id: I3d9736278e70064610a1dcad5f2d2f6eb26e0d4b
Damjan Marion [Sun, 13 Feb 2022 19:08:30 +0000 (20:08 +0100)]
dpdk: fix max frame size
Type: fix
Change-Id: I70f9ec2eb6c9c1494a4ecd56e06898f6162a0e0e
Signed-off-by: Damjan Marion <damarion@cisco.com>
Filip Varga [Thu, 31 Mar 2022 14:12:44 +0000 (16:12 +0200)]
nat: nat44 cli bug fix
Two similar CLI paths "nat44" and "nat44 add interface address"
caused unexpected behavior. If "nat44 add interface address"
command would fail the vlib cli processing function would
call "nat44" handler. This would also clean any previously
set errors from the first command and basically return
same error returned by "nat44" handler for every failed
command that starts with the same path string.
Fixes nat44-ed and nat44-ei plugin.
Change-Id: I1aac85c8ae2932da582a2b78243521d1bf8a0653
Ticket: VPP-2021
Type: fix
Signed-off-by: Filip Varga <fivarga@cisco.com>
Damjan Marion [Tue, 5 Apr 2022 10:40:31 +0000 (12:40 +0200)]
vppinfra: refactor address sanitizer
Type: refactor
Change-Id: I5ca142ec1557d5b5c3806b43553ad9d3b5ea1112
Signed-off-by: Damjan Marion <damarion@cisco.com>
Mohsin Kazmi [Tue, 5 Apr 2022 11:12:33 +0000 (11:12 +0000)]
tap: fix the coverity warning
Type: fix
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I609fb28e58286ff490d12384b03dd713830379b3
Mohsin Kazmi [Tue, 5 Apr 2022 11:28:29 +0000 (11:28 +0000)]
devices: remove redundant code af-packet
Type: refactor
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Id485f525057163582dc7a83f7dab7a8b2e759270
Mohsin Kazmi [Tue, 5 Apr 2022 11:23:17 +0000 (11:23 +0000)]
devices: fix the received blocks counters
Type: fix
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: If7d9c94dcdc32fa66763e18bd3be7d28b2d17946
Benoît Ganne [Tue, 29 Mar 2022 15:29:49 +0000 (17:29 +0200)]
crypto-openssl: use getrandom to reseed openssl
Type: improvement
Change-Id: I84d594d8baaf18056580455f3b2790d0f31b7b0f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Benoît Ganne [Wed, 30 Mar 2022 08:57:17 +0000 (10:57 +0200)]
rdma: bump to rdma-core 39.1
Type: improvement
Change-Id: I638b67cddf2d1b573002b494a555c0b1ab94181f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Benoît Ganne [Mon, 21 Mar 2022 14:02:21 +0000 (15:02 +0100)]
vppinfra: use AVX512 compare for equality testing
This commit only update is_equal flavours to use
_mm512_cmpneq_epi64_mask() but clang-format decided to also reformat the
whole block.
Type: improvement
Change-Id: I530cf91e8bceaf15022556f803b27de4f8583217
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Mohsin Kazmi [Tue, 5 Apr 2022 10:46:39 +0000 (10:46 +0000)]
devices: fix the coverity warnings for af-packet v3
Type: fix
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ie647fb280831af23925c4b5f659f1dade6d37eff
Damjan Marion [Sun, 31 Oct 2021 18:47:23 +0000 (19:47 +0100)]
build: ./configure basic cross-compilation support
$ sudo dpkg --add-architecture arm64
[update APT sources.list]
$ sudo apt install qemu crossbuild-essential-arm64 libssl-dev:arm64 libuuid1:arm64 libnl-3-dev:arm64 libnl-route-3-dev:arm64
$ ./configure -w -a aarch64
$ ninja
$ uname -m
x86_64
$ bin/vpp unix interactive
_______ _ _ _____ ___
__/ __/ _ \ (_)__ | | / / _ \/ _ \
_/ _// // / / / _ \ | |/ / ___/ ___/
/_/ /____(_)_/\___/ |___/_/ /_/
vpp# show cpu
Model name: armv8
Microarch model (family): unknown (implementer 0x55 part 0x32c PASS 89.
1519459600)
Flags: fp asimd aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve
Base frequency: .06 GHz
vpp#
Type: make
Change-Id: Ib8bf2c7e38f109db42225db2e3182ceb8871baaf
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Mon, 4 Apr 2022 20:40:45 +0000 (22:40 +0200)]
vppinfra: make _vec_len() read-only
Use of _vec_len() to set vector length breaks address sanitizer.
Users should use vec_set_len(), vec_inc_len(), vec_dec_len () instead.
Type: improvement
Change-Id: I441ae948771eb21c23a61f3ff9163bdad74a2cb8
Signed-off-by: Damjan Marion <damarion@cisco.com>
Florin Coras [Fri, 18 Mar 2022 19:50:03 +0000 (12:50 -0700)]
udp: use pool safe reallocs
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5bd0b300af07424d1ce4807fa0b17e375001f089
Florin Coras [Tue, 15 Mar 2022 23:27:43 +0000 (16:27 -0700)]
tcp: use safe realloc pool
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I8ba93643236aaa50eeb4755b74821a8c4ca6179b
Vratko Polak [Thu, 17 Mar 2022 17:57:40 +0000 (18:57 +0100)]
interface api: restore order of context value
vl_api_sw_interface_tx_placement_get_t_handler is autoendian.
So (contrary to most other uses) the context is in native order there.
Thus, send_interface_tx_placement_details needs to convert back
before using REPLY_MACRO_DETAILS5 macro.
Type: fix
Fixes:
0d05c0d214ffd326e531bea58f3c971bb9a58252
Change-Id: I00a3734cafa66d7d76c7edaea526a1eae0448ad9
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Florin Coras [Mon, 4 Apr 2022 20:37:10 +0000 (13:37 -0700)]
tls: set client ckpair only for non-test ckp
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7287e40ad95dfe061fd8a7b0e99921d5540e030d
Florin Coras [Mon, 4 Apr 2022 20:59:32 +0000 (13:59 -0700)]
tls: null terminate openssl chiphers
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5d4e68730a75337a2e532e72f366b62d6973235e
Damjan Marion [Mon, 4 Apr 2022 17:43:30 +0000 (19:43 +0200)]
vlib: remove unused fields
Type: refactor
Change-Id: I449fcea92a1c96dd7dd0bcad893060ad1c614351
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Mon, 4 Apr 2022 16:48:11 +0000 (18:48 +0200)]
vlib: improve exec path search
Fixes VPP invocation with relative path, i.e.:
$ bin/vpp unix interactive
Type: improvement
Change-Id: I0278710bb472b92e31389b2d28955c3d33550230
Signed-off-by: Damjan Marion <damarion@cisco.com>
Florin Coras [Mon, 4 Apr 2022 17:10:58 +0000 (10:10 -0700)]
session: use session layer rpc for evts sent to main
Fix race with connects for iperf3 udp test.
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ief725b80047911e87ba24736dc0a60aa8bcdac50
Damjan Marion [Mon, 4 Apr 2022 16:04:28 +0000 (18:04 +0200)]
vlib: fix memory leak in load_one_plugin
Type: fix
Fixes:
500ba9f
Change-Id: I32872a084276d9b38ff07cdccccb746c0212777f
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Mon, 4 Apr 2022 14:49:16 +0000 (16:49 +0200)]
vppinfra: fix alloc and alignment in fifo
Type: fix
Change-Id: Ia9f715f6074c72ff581fba1740273cfebe48c0f1
Signed-off-by: Damjan Marion <damarion@cisco.com>
Mohsin Kazmi [Fri, 25 Mar 2022 14:27:45 +0000 (14:27 +0000)]
devices: add multi-queue support for af-packet
Type: feature
Change-Id: I0f4e6517fcfa07ffb0aba89b159ac1337937a508
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Vratko Polak [Thu, 31 Mar 2022 10:32:10 +0000 (12:32 +0200)]
interface: read only one line in show hardware
Type: fix
Change-Id: I442496585fc24b7458535ad1a1d8db525c258540
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
root [Fri, 1 Apr 2022 09:09:05 +0000 (09:09 +0000)]
svm: Close client shm fd
Type: fix
Signed-off-by: Emmanuel Scaria <emmanuelscaria11@gmail.com>
Change-Id: I41bb6e16735b77efa744b0368eed7dfa9583e960
Emanuele Di Pascale [Tue, 29 Mar 2022 10:29:23 +0000 (12:29 +0200)]
vrrp: add stats support and update API
Add simple counter statistics to VRRP, based on a subset of those
defined in RFC8347.
Add an update API that allows in-place modification of an existing
instance. The method returns a vrrp_index which can be used both for
retrieving statistics and to modify non-key parameters. Also add a
delete method which will take that vrrp_index as parameter.
Type: improvement
Signed-off-by: Emanuele Di Pascale <lele84@gmail.com>
Change-Id: I2cd11467b4dbd9dfdb5aa748783144b4883dba57
Alexander Chernavin [Wed, 30 Mar 2022 13:40:29 +0000 (13:40 +0000)]
dpdk: fix vlan creation on ixgbe
Type: fix
VLAN programming is currently enabled for IXGBE. However, that is only
supported for IXGBE_VF.
With this fix, disable VLAN programming for IXGBE.
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: I37b1d0733988c964d2b0f5a49328effacec1cb6f
Fan Zhang [Thu, 31 Mar 2022 12:50:21 +0000 (13:50 +0100)]
dpdk: fix coverity issue
Type: fix
This patch fixes the following DPDK plugin issue:
CID 253333: Control flow issues (DEADCODE)
The change also includes some cosmetic changes for error
handling.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: I830020bc3ae9a508f3a905f78333fa3ae25ce784
Florin Coras [Thu, 31 Mar 2022 22:42:17 +0000 (15:42 -0700)]
session: leverage new pool functions in safe realloc
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2c264c31d2470b11b94d68411fa8266387319146
Filip Varga [Wed, 23 Feb 2022 23:45:48 +0000 (15:45 -0800)]
nat: VRF routing & FIB improvements
This patch affects how destination fib is choosen during session
creation. Default behavior of choosing fib based on output
interfaces is kept.
Configuration gives you the ability to change default behavior
to direct or restrict traffic between different FIB tables.
NAT specific VRF routing options:
a) keeping communication in the same VRF
b) option to add multiple destination VRFs
c) option to control the resolution order of destination VRFs
TX FIB resolution is based on looking up RX FIB entry in NATs
VRF table and picking the first FIB that resolves
destination address.
Ticket: VPP-2009
Type: improvement
Change-Id: If500c48d7ce3466533ad9581c0847870788fc4fb
Signed-off-by: Filip Varga <fivarga@cisco.com>
Filip Varga [Tue, 15 Feb 2022 19:56:07 +0000 (11:56 -0800)]
nat: nat44-ed cleanup & fixes
Set deprecated option on unsupported API calls.
Cleaned up API calls with deprecated option. Removed
in progress option from long term used API calls.
Removed obsolete/unused nodes, functions, variables.
Fixed set frame queue nelts function. Calling API
would incorrectly not fail even though frame queue nelts
can only be set before first call nat44_plugin_enable.
Moved all formatting functions to _format.c file.
Type: refactor
Change-Id: I3ca16e0568f8d7eee3a27c3620ca36164833a7e4
Signed-off-by: Filip Varga <fivarga@cisco.com>
satna [Fri, 25 Mar 2022 08:16:02 +0000 (13:46 +0530)]
tls: enable host verification by hostname
Type: improvement
Signed-off-by: satna <satbeervarma9596@gmail.com>
Change-Id: I1b1db60fa1a0e47fce273bc07b01887813fd3c48
Damjan Marion [Thu, 31 Mar 2022 13:12:20 +0000 (15:12 +0200)]
vppinfra: vectors with non-default heap
Type: improvement
Change-Id: Ic675ad4edbf27b7230fc2a77f00c90c46d6350c3
Signed-off-by: Damjan Marion <damarion@cisco.com>
Florin Coras [Wed, 30 Mar 2022 20:50:19 +0000 (13:50 -0700)]
vlib: add support for workers sync
Adds api that allows workers to synchronize through main thread.
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1e75e2fb5144d397d19b13c4dfc7e937f11c044c
Damjan Marion [Thu, 31 Mar 2022 15:56:58 +0000 (17:56 +0200)]
stats: use vlib_stats_validate in collector
Type: refactor
Change-Id: Ib2bf9f11209eb310b289b3202b2beeccc3637df0
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Mon, 14 Mar 2022 12:04:38 +0000 (13:04 +0100)]
stats: convert error counters to normal counters
Change-Id: I9794da718805b40cc922e4f3cf316255398029a9
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Florin Coras [Thu, 31 Mar 2022 14:57:47 +0000 (07:57 -0700)]
session: fix coverity warning
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6ddb172d7b4f0ba06b0117d71853a22702a3466b
Florin Coras [Wed, 30 Mar 2022 23:08:25 +0000 (16:08 -0700)]
vcl: fix api detach if attach failed
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idd1df83bb01951c2455b23c08e3cc1fcd9b91064
Dastin Wilski [Thu, 31 Mar 2022 09:55:09 +0000 (11:55 +0200)]
crypto: drop the frame if there is no handler
If async engines are disbaled and async is turned on vpp tries to
enqueue frame with nonexisting handler which leads to segfault.
This patch checks for handler and drops the frame in case it doesn't
exist.
Type: fix
Signed-off-by: Dastin Wilski <dastin.wilski@gmail.com>
Change-Id: I67211867ee29dc41cc9f0733e8e0b3ea86677f85
Saravanan Murugesan [Mon, 28 Feb 2022 14:24:11 +0000 (19:54 +0530)]
tls: support to reinitialise ca_chain wo restart
Type: improvement
Signed-off-by: Saravanan Murugesan <sarmurug@cisco.com>
Change-Id: I90e90678ae6586019cc842f9d504d53991cfabe4
Neale Ranns [Fri, 25 Mar 2022 08:51:58 +0000 (08:51 +0000)]
ip: Reference count the enabling the punt feature
Type: fix
otherwise punt features are applied multiple times to the same packet if enabled multiple times
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: If0cbd9065275f68a10fd6d35e4f7a7c7508245e0
Damjan Marion [Fri, 18 Mar 2022 23:07:52 +0000 (00:07 +0100)]
vppinfra: vector allocator rework
- support of in-place growth of vectors (if there is available space next to
existing alloc)
- drops the need for alloc_aligned_at_offset from memory allocator,
which allows easier swap to different memory allocator and reduces
malloc overhead
- rework of pool and vec macros to inline functions to improve debuggability
- fix alignment - in many cases macros were not using native alignment
of the particular datatype. Explicitly setting alignment with XXX_aligned()
versions of the macro is not needed anymore in > 99% of cases
- fix ASAN usage
- avoid use of vector of voids, this was root cause of several bugs
found in vec_* and pool_* function where sizeof() was used on voids
instead of real vector data type
- introduce minimal alignment which is currently 8 bytes, vectors will
be always aligned at least to that value (underlay allocator actually always
provide 16-byte aligned allocs)
Type: improvement
Change-Id: I20f4b081bb13bbf7bc0ace85cc4e301787f12fdf
Signed-off-by: Damjan Marion <damarion@cisco.com>
Mauro Sardara [Tue, 22 Mar 2022 17:53:46 +0000 (17:53 +0000)]
udp: fix inner packet checksum calculation in udp-encap
When computing the inner packet checksum, the code wrongly
assumes that the IP version of the inner packet is the
same of the outer one. On the contrary, it is perfectly
possible to encapsulate v6 packets into v4 and viceversa,
so we need to check the IP format of the inner header before
calling vnet_calc_checksums_inline.
Ticket: VPP-2020
Type: fix
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: Ia4515563c164f6dd5096832c831a48cb0a29b3ad
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Florin Coras [Tue, 29 Mar 2022 21:47:29 +0000 (14:47 -0700)]
hsa: refactor echo clients
Type: refactor
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I30cc31c438d357d48576fba84e54809455960eaa
sarmurug [Tue, 29 Mar 2022 12:54:44 +0000 (18:24 +0530)]
tls: Support for client certificate-key pair
Type: improvement
Signed-off-by: sarmurug <sarmurug@cisco.com>
Change-Id: Ibbfe827b9c4c603a6fe7cc49970a46bd683194ce
Dmitry Valter [Tue, 29 Mar 2022 15:13:26 +0000 (15:13 +0000)]
vlib: fix unaligned runtime_data
Align runtime_data to 8 bytes to avoid alignment issues with any
pointers in runtime_data located structures.
Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.ru>
Change-Id: I9cb1b73595e654a4b15c45f87b43fa6cfbcb6e51
Damjan Marion [Tue, 29 Mar 2022 14:37:30 +0000 (16:37 +0200)]
dpdk: make log pipe non-blocking on both sides
Type: fix
Change-Id: I857403b9d93ee4c17f2dd5ac8e6dafd66260a252
Signed-off-by: Damjan Marion <damarion@cisco.com>
Vladislav Grishenko [Sun, 20 Mar 2022 10:55:25 +0000 (15:55 +0500)]
linux-cp: fix tap interface attrs in case the sw pool realloc'd
Creating tap interface / sub interface causes allocation of a new
software interface with possible sw interface pool reallocation.
In such case accessing L3 MTU and interface flags by obsolete sw
pointer is UAF.
Instead, keep desired tap interface MTU value before sw intreface
creation and refetch sw pointer right before sw flags inheritance.
Type: fix
Fixes:
b89c1ddcb3b4f9138ca3ebefb2115f896ff3e1bd
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I21ea46d146d11060bb9bedc77377ab17ae9e22e8