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
Matthew Smith [Wed, 23 Mar 2022 22:11:32 +0000 (22:11 +0000)]
vnet: set frame overhead at interface registration
Type: fix
Fixes:
1cd0e5dd533f
In vnet_eth_register_interface(), max frame size was being used where
frame overhead was intended.
Change-Id: I6e6de25e2d616caaf35730ab3d15235ec679ebdd
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Damjan Marion [Tue, 29 Mar 2022 01:07:34 +0000 (03:07 +0200)]
crypto-openssl: fix seed calculation
Type: fix
Fixes:
91f17dc
Change-Id: I860b6d5d5e9cf47d84fde0a2c92be43125038694
Signed-off-by: Damjan Marion <damarion@cisco.com>
Alexander Chernavin [Mon, 14 Feb 2022 12:59:28 +0000 (12:59 +0000)]
linux-cp: handle ipv4 routes when link goes down on subif
Type: improvement
Currently, the plugin can monitor link state changes on hardware
interfaces for which a linux-cp pair exists. When the link goes down on
one of the hardware interfaces, the plugin processes IPv4 routes that
resolve through that interface according to the configurations:
del-static-on-link-down and del-dynamic-on-link-down.
The problem is that link state changes are not signaled for
subinterfaces and the code that handles IPv4 routes is not triggered.
When the link on a hardware interface goes down, it implies
that subinterfaces added to that interface also will have the link in
the down state.
With this change, when the link goes down on a hardware interface,
iterate over subinterfaces added to the interface and apply the same
logic of routes processing as for hardware interfaces.
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: I97337d2e328437c73f2d99a00737768778f197a1
Alexander Chernavin [Fri, 11 Feb 2022 15:25:40 +0000 (15:25 +0000)]
linux-cp: add support for table flush if multiple interfaces
Type: improvement
lcp_router_table_flush() is used to remove routes from the given route
table if they are resolved through the given interface with specified
FIB source. Currently, if you need to remove routes from a route table
that are resolved through one of the interfaces from a vector, the
function has to be executed for every interface from the vector. Every
execution walks the route table again.
With this change, lcp_router_table_flush() accepts a vector of
interfaces. Thus, the function can walk a single route table once and
delete routes that resolve through one of the interfaces from the
vector.
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: I6d99384064d279dea24bb4dc1790a1af943be41c
Ray Kinsella [Thu, 3 Mar 2022 16:40:30 +0000 (16:40 +0000)]
perfmon: fix order in cmakelists.txt
Fix ordering in CMakeLists.txt
Type: refactor
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I8e71e4fbc048a80c4b250c2a66cfd8a522bde5f4
Benoît Ganne [Wed, 17 Nov 2021 16:55:50 +0000 (17:55 +0100)]
perfmon: fix non-NULL terminated C-string
format() expects a NULL-terminated C-string as format string.
Type: fix
Change-Id: Ib428cf2debbf98850eed512907175f8ae8ba3c04
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Jakub Grajciar [Mon, 4 Jan 2021 10:28:33 +0000 (11:28 +0100)]
libmemif: refactor examples
- icmp_responder: responds to ICMPv4 and ARP requests
- loopback: connects two interfaces and sends a
verification packet from master memif to slave memif
where it is looped back
- loopback (reverse path): reverses direction of packet
in loopback application (slave memif to master memif)
Type: refactor
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ie90aaa3367269408efb6c5d538ad5aa827432238
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Pim van Pelt [Sun, 27 Feb 2022 23:15:22 +0000 (23:15 +0000)]
linux-cp: Fix API response
* Correct endianness issue
* lip_namespace is a vector not a string
* Provide null termination to avoid unpack() failures in the client
Responses in the python API now look like:
lcp_itf_pair_details(_0=328, context=3, phy_sw_if_index=1,
host_sw_if_index=3, vif_index=19, host_if_name='ice0',
host_if_type=<vl_api_lcp_itf_host_type_t.LCP_API_ITF_HOST_TAP: 0>,
namespace='dataplane')
lcp_itf_pair_details(_0=328, context=3, phy_sw_if_index=2,
host_sw_if_index=4, vif_index=20, host_if_name='ice1',
host_if_type=<vl_api_lcp_itf_host_type_t.LCP_API_ITF_HOST_TAP: 0>,
namespace='dataplane')
lcp_itf_pair_details(_0=328, context=3, phy_sw_if_index=5,
host_sw_if_index=6, vif_index=21, host_if_name='ice0.1234',
host_if_type=<vl_api_lcp_itf_host_type_t.LCP_API_ITF_HOST_TAP: 0>,
namespace='dataplane')
Type: fix
Signed-off-by: Pim van Pelt <pim@ipng.nl>
Change-Id: If4bf06a8b70977676ec7f5b1413cee6cc9d1714a
Damjan Marion [Mon, 28 Mar 2022 13:22:00 +0000 (15:22 +0200)]
crypto-native: avoid overflow load on data
Type: improvement
Change-Id: I5317afa02fa1525a7d8df595b56eb6546ccded57
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Sun, 27 Mar 2022 23:47:33 +0000 (01:47 +0200)]
vlib: use pthread_attr_setstack() to set thread stack
Type: improvement
Change-Id: I4c7f2f63651df4362ce1e0e36d885fedf55595c6
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Fri, 25 Mar 2022 23:57:50 +0000 (00:57 +0100)]
vppinfra: avoid mem overflow in hash_memory()
Change-Id: Ic81aafd5f378de06e5ea8cdd6a59e07ff1a7afca
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
Vladislav Grishenko [Wed, 12 Jan 2022 10:22:23 +0000 (15:22 +0500)]
ip: add barrier sync, ip4_ply_pool expand case
ply_create() is not thread safe when the ip4_ply_pool expands.
Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: Ie11cc8b1ba587d5e9239a60f4e288492da61368e
Dmitry Valter [Sat, 26 Mar 2022 15:43:14 +0000 (15:43 +0000)]
tests: fix core file message
Prevent crashing on nonexistent VPP binary path class member when creating
testsuite core message.
Type: fix
Fixes:
b23ffd7ef216463c35b75c831e6a27e58971f4ec
Signed-off-by: Dmitry Valter <d-valter@yandex-team.ru>
Change-Id: Ib9b3dc8c69317e6561e5404bbdcbf672e417cbcd
Dmitry Valter [Sat, 26 Mar 2022 17:42:25 +0000 (17:42 +0000)]
linux-cp: fix name formatting
Format host interface name as vector rather than c-string.
Otherwise non-null-terminated vector overrun triggers ASAN.
Type: fix
Fixes:
1705a6baefe205bb6792b547c7376eee3f328a71
Signed-off-by: Dmitry Valter <d-valter@yandex-team.ru>
Change-Id: Ib204e57ee17c7ed3bfeb568dcdd834d7d7519102
Florin Coras [Sat, 26 Mar 2022 08:25:02 +0000 (01:25 -0700)]
session: simplify safe pool realloc
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1c55c054fea6c6886d8287a9b6e264a308f89504
Florin Coras [Sat, 26 Mar 2022 01:53:09 +0000 (18:53 -0700)]
hsa: echo client connects as rpc
Do connects in an session layer rpc instead of doing cli process sleeps.
Performance with 4 workers goes from ~120k/180k first run/warmed up to
~135k/240k
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id184913e9898f8db099e29a605f3a9b1fc67be63
Damjan Marion [Fri, 25 Mar 2022 16:24:26 +0000 (17:24 +0100)]
build: update .clang-format
Type: make
Change-Id: Iedf7af3f070cc3875f44adba38523b72f5e5ab43
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Fri, 25 Mar 2022 16:41:16 +0000 (17:41 +0100)]
crypto-native: avoid mem overflow when loading IV
Type: improvement
Change-Id: I946d91e67c332ecac0b09d50980529b9d4e74f9c
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Fri, 25 Mar 2022 16:13:59 +0000 (17:13 +0100)]
vppinfra: add vec128_t, vec256_t and vec512_t types
Convenient for type conversion
Type: improvement
Change-Id: I35a770e06e6318fb4249b70021ed6f6c93b07162
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Fri, 25 Mar 2022 15:20:16 +0000 (16:20 +0100)]
l2: avoid overflow read of mac address
Type: improvement
Change-Id: I99d2c69ede39b3ba5604e1811ce12209c47f5caf
Signed-off-by: Damjan Marion <damarion@cisco.com>
Nathan Skrzypczak [Thu, 10 Mar 2022 11:42:01 +0000 (12:42 +0100)]
docs: Add getting started with GoVPP
Type: docs
Change-Id: I8e739ccf78b8dadf81cf4a4c32407355b2576942
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Nathan Skrzypczak [Wed, 23 Mar 2022 17:32:52 +0000 (18:32 +0100)]
docs: Fix macos clang-format docs
Type: docs
Change-Id: Iaa2f5e2bb92342c1612cb3addbb9bfdc26623d99
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Alexander Chernavin [Wed, 2 Mar 2022 16:12:49 +0000 (16:12 +0000)]
linux-cp: handle ipv4 routes when link goes down
Type: improvement
Currently, when the link goes down on an interface, routes that resolve
through that interface and created with Nexthop API are removed by the
kernel. However, IPv4 routes remain in the FIB because the kernel
doesn't send any notifications about that.
And for the plugin working with user-space applications that create
routes in the kernel using Nexthop API there should be a mechanism to
synchronize the FIB and the kernel in this case.
With this change, add two new startup configuration options to the
plugin to be able to control what should happen with static and dynamic
routes managed by the plugin on link down:
- del-static-on-link-down (disabled by default, delete routes created
with the linux-cp static FIB source on link down),
- del-dynamic-on-link-down (disabled by default, delete routes created
with the linux-cp dynamic FIB source on link down).
Then, monitor link state changes on interfaces for which a linux-cp pair
exists. If the link goes down on one of the interfaces, process routes
that resolve through that interface according to the new configurations.
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: I0fbaeeca3f3d1fcd22e8eebb08a0a4a3d0dfe5b8
Damjan Marion [Thu, 24 Mar 2022 23:05:53 +0000 (00:05 +0100)]
build: print compiler version
Type: make
Change-Id: I1bad5f84797a1bfeb41420f408540604d461f440
Signed-off-by: Damjan Marion <damarion@cisco.com>
Vladislav Grishenko [Fri, 19 Nov 2021 17:53:41 +0000 (22:53 +0500)]
fib: fix ip6-ll fib selection for non-ethernet interfaces
Fixes case when packet to link-local address is received over
gre/mpls or other non-ethernet interface and ip6-ll fib for it
is undefined.
If by a chance ip6-ll fib index is valid, packet will be passed
to some ip6 fib with possibilities to be sent out over unrelated
interface or be looped again into ip6-link-local dpo till oom
and crash.
Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: Ie985f0373ea45e2926db7fb0a1ff951eca0e38f6
Mohsin Kazmi [Fri, 25 Mar 2022 00:33:27 +0000 (00:33 +0000)]
devices: fix high vector rate per dispatch
Type: fix
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ibd23648483b38696271154237e81081480bb16e0
Florin Coras [Fri, 25 Mar 2022 00:02:08 +0000 (17:02 -0700)]
session: reorganize local port allocation
Type: refactor
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5bbf8d584efdec57908c61f8626bcc81590401b3
Klement Sekera [Thu, 24 Mar 2022 17:01:16 +0000 (18:01 +0100)]
misc: update my email-address
Type: fix
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: I756bff7ecedf36cc685a20ba63c9d5229fc2ff32
Paul Atkins [Thu, 24 Mar 2022 11:26:16 +0000 (11:26 +0000)]
bfd: use local error index when incrementing node counters
When incrementing node counters with vlib_node_increment_counter
the local error index should be passed in. vlib_node_increment_counter
adds the local index to the nodes base index to get the counter to
write to. If we pass in the global counter index, the offset gets
added again in the fn, and we then potentially write into memory that
is not part of the counter vector.
Type: fix
Signed-off-by: Paul Atkins <patkins@graphiant.com>
Change-Id: I43be33a51bcb52d520495d326b971c1d848d96b5
Florin Coras [Wed, 23 Mar 2022 23:35:05 +0000 (16:35 -0700)]
session: safe reallocs for transport endpoint pool
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6c86d0691bd0594d8b2c05d83d004be1aa8c5e21
Neale Ranns [Thu, 24 Mar 2022 12:28:42 +0000 (12:28 +0000)]
ip: The check for 'same packet' must include the FIB index
Type: fix
otherwise if two packets arrive with the same source address but from different VRFs, then they are treated as the same and they use the same LB and thus share the same fate. but the lookup, when done, results in two different LBs, and hence the fate can be different.
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Id6e16f7c577a561d9ddd7066339fa4385361d07f
Alexander Chernavin [Sat, 5 Mar 2022 15:51:54 +0000 (15:51 +0000)]
ip6-nd: stop sending RA by default
Type: improvement
Currently, RA message sending is enabled by default - both periodic and
in response to RS message. However, RFC 4861 section 6.2.1 says the
following:
Note that AdvSendAdvertisements MUST be FALSE by default so that a
node will not accidentally start acting as a router unless it is
explicitly configured by system management to send Router
Advertisements.
With this change, RA message sending is disabled by default and
"test_ip6.TestIPv6.test_rs" updated appropriately.
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: I2a8865199cb665c59268504aefe2976e5ee96dc2
Neale Ranns [Fri, 18 Mar 2022 13:05:09 +0000 (13:05 +0000)]
mpls: Set the MTU field in the frag-needed ICMP when doing MPLS fragmentation
Type: fix
The reported MTU should include the MPLS label overhead
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I3df6d2e0b13f49701e187a766a157498dcaafbc0
Benoît Ganne [Thu, 24 Mar 2022 12:39:22 +0000 (13:39 +0100)]
crypto-native: fix index in VAES aes-cbc encrypt
Type: fix
Change-Id: Id7ae0d4c53cbca3785964f0bef92e9cd589d4ce9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Andrew Yourtchenko [Thu, 24 Mar 2022 11:45:10 +0000 (11:45 +0000)]
build: set OS_ID_LIKE on to be OS_ID on Debian proper
OS_ID_LIKE from /etc/os-release is used to determine
the type of packaging. On Debian it ends up being empty,
so the "ninja package" does not work for out of tree plugin
builds.
Solution: if OS_ID_LIKE is not set, set it to OS_ID
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I077d4fdb509ea94b187d11391b1f49edb94c4e30
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Paul Atkins [Thu, 10 Mar 2022 15:32:56 +0000 (15:32 +0000)]
dpdk: enable int mode for virtio
The way of specifying which interface supports what has changed.
Re-add support for adaptive mode in virtio.
Type: fix
Signed-off-by: Paul Atkins <patkins@graphiant.com>
Change-Id: I2f8ffa6311a4081b93fb08a7e92408b8bffbae64
Dave Wallace [Thu, 24 Mar 2022 01:29:54 +0000 (21:29 -0400)]
build: exclude dlmalloc.[ch] from checkstyle verification
- dlmalloc.[ch] is an imported open source library which
somehow manages to choke clang-format-diff to the point
of consuming ~1 minute to run against a single character
diff.
Type: make
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I16c6d6da664da8634aa682dce9d2120072626730
Neale Ranns [Wed, 23 Mar 2022 14:51:57 +0000 (14:51 +0000)]
fib: Fix crash when removing a covering prefix
Type: fix
When a covering entry is removed from the table, the covered entries first see it 'updated' and then 'removed'.
the crash occurs because the covered prefixes share (simple pointer copy) the covereds hash table of path extensions. During the cervers deletion this hash table has been removed and the update of the covered crashes when recaluationg forwarding becuase it uses the free'd hash.
Fix is to refetch the shared hash table (which is NULL) when the covered is updated.
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Icefca9d7b21da975111d0e974d75f663fc0cc00c
Paul Atkins [Thu, 10 Mar 2022 16:20:47 +0000 (16:20 +0000)]
dpdk: copy the enable_rxq_int flag from driver to conf
The support for interrupt mode is not being respected as it is not
copied into the driver conf, which is what is checked when trying to
enable it.
Type: fix
Signed-off-by: Paul Atkins <patkins@graphiant.com>
Change-Id: I2e502306e27bd98f8037d1a0a396201e099b50b5
Benoît Ganne [Wed, 23 Mar 2022 18:42:41 +0000 (19:42 +0100)]
classify: fix typo in AVX-512 find entry
Type: fix
Fixes:
26bc9f3c855496fb56f5fc648f75a299d4d539f8
Change-Id: Idab52bf856c03ded7b181608c3db1313aa2e33de
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Jing Peng [Fri, 4 Mar 2022 22:43:50 +0000 (17:43 -0500)]
vlib: send full error message to syslog
Currently the last character of the error message string
is temporarily changed to a null byte '\0' before the string
is sent to syslog(3), resulting in confusingly incomplete log
entries.
This patch changes the syslog format to "%.*s" so that the
maximum number of characters to be printed could be controlled.
Type: improvement
Signed-off-by: Jing Peng <pj.hades@gmail.com>
Change-Id: I1bd6295c19b51b962a3d8ee3016cd91ffb2a4eaf
Mohsin Kazmi [Tue, 22 Mar 2022 23:17:46 +0000 (23:17 +0000)]
devices: add tx trace for af-packet
Type: improvement
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ib96ee54eaf967bf435d6da910a6b582e87fbedc0
Mohsin Kazmi [Tue, 22 Mar 2022 21:40:04 +0000 (21:40 +0000)]
devices: add support for offloads
Type: improvement
This patch adds support for:
1) GSO
2) checksum offload
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ib00629888c62da04d58db36ce021993769e736c9
Mohsin Kazmi [Fri, 18 Mar 2022 16:58:31 +0000 (16:58 +0000)]
devices: af-packet v3 support
Type: feature
CPU usage ~20% less than v2.
Performance improvement 20% more than v2.
High vector rate.
Change-Id: I24bc594200f42664b59d07b44d44578e61068bbc
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Damjan Marion [Wed, 23 Mar 2022 17:53:29 +0000 (18:53 +0100)]
vppinfra: deprecate clib_mem_is_vec
Use of clib_mem_is_heap_object is not reliable enough for production use
as it relies on just few bytes of memory allocator chunk header.
Type: improvement
Change-Id: I48c8adde8b6348b15477e3a015ba515eb7ee7ec2
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 23 Mar 2022 16:36:56 +0000 (17:36 +0100)]
vppinfra: change vlib_register_node so it takes format string for node name
This allows specifying both c string and vector for node name
and removes need for crafting temporary string.
Type: improvement
Change-Id: I0b016cd70aeda0f68eb6f9171c5152f303be7369
Signed-off-by: Damjan Marion <damarion@cisco.com>
Tianyu Li [Tue, 22 Mar 2022 09:41:18 +0000 (17:41 +0800)]
dpdk: fix rx/tx burst function name
Type: fix
Fixes:
65105c95fe03 ("dpdk: improve logging")
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I69d616c7e6e7b5395ebf083b1ac5c3e85f99bbdd
Benoît Ganne [Mon, 21 Mar 2022 14:01:41 +0000 (15:01 +0100)]
vppinfra: fix bihash key comparison for 512-bits vectors
bihash keys are less than 64-bytes, do not overflow.
Type: fix
Change-Id: Ic55407eb9ccca38058f7e62b363ec05c8445fbcb
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Damjan Marion [Wed, 23 Mar 2022 15:59:23 +0000 (16:59 +0100)]
vlib: avoid use of vector of voids
Type: fix
Change-Id: I76e28854db8a1e9134c816c0c5d81b031dc4e27d
Signed-off-by: Damjan Marion <damarion@cisco.com>
Nathan Skrzypczak [Wed, 23 Mar 2022 17:08:53 +0000 (18:08 +0100)]
ip: Add unformat for flow_hash_config
Type: improvement
This also makes the is_white_space function
public
Change-Id: Ifc1c0d4509f3ecae14f09bb5fa7a2eea33c49b09
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Neale Ranns [Thu, 17 Mar 2022 17:27:31 +0000 (17:27 +0000)]
vnet: Remove the unused fields from opaque2
Type: refactor
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ibb6d19de053c306e9758dbfa827ab7bcab5de856
Vladislav Grishenko [Wed, 29 Dec 2021 09:30:32 +0000 (14:30 +0500)]
vlib: mitigate outdated new cli session events
Possible races while concurrent additon to the new sessions vector
in a one process and remove from it in an another need to be avoided.
Let the vector be changed in the new session process function only.
Also cli_file_pool element may be freed already at the new session
event arrive timepoint, still causing unexpected cli banner for
noninteracive cli sessions.
Type: fix
Fixes:
17a67218587d40541ff522c6a86f354720481fbb
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I022d16dd3aad9c9330834d35c58938f04b015b08
Vladislav Grishenko [Sat, 25 Sep 2021 16:00:59 +0000 (21:00 +0500)]
vlib: fix memory leak on process nodes reforking
The processes vector leaked on reforking and needs to be
freed before recloning from main node processes.
Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: Id69bc3fd42e2efacfcd521f98e6e51a9c712fef5
Vladislav Grishenko [Sun, 20 Mar 2022 21:21:42 +0000 (02:21 +0500)]
vlib: leave SIGCONT signal with its default handler
Systemd always sends SIGCONT after KillSignal, to ensure that even suspended
tasks can be terminated cleanly. However, the default action of SIGCONT
handler in VPP such as unix_signal_handler() is process termination with
coredump, what is not really desired. So, leave it alike SIGSTOP with its
default handler.
Type: feature
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I54c06d21669ec3c709322d746db9e28448c31bb8
Benoît Ganne [Fri, 4 Mar 2022 16:17:04 +0000 (17:17 +0100)]
api: better segregate client and server code
- move memory and server specific vl_msg_api_handler_with_vm_node()
to memory server code only
- keep api_global_main static
Apart from being cleaner, this also helps avoiding symbols conflict
when both client and server libs are loaded in the same process, as is
done by the prom plugin.
Those symbols conflict confuse ASan and can be nasty to debug.
Type: improvement
Change-Id: Iaf58596cc753ad8d3fedd8d65c4bf480ac129c2c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Damjan Marion [Wed, 23 Mar 2022 12:13:41 +0000 (13:13 +0100)]
perfmon: null-terminate string
Type: fix
Change-Id: I43ebb2c2922f3b8b8eddf26ccdf044f31d7b7a10
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 23 Mar 2022 15:35:18 +0000 (16:35 +0100)]
stats: fix crash due to pointer taken before validate
Type: fix
Change-Id: Iee9eab18da142bfe0645761deea13b0fe911a43b
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 23 Mar 2022 13:53:51 +0000 (14:53 +0100)]
vppinfra: deprecate vppinfra/graph.[ch]
Type: refactor
Change-Id: Iba0466b60354955ba73f851435a7127435b7066d
Signed-off-by: Damjan Marion <damarion@cisco.com>
Benoît Ganne [Wed, 23 Mar 2022 13:17:26 +0000 (14:17 +0100)]
crypto-native: fix dst index typo in VAES
Type: fix
Change-Id: Ib025d8c1bc9bd651b6448d6a41fd1efa6f0b7362
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Florin Coras [Tue, 15 Mar 2022 04:17:25 +0000 (21:17 -0700)]
session: use safe realloc for pools
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I313c916d268c4b2b448b93e90bc67da341b803e3
Filip Tehlar [Tue, 22 Feb 2022 15:19:20 +0000 (15:19 +0000)]
tests: add http tps test
Type: test
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I56a585a8a1f588e682552913cfbdd4551e057ead
Dave Wallace [Thu, 17 Mar 2022 21:44:35 +0000 (17:44 -0400)]
build: remove clang-format-10
- No longer used now that ubuntu-18.04 is deprecated.
- Change default to clang-format-11 in checkstyle.sh
Type: make
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I202244563738417bf4ae5b22fc8e2804bff2d25f
Mohsin Kazmi [Thu, 17 Mar 2022 12:59:44 +0000 (12:59 +0000)]
memif: fix the maxmimum number of txqs
Type: fix
With multi-txq in VPP, user should be able to create
more txqs than vpp threads. MEMIF_MAX_M2S_RING should
be defined to 256 instead of number of vpp threads.
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I337c3a5ea691470815653ff2dbfa862bb324b240
Vladislav Grishenko [Tue, 26 Oct 2021 19:07:01 +0000 (00:07 +0500)]
fib: refetech the adj after the walk in case the pool realloc'd
Follow
e3aeb38fa82b77ae84643f5140d9674056b6b5ca
Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I743911cacc026af5da392d26eaf47ab83ea1de99
Klement Sekera [Fri, 18 Feb 2022 16:23:33 +0000 (16:23 +0000)]
build: fix clang-format-diff[.py] detection
Fix clang-format-diff autodetection error in case of non-standard
clang-format-diff path. Also allow finding clang-format-diff.py in
non-standard location.
Type: improvement
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: I3cb76aa152a8245e62db62f5fe2ba96b1ff86428
Klement Sekera [Thu, 10 Mar 2022 10:47:45 +0000 (11:47 +0100)]
tests: fix DEBUG=attach functionality
Make make test-start-vpp-in-gdb work again.
Fix incorrect temp directory when using DEBUG=attach.
Type: fix
Fixes:
b23ffd7ef216463c35b75c831e6a27e58971f4ec
Change-Id: Ie98b637acbbe0221606ccdc7b54f63885e5951a4
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Damjan Marion [Mon, 21 Mar 2022 20:08:00 +0000 (21:08 +0100)]
stats: fix vlib_stats_validate_will_expand_internal
Type: fix
Change-Id: If4c0b23aaa4fc57c0783efcbe349aba5e5885b30
Signed-off-by: Damjan Marion <damarion@cisco.com>
Florin Coras [Mon, 21 Mar 2022 17:38:01 +0000 (10:38 -0700)]
session: linked list of events to be handled by main
Minimize amount of rpcs from first worker to main
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3794ff028a17d18b7bff69ede2b62e1e2d45ae77
Francesco Lombardo [Fri, 30 Jul 2021 13:54:01 +0000 (15:54 +0200)]
sr: fix srv6 definition of behavior associated to a LocalSID
The behavior associateted to a LocalSID accordig to the definition should be u8 instead of u16;
Type: fix
Signed-off-by: Francesco Lombardo <franclombardo@gmail.com>
Change-Id: I6dd60d5facc1c3f20900cb393619349e82eef38c
Signed-off-by: Francesco Lombardo <franclombardo@gmail.com>
Damjan Marion [Mon, 21 Mar 2022 14:06:57 +0000 (15:06 +0100)]
vppinfra: use clib_mem_alloc
Type: refactor
Change-Id: I26a2a410f8f4070d10696f796d5887842cad3916
Signed-off-by: Damjan Marion <damarion@cisco.com>
Jon Loeliger [Thu, 10 Mar 2022 17:23:27 +0000 (11:23 -0600)]
wireguard: dont stacksmash bad peer base64 keys
Just like commit
252647482b24bb3474e8f13bc86100718176832f
did for Wireguard interface keys, prevent stack smashing
the peer keys.
Integer math on 32 bytes of base64 data might yield 33 bytes
of data in some poorly formed user input of private key values.
Rather than smashing the stack (detected) and aborting, simply
allow for the possible yet irrelevant 33-rd byte of data.
Type: fix
Fixes:
edca1325cf296bd0f5ff422fc12de2ce7a7bad88
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Change-Id: I9f77b3faaaa01d3123b356c958db60c87238db9c
Jon Loeliger [Wed, 2 Mar 2022 20:26:56 +0000 (14:26 -0600)]
wireguard: improve peer dump details
- Add peer_index, table_id, and keep-alive.
- Fix some lingering cut-n-paste issues in the API file.
Type: improvement
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Change-Id: I6fc0729ba0268bbcda0248f680979c44e68b6b0c
Nathan Skrzypczak [Thu, 2 Dec 2021 13:40:06 +0000 (14:40 +0100)]
vppinfra: add new bihash exports
This adds two new exported functions
for the clib_bihash
* clib_bihash_add_with_overwrite_cb allowing
to pass a callback to be called on overwriting
a key with bucket lock held.
* clib_bihash_add_del_with_hash doing an add_del
with a precomputed hash.
Type: feature
Change-Id: I1590c933fa7cf21e6a8ada89b3456a60c4988244
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Filip Tehlar [Fri, 18 Mar 2022 11:44:25 +0000 (11:44 +0000)]
hsa: add support for SAPI in vpp_echo
Type: feature
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: If24a43b7f79e05092306562c192de03994dec550
Damjan Marion [Fri, 18 Mar 2022 14:48:12 +0000 (15:48 +0100)]
vppinfra: deprecate vec numa macros
More generic vector heap code coming in another patch...
Type: refactor
Change-Id: I2327128fb3aba9d5d330f46a35afec32e1e3942e
Signed-off-by: Damjan Marion <damarion@cisco.com>
Andrew Yourtchenko [Fri, 18 Mar 2022 17:05:53 +0000 (17:05 +0000)]
tests: fix the RND_SEED parsing
The random seed is not an integer, so the current code does not allow reproducing a test run by running e.g.
RND_SEED=
1647595144.
0940742 make test
Solution: make the random seed a positive float.
Also, add the missing positiveness check to the positive_integer function.
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I858bab0a9b828b99c20a2252aeecb9e2dda4ee21
Florin Coras [Wed, 9 Mar 2022 21:55:38 +0000 (13:55 -0800)]
session: add infra for safe pool reallocs
This is not to be used lightly.
The idea is to forces pool reallocs to be done only on main thread with
a barrier to make sure pools are always reallocated without
peekers/readers. If rpcs are delayed and the pool runs out of elements,
workers will block waiting for barrier and force the realloc.
Consumers of this api should be session layer and transports.
Type: feature
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I533272a29534338935a3fcf7027c0e7af2ca948c
Florin Coras [Fri, 18 Mar 2022 17:27:29 +0000 (10:27 -0700)]
udp: avoid grabbing vlib main if not needed
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I88a747cac70cb88755f50c7b337207f4ba256530
Ed Warnicke [Fri, 18 Mar 2022 17:26:04 +0000 (12:26 -0500)]
misc: Auto close PRs to GitHub mirror
Introduce a GitHub Action to auto close PRs submitted via GitHub
Will add a helpful comment to point folks towards gerrit.
Type: feature
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
Change-Id: I3c4a2590d4e38edd1061e65e800cfdb124c43866
Damjan Marion [Thu, 17 Mar 2022 17:59:46 +0000 (18:59 +0100)]
vppinfra: refactor *_will_expand() functions
Type: refactor
Change-Id: I3625eacf9e04542ca8778df5d46075a8654642c7
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Thu, 17 Mar 2022 17:29:32 +0000 (18:29 +0100)]
vppinfra: deprecate vec_free_h()
vec_free() does the work
Type: refactor
Change-Id: I8a97607c3b2f58d116863642b32b55525dc15d88
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Thu, 17 Mar 2022 14:46:25 +0000 (15:46 +0100)]
vppinfra: use stored vec header size to find header
Type: refactor
Change-Id: Iaa1e43c87c5725ab33ea8489bff2a7bda18b9c79
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Fri, 18 Mar 2022 11:28:35 +0000 (12:28 +0100)]
vppinfra: fixed pool from heap
Immediate benefit is ability to use hugepage backed memory.
Type: improvement
Change-Id: Ibcae961aa09ea92d3e931a40bedbc6346a4b2039
Signed-off-by: Damjan Marion <damarion@cisco.com>
Nathan Skrzypczak [Wed, 2 Feb 2022 18:31:43 +0000 (19:31 +0100)]
cnat: Fix conflicting rsession
When dNAT-ing to a VIP, it can happen
that the return session conflicts with
another forward session than the one
we own.
This patchs adds a rsession_flags
CNAT_SESSION_RETRY_SNAT that makes cnat_session_create
search for a free src port to use for the
resulting return session.
It also makes forward & return session
share their fate in the session scanner.
Type: fix
Change-Id: Id0edf59abf8e5bc0c0d8941ba289c4563c77dee0
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Nathan Skrzypczak [Fri, 7 Jan 2022 15:02:02 +0000 (16:02 +0100)]
memif: fix rx/txqueue RC on connected
Type: fix
Calling vnet_hw_if_register_tx_queue should
be done with the worker barrier held, as
virtio-pre-input might be grabbing a queue
while a memif connect event is triggered.
Change-Id: Ie1272cdfd2477faf7a4e10f30778279872f04916
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Aloys Augustin [Thu, 24 Feb 2022 15:44:23 +0000 (15:44 +0000)]
ip: fix assert in ip4_ttl_inc
There is no need to verify the checksum for packets that have the IP
checksum offload flag set. This uses the same logic as
ip4_ttl_and_checksum_check.
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Change-Id: I177b07212a992362a4c965c074dcecf1e504c593
Klement Sekera [Wed, 9 Mar 2022 15:11:27 +0000 (16:11 +0100)]
bfd: remove source IP check from session add
Checking for existence of source address on interface prevents creating
session before assigning address to said interface. Removing this check
allows more flexibility when configuring BFD feature.
Type: improvement
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: Ia57960e29b5dbdb758a7a64193c28f21482f229e
Florin Coras [Thu, 17 Mar 2022 23:31:50 +0000 (16:31 -0700)]
vlib: fix vlib_mains vector alignment
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib3d1ac6c82bc0c00e445b15d4102e4fd755f8e2d