Commit Graph

11891 Commits

Author SHA1 Message Date
6a51775d6c crypto: Fix for the crash in crypto
Fix for the crash when both crypto_native_plugin and DPDK QAT
are enabled in startup conf.

Type: fix
Signed-off-by: mgovind <govindarajan.mohandoss@arm.com>
Change-Id: Ib020ed7130a99080a093c70c06d47bcacd6d23b1
2022-02-16 01:15:02 +00:00
3f03ca95b6 quic: fix quic_config_fn cfg cmd parse error
Type:fix

Signed-off-by: fanxb <fxb_mail@163.com>
Change-Id: I244f6ddd0a34e82ababd375646d3bb194602b5d5
2022-02-15 20:29:22 +00:00
f7040f01a5 tcp: Do not include the tcp_packet.h file in the ip4_packet.h
Type: refactor

IP4 does not depend on TCP (it's the other way around).
This upside down dependency leads to some nasty circular includes when trying to use ip46_address.h in interface.h

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I4a1bd21543b08b9c1cf1e5563da738414734a878
2022-02-15 09:02:27 +00:00
cdaf0d8c88 bfd: add per session counters
Add udp total session counts - as stat segment entries:

/bfd/udp4/sessions
/bfd/udp6/sessions

and per session packet/byte counters:

/bfd/rx-session-counters
/bfd/rx-session-echo-counters
/bfd/tx-session-counters
/bfd/tx-session-echo-counters

These counters are per-thread and per-session id.

Adjust tests to verify proper function.

Type: refactor
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: Ie597928022b6ac74c2220019b9e8e1714295f170
2022-02-14 20:21:01 +00:00
b59f63b0e7 bfd: refactor code to fix misc warnings
This change fixes multiple unused parameter warnings, narrowing
conversion warnings and identical switch statement warnings.

Type: refactor
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: I4140e939c409ce06cc5aaaf5e1b042681f7ca448
2022-02-14 20:19:28 +00:00
be74504d22 srtp: flag connections for no session layer lookup
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id78cdf742689a5cff356ac0aa3167af1c886b531
2022-02-14 15:51:11 +00:00
dd8a272e9f fib: fix incorrect display of mpls fib_index
Type: fix
Signed-off-by: Rajith P R <rajith@rtbrick.com>
Change-Id: I8c9c85081c27bfe7ee71b5b620a2a761e027789c
2022-02-14 08:19:50 +00:00
cfcc42e290 hsa: add http throughput test server app
Can be used for throughput testing over http. For instance, start
server:

http tps #implicitly listens on port 80

Then, to test throughput with curl:

curl <server_ip>/test_file_10g
curl <server_ip>/test_file_123m

Similarly, for https:

http tps uri tls://<server_ip>/443
curl -k <server_ip>/test_file_1g

Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I30ab7f0d94a7357b3f04546e4a3d3c410a733908
2022-02-13 23:34:51 +00:00
1b969c2f6a memif: Fix underflow
Type: fix

Change-Id: Id183c47328510b5db7ffcc7a4dfb41f5a3151399
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2022-02-13 20:10:58 +00:00
360aee3e00 http: fix support for files larger than u32
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iad7304c3a8fef14ec85c4240714feb86637411ca
2022-02-11 19:55:17 +00:00
d37328eb8b http: add startup configuration stanza
Support segment and fifo sizes for now.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie7242936de7a87df8a703eb371f665be5be4390d
2022-02-11 01:02:20 +00:00
0bce71eee3 session: use transport endpoint cfg for listen
Makes it similar to connects.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I38c328670054e1a9ba4dc4ea8fe7519a5a09e8be
2022-02-10 21:17:16 +00:00
efeea5b111 vlib: vlib frame bitmaps
Special bitmaps with VLIB_FRAME_SIZE bits.

Type: improvement
Change-Id: I48747e422e519e7b5e930fa720397459d3adbb8e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-02-10 19:12:50 +01:00
f5756175e6 tests: Fix the FIB UT
Type: test

The FIB UT fails in debug mode because there is no string associated woth its fib_node_type_t.
Change the tests to register their own type, which will give it a name.

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I36e546718faa7241c088494cbae10939aca51d5a
2022-02-10 17:27:04 +00:00
791144cbc5 stats: Remove unsolicited clib_warning
It is annoying to see unsolicited message like this spew out to the
console which an end-user cares less about.
vlib_stats_rename_symlink:301: RENAME new name: /nodes/unix-cli-local:52/clocks

Type: fix
Fixes: I92a62bb1cb799e8fdc3ec4110ae3428825254f8a

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I071f3d3736c06cd95a38ec46c7e2222caad01283
2022-02-10 17:26:44 +00:00
137d4ca67b vppinfra: small optimization in clib_memset_u64
Type: improvement
Change-Id: I4b89c32c224caf8a3a4ac94b26ecefffd26c7038
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-02-10 16:31:41 +00:00
bc0ef7aef5 vppinfra: clib_memcpy_may_overrun
Faster memcpy variant when overrun of up to SIMD register size - 1 is
accepable.

Type: improvement
Change-Id: I1fb22e2989f2156caa9f34fa096e6ff9ea9ec7b6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-02-10 15:45:56 +00:00
e01ce5ad5d vppinfra:remove uXxY_is_greater
not needed, '>' works...

Type: improvement
Change-Id: I9bfbac787e8dca24e9b1bceda0922740eed26346
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-02-10 15:45:00 +00:00
f8c8809d00 session: avoid debug half-open session pool contention
Half-opens are only allocated from main with worker barrier but can be
cleaned up, i.e., session_half_open_free, from main without a barrier.
In debug images, the free_bitmap can grow while workers peek the
sessions pool, e.g., session_half_open_migrate_notify, and as a result
crash while validating the session. To avoid, proactively grow bitmap in
debug images.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2410793f933fb638651fe8dc08ba78e9bee0bd77
2022-02-10 03:09:44 +00:00
794599bcca vcl: make eventfd flag configurable from env
Type: feature

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Id25e2188c9167b2e187923ebe10660e0bc9c3c0a
2022-02-09 21:04:47 +00:00
97866a3279 fib: ip6 and mpls fib_table memory leaks on fib_table->ft_locks
ip6 and mpls fib_table->ft_locks memory leaked when the table is
deleted.
name tag is leaked for mpls table parsing.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ife68c0ddc3a6f9437a149b308310f042799c2116
2022-02-09 14:45:20 +00:00
63f2c7d701 bfd: Add an update API that has create new or modify existing semantics
Type: improvement

helps keep the agents stateless

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I3588f13c081e24f5a8083b490eb02856361e4ccb
2022-02-09 13:47:29 +00:00
023521fcb6 http_static: cleanup file handler and cache
Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7aff3a02315f9f92039dd2e3af1cbd8312aec662
2022-02-08 16:44:06 -08:00
48bdf24ad2 tests: vcl: add missing host stack echo test
Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I3b6e56b319aab3ffd2cc82d31e646bd42901275b
2022-02-08 16:46:11 +00:00
261a059b3d memif: memory leak when deleting memif interface
When deleting a memif interface, there is a memory leak in
mif->local_disc_string. The code that leads to memory leak is
memif_delete_if -> memif_disconect -> vec_dup

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I579c743c3d47770131153e083e65f6cd899067b3
2022-02-07 19:04:18 +00:00
a47203128b build: Make the build work on Debian 11
Debian 11 has some packages that have changed, and need adjustment.
Also - its default compiler is gcc 10, which, contrary to either gcc 8
or gcc 11 prints a bunch of warnings, which fails compilation.
And there is no gcc 11 package.

Therefore, use clang for this build.

Additionally, python 3.9 has exposed this issue:
https://bugs.python.org/issue42580

Therefore, make a local patch to scapy to tackle it.

Type: feature
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I7b9c0f852ab97fe3c1feca3f22020ac0970ba3e2
2022-02-07 18:40:51 +00:00
688d276340 igmp: make sure fib_index is set before delivering to ip4-local
IGMP packets with Router Alert option are delivered to ip4-local
without going through ip4-lookup. Make sure fib_index is initialized
properly.

Type: fix

Change-Id: Iab090a33c4c759b6d7f68c28a0b3f4da7a9de864
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-02-07 18:10:05 +00:00
fa5aabbf0b tests: Update python packages
- pip == 22.0.3
- pip-tools == 6.5.0
- setuptools == 60.7.1 (now pinned in test/Makefile)
- upgrade packages in requirements-3.txt
- install iperf3 for 'make test TEST=vcl'

Type: test

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I1bd85f10fb4f6ba87b9bc1267905e5f1b8eb16de
2022-02-07 16:39:35 +00:00
7463900dbd http_static: fix coverity warning
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6d5527c49e9085f35be988549c2f1460be7fd4f0
2022-02-06 16:58:04 -08:00
7a2574a8ca dpdk: remove dead code
rte_eth_tx_burst() returns the number of packets  actually stored in
transmit descriptors and the return type is uint16. n_sent cannot be
negative and the if branch is dead code.

Type: improvement

Change-Id: Idc2980d342756c1093ddf74ea6207d072e819331
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-02-06 11:46:49 +00:00
291307e427 stats: fix memory leaks
Type: fix
Fixes: 72e31bc2d9
Fixes: db02380
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I92a62bb1cb799e8fdc3ec4110ae3428825254f8a
Signed-off-by: Ole Troan <ot@cisco.com>
2022-02-06 11:45:11 +00:00
fdbafb8ca1 perfmon: Fix typo in debug log messages
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Type: style
Change-Id: I955c19ddbe06ef3651c03820fcc14054c63258b9
2022-02-06 11:44:49 +00:00
6c33728a35 http_static: handle empty requests
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic002444c51b1ecbbf18a49863cf01888d28c4632
2022-02-05 21:20:29 +00:00
a3d710e2d7 http: estimate tx packets for scheduler
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibca4bf59e6319ffdc1beaa084ca80f216e062af0
2022-02-05 21:19:53 +00:00
3e157100b5 session: track bytes dequeued in snd params
Also reset send params flags before calling transports to avoid explicit
resets in all transports.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1da7b3fab009728e7fee4199425ced933fa8a122
2022-02-05 21:19:53 +00:00
6eaeea9003 tests: mark the test suites broken when ASan is enabled
Mark broken test suites using @tag_fixme_asan.The main issue
is that some tests do not pass with ASan. These will need to
be fixed, but it takes time and in the meantime, new issues are
introduced that trip up ASan. When this tag is set and Asan
is enabled, failing ASan tests are skipped, so incremental
fixes can pass the CI

Type: improvement

Change-Id: I02602eb74234c25a4c701279e14704b81d4c5b71
Signed-off-by: Naveen Joy <najoy@cisco.com>
2022-02-05 20:14:37 +00:00
ea2721f766 tests: remove constant argument
Reduce number of arguments by removing an argument which is only ever
used with same constant value.

Type: refactor
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I061635b28031d75eb1f853b570e85f6e5a9094df
2022-02-05 20:11:44 +00:00
0e95c18753 tests: fix test-checkstyle-diff if no .py changed
Type: fix
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: I6d23ff14380b0154f617b3ab7cd1acd5aa45106a
2022-02-05 19:42:35 +00:00
1a7344f732 prom: add option to set stat name prefix
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I8b40d4e935c9280ff89a3d0f8b30bd7beac1e08a
2022-02-03 23:19:57 +00:00
e38babcdf9 http: honor max seg len in ptr buffer
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I58ecd933f36c6622f4c6b373d2d94a48f9fc9eae
2022-02-03 20:43:00 +00:00
f840880c2f ip nat: use ip rx sw_if_index in ip-local arc start
This also changes the behavior of the nat44-ei hairpinning feature.
Rather then enabling the feature on every nat interface, it is enabled
only on local0.

Type: improvement

Signed-off-by: Filip Varga <fivarga@cisco.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4e16a83c9e328aa75fc61df508b620ef743ca775
2022-02-03 20:38:18 +00:00
7285be2aab prom: basic builtin prometheus stats exporter
This is a vpp builtin alternative, not a replacement, for the existing
vpp_prometheus_exporter.

The plugin works by registering with http_static as a url handler for
stats.prom and handles requests by scraping the stats segment in the
main thread. It will therefore consume vpp process cpu cycles.

By default the plugin is disabled. To enable, first start the http
static server an then use "prom enable" cli.

Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If6888e965d1b2361f6a5546586068213d37079d1
2022-02-02 17:04:46 -08:00
c556fa49b4 bfd: restore the data within the packet after hash verification
The BFD delayed auth change test was failing intermittently within CI.
Debugging has shown it depends on the initial random seed, e.g. the below
will consistently fail:

RND_SEED=1643734669.7126195 TEST='bfd.BFDAuthOnOffTestCase.test_auth_change_key_delayed'

Same thing will happen with:
RND_SEED=1643736595.1363552
RND_SEED=1643722239.8224792

The analysis of the behavior shown that the function that is doing the hash verification,
modifies the content of the packet for the purposes of hash computation.
In case of the auth rollover, this function may be called twice - resulting in the second
comparison to be made with a bogus packet data, thus failing the check and the test.

The above values of random seed are the ones where the test makes it
to the point of this double comparison.

The solution is to restore the data within the packet after the check from the array
where we have copied it into before modifying the packet.

Change-Id: Ibb09beb4b1230032db04527bbf38fa335651866b
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2022-02-02 19:30:49 +00:00
bd8013ee8c http_static: add support for async tx from handlers
URL handlers can send data asynchronously if needed.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I89eae690cb26543479c7659b5dc46604cbb22eba
2022-02-02 10:35:23 +00:00
d6eed1bb20 gso: remove the assert if packet is geneve or gre encaped
Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I3265d4a3843b07c2e0050e297f1e014fc5b31cf7
2022-02-01 19:06:58 +00:00
c4a48f2c39 virtio: coverity woes -- divide by zero
Coverity complains the expression, j % vif->num_txq, may encounter
divide by zero. While there is little chance that vif->num_txq is
zero, it is easy to prevent divide by zero if vif->num_txq is ever
zero.

Type: fix
Fixes: I337ec63d0868f665329d68eadf1744e080b73a0d

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I2e91f296737ce266ab70fffc1f442cc600724fa2
2022-02-01 16:33:26 +00:00
0a214804f8 stats: vpp_get_stats crashes in stat_segment_data_free
STAT_DIR_TYPE_EMPTY is not handled. This can happen when the
interface is deleted.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ic1f5a1a0e7005059628d1dde31118d692c1967d8
2022-02-01 15:19:06 +00:00
dafdcf7e6d nat: memory leak on nat44_plugin_disable
We invoke nat_affinity_enable for nat44_plugin_enable.
We need to invoke nat_affinity_disable for nat44_plugin_disable
to free the memory for bihash.

Type: fix
Fixes: I2743f7b1104b627bcc5ef937e3a50655313a26ea

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I9adeb3225136e3fff853c2d5b8f9a30e98ddcf4c
2022-02-01 15:18:37 +00:00
53cee1579e nat: nat44-ei hairpinning code cleanup
Removing obsolete unused nat44-ei nodes and functions.

Type: refactor
Change-Id: I1e03e283091c3c0d92908d04037cba00a348351a
Signed-off-by: Filip Varga <fivarga@cisco.com>
2022-02-01 12:09:17 +00:00
ca5f6b851d perfmon: Add perfmon maintainer
Add Ray Kinsella as maintainer of the perfmon plugin. Update maintainers of the
sphinx documentation.

Type: refactor

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I9c05dbed3dcc9909b497df776fa01c52bc048e0f
2022-01-31 19:01:50 +00:00