Florin Coras [Tue, 22 Feb 2022 22:41:17 +0000 (14:41 -0800)]
hsa: add support for vrfs in tps
The app keeps on using the default app ns but each listen will be done
in the vrf configured.
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0947e03188d55231b299916351115038e0b1f5da
Florin Coras [Wed, 23 Feb 2022 06:35:34 +0000 (22:35 -0800)]
hsa: fix tps data offset on connection reuse
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibe92497cc5446ac5c734f8fe5c63c0167204dd09
Filip Tehlar [Fri, 18 Feb 2022 08:49:43 +0000 (08:49 +0000)]
session: fix session layer socket read
This fixes an issue caused by session layer reading expected part of
data (cert + key) before the client actually sends it.
Type: fix
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I6ddddb08f9576211b302e814d7c2b040383e5fb7
Klement Sekera [Fri, 18 Feb 2022 10:35:08 +0000 (10:35 +0000)]
tests: better reporting for unexpected packets
Raise a new UnexpectedPacketErrror, when a packet is captured
unexpectedly. This pretty-prints a terse description of said packet.
Type: improvement
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: Ibac19fc5bbd82a150fec3c90940a37af6344fd4f
Dave Wallace [Wed, 23 Feb 2022 22:15:14 +0000 (17:15 -0500)]
build: export missing header files required by hicn_plugin
- HICN project's hicn_plugin requires vnet header files
fib/fib_entry_track.h and udp/udp_encap.h to be
included in build-root/install-vpp*-*/vpp/include/vnet
Type: fix
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: Iabd3f8fe0aee8d727758fc6ef202e859d68d63a3
Florin Coras [Wed, 23 Feb 2022 02:18:47 +0000 (18:18 -0800)]
http hsa: use octet-stream content type for tps
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I925618e426b325f4fafb9ed39a2d7c2d7c7b38f3
Florin Coras [Sat, 19 Feb 2022 22:30:32 +0000 (14:30 -0800)]
http: improvement reset and close handling
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I37ff8099c6c8044881379b4cd47ca8843746c315
Florin Coras [Thu, 17 Feb 2022 01:59:55 +0000 (17:59 -0800)]
http hsa: support multiple listeners for http tps
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie89326ed4e599231fc20de67c5dadbb428568bec
Gabriel Oginski [Tue, 22 Feb 2022 14:15:11 +0000 (14:15 +0000)]
wireguard: fix dereferences null pointer
Type: fix
Fixed coverity-issue CID 248517.
Originally possible passing null pointer to one function and directly
dereferences it.
This patch fixes the issue by add a new condition to check this
pointer.
Change-Id: If506abaf08c9f003860b641971af291f68613c18
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Matthew Smith [Tue, 8 Feb 2022 21:34:05 +0000 (21:34 +0000)]
vrrp: fix thread synchronization issue
Type: fix
Fixes:
39e9428b90bc
When a VRRP advertisement is received by a worker thread, the worker
calls vl_api_rpc_call_main_thread() so the main thread will process the
packet and make adjustments to VR state if necessary.
The data being passed to the main thread included a pointer to the VRRP
header in the received packet buffer. Since the main thread processes
the RPC request asynchronously from the worker thread, it's possible for
the worker to drop the packet and for the buffer to be overwritten before
the main thread can process it.
Copy the fields which may be needed by the main thread into a struct
instead of passing a pointer to a packet buffer.
Change-Id: I4e899e967df5a54776b521825a80e9cce1a94f5f
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Jon Loeliger [Wed, 16 Feb 2022 16:52:56 +0000 (10:52 -0600)]
wireguard: prevent stacksmashing on poorly formed base64 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
Change-Id: I42acfbf3e8fbb3d517e21c53d4f80459d4800e9d
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Neale Ranns [Tue, 22 Feb 2022 14:51:08 +0000 (14:51 +0000)]
linux-cp: Only enable/disable the punt feature on the 0<->1 transition
Type: fix
otherwise the feature is enabled n times for n lcp-pairs and the packets go n times through the feature.
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I8e47e4a293d6e2711f54aa09e9545e5e07728026
Ed Warnicke [Fri, 18 Feb 2022 19:26:35 +0000 (19:26 +0000)]
vxlan: crash on assigning IP address to interface
Revert "vxlan: crash on configuring vxlan tunnel on l3 mode"
This reverts commit
b8de7d43e4955bb4025cd0e0e7390279841b6d7d.
Reason for revert: VPP-2014
Type: fix
Fixes:
b8de7d43e4955bb4025cd0e0e7390279841b6d7d
Change-Id: Ic4d10f28985ee10e0550a1bbfd465ada915e4aa6
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
Rajith P R [Tue, 22 Feb 2022 12:56:51 +0000 (18:26 +0530)]
fib: fix adj_get crash
adj_get() crashed in worker thread. The index is valid but was freed.
0x00007fba5fb07921 in __GI_abort () at abort.c:79
0x00007fba528de7c3 in os_panic () at /development/libvpp/src/vpp/vnet/main.c:618
0x00007fba506f2a19 in debugger () at /development/libvpp/src/vppinfra/error.c:84
0x00007fba506f2797 in _clib_error (how_to_die=2, function_name=0x0, line_number=0, fmt=0x7fba521cecd9 "%s:%d (%s) assertion `%s' fails") at /development/libvpp/src/vppinfra/error.c:143
0x00007fba51d88254 in adj_get (adj_index=79) at /development/libvpp/src/vnet/adj/adj.h:472
0x00007fba51d87642 in icmp6_neighbor_solicitation_or_advertisement (vm=0x7fb9f19a0580, node=0x7fb9bb820340, frame=0x7fb9b718bc40, is_solicitation=0) at /development/libvpp/src/vnet/ip6-nd/ip6_nd.c:134
0x00007fba51d8f479 in icmp6_neighbor_advertisement (vm=0x7fb9f19a0580, node=0x7fb9bb820340, frame=0x7fb9b718bc40) at /development/libvpp/src/vnet/ip6-nd/ip6_nd.c:348
Type: fix
Signed-off-by: Rajith P R <rajith@rtbrick.com>
Change-Id: Ibe29854137ee9680f7947450eb7e256b8c0ade31
Dmitry Valter [Tue, 22 Feb 2022 06:40:22 +0000 (06:40 +0000)]
fib: fix mpls db label overflow
mpls fib DB size was 2^20 instead of intended 2^21.
Therefore large mpls labels caused DB to overflow and write
to other tables or some random objects. Or crash with ASAN.
Sometimes.
Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.ru>
Change-Id: I6db65680037a266fe47e8213464a0c16de63c06c
Florin Coras [Fri, 18 Feb 2022 23:16:20 +0000 (15:16 -0800)]
lisp: fix ip and udp checksum computation
Type: fix
Fixes:
6fdcc3d
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I820c505482801ff2ab8dac41a0016bb3a741a4ee
Klement Sekera [Fri, 18 Feb 2022 10:34:35 +0000 (10:34 +0000)]
tests: add enhanced packet counter verification
Add support for inline packet counter verification to send_and_* functions.
Diff dictionary is a dictionary of dictionaries of interesting stats:
diff_dictionary =
{
"err" : { '/error/counter1' : 4, },
sw_if_index1 : { '/stat/segment/counter1' : 5,
'/stat/segment/counter2' : 6,
},
sw_if_index2 : { '/stat/segment/counter1' : 7,
},
}
It describes a per sw-if-index diffset, where each key is stat segment
path and value is the expected change for that counter for sw-if-index.
Special case string "err" is used for error counters.
This then allows more precise packet counter verification by first
defining a "zero" dictionary, e.g. for ED NAT:
cls.no_diff = StatsDiff({
pg.sw_if_index: {
'/nat44-ed/in2out/fastpath/tcp': 0,
'/nat44-ed/in2out/fastpath/udp': 0,
'/nat44-ed/in2out/fastpath/icmp': 0,
'/nat44-ed/in2out/fastpath/drops': 0,
'/nat44-ed/in2out/slowpath/tcp': 0,
'/nat44-ed/in2out/slowpath/udp': 0,
'/nat44-ed/in2out/slowpath/icmp': 0,
'/nat44-ed/in2out/slowpath/drops': 0,
'/nat44-ed/in2out/fastpath/tcp': 0,
'/nat44-ed/in2out/fastpath/udp': 0,
'/nat44-ed/in2out/fastpath/icmp': 0,
'/nat44-ed/in2out/fastpath/drops': 0,
'/nat44-ed/in2out/slowpath/tcp': 0,
'/nat44-ed/in2out/slowpath/udp': 0,
'/nat44-ed/in2out/slowpath/icmp': 0,
'/nat44-ed/in2out/slowpath/drops': 0,
}
for pg in cls.pg_interfaces
})
and then to specify only changed counters directly when calling
one of send_and_* functions:
self.send_and_assert_no_replies(
self.pg0, pkts, msg="i2o pkts",
stats_diff=self.no_diff | {
"err": {
'/err/nat44-ed-in2out-slowpath/out of ports': len(pkts),
},
self.pg0.sw_if_index: {
'/nat44-ed/in2out/slowpath/drops': len(pkts),
},
}
)
operator | is overloaded by StatsDiff class to perform a deep merge operation,
so in above case, dictionaries for "err" and self.pg0.sw_if_index do not
overwrite whole sub-dictionaries, rather the contents are merged,
assuring that all the remaining counters are verified to be zero.
Type: improvement
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: I2b87f7bd58a7d4b34ee72344e2f871b2f372e2d9
Klement Sekera [Fri, 18 Feb 2022 10:32:08 +0000 (10:32 +0000)]
tests: add a generalised counter assert function
Type: improvement
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: I5e0fd1019372df0cd403725b8cac52363af13718
Klement Sekera [Fri, 18 Feb 2022 10:30:51 +0000 (10:30 +0000)]
tests: allow not removing vpp objects after test
Some tests might want to keep vpp config in between test functions.
Add a flag to allow that.
Type: improvement
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: I90243cd667dce922b43b381f3d52f4ac0f6bf3a7
Klement Sekera [Fri, 18 Feb 2022 15:11:14 +0000 (15:11 +0000)]
nat: make tcp/udp/icmp packet counters consistent
TCP/UDP packets which are dropped are not counted towards TCP/UDP
counters. Apply same behaviour to ICMP packets.
Type: improvement
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: I487fa7135ac8e49431a621fac213638d2dab31c8
Filip Tehlar [Fri, 18 Feb 2022 09:20:15 +0000 (09:20 +0000)]
hsa: fix coverity warnings
Type: fix
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I4ede67c901456d57e457c648d28153423d45fb41
Ray Kinsella [Fri, 18 Feb 2022 04:17:56 +0000 (04:17 +0000)]
perfmon: show distribution of uops delivered to frontend
Breakdown the distribution of uops delivered to the frontend.
Collerates directly with the source of the uops.
Type: improvement
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I93a57dbe56dfa0f378527844aa4e63f45a548e55
Vladimir Ratnikov [Thu, 17 Feb 2022 09:55:35 +0000 (09:55 +0000)]
dpdk: support devargs for vmbus
Type: feature
Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
Change-Id: I2fd12a5b30aacdbaecb9156b829bfc06dfea377f
Neale Ranns [Fri, 18 Feb 2022 11:10:11 +0000 (11:10 +0000)]
fib: Use the VLIB logger for adjacency debugging
Type: improvement
remove the [un]lock logs, they are not useful.
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I903d3088b8ed9831f931208aeb6b6862a945550c
Artem Glazychev [Fri, 18 Feb 2022 05:23:20 +0000 (12:23 +0700)]
vnet: add set_max_frame_size callbacks for several interfaces
This is required after distinguishing between max_frame_size and MTU
Type: fix
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: Ie642bee4e30ca76903bb8be5eeb6914c2c09bf35
Gabriel Oginski [Wed, 16 Feb 2022 12:32:53 +0000 (12:32 +0000)]
wireguard: fix passing null pointer
Type: fix
Fixed coverity-issue CID 248517.
Originally possibly passing null pointer to one function and
directly dereferences it.
This patch fixes the problem by add a new condition.
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I02fc6fb5d1cfd6138ea4ba2b1946fd8a7ef34d3b
Neale Ranns [Thu, 17 Feb 2022 09:22:16 +0000 (09:22 +0000)]
tests: Consolidate the implementations of send_and_expect_X
Type: test
there were multiple instances of send_and_expect_load_balancing
and a send_and_expect_one_itf which has the same functionality as send_and_expect_one.
Put one implementation of both in framework.py (where the other send_and_X functions reside).
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I7f629d440220bee29368067f475059322e1134f7
Gabriel Oginski [Fri, 18 Feb 2022 08:05:00 +0000 (08:05 +0000)]
ipsec: fix vector after remove entry in spd
Originally after remove the policy entry in spd, macro "vec_del1"
can change localization of the last entry in vector and finally the
entry list has not been sorted.
This patch fixes this issue by change executed macro "vec_delete"
instead of "vec_del1".
Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I396591cbbe17646e1d243aedb4cdc272ed4d5e25
Jon Loeliger [Thu, 17 Feb 2022 18:42:19 +0000 (12:42 -0600)]
wireguard: Fix wireguard device name to use user-instance
If the user supplies an instance number when creating a wireguard
interface, it should be used in the device name. If no user-instance
is given, the device instnce (tunnel number) is used.
For example:
vpp# wireguard create instance 17 listen-port 23023 src 1.2.3.4
private-key MDEwMjAzMDQwNTA2MDcwODA5MTAxMTEyMTMxNDE1MTY=
wg17
Type: fix
Fixes:
edca1325cf296bd0f5ff422fc12de2ce7a7bad88
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Change-Id: Ibf51868bf7b4b9e8a3f85557d05667207873bc91
Florin Coras [Thu, 17 Feb 2022 01:12:01 +0000 (17:12 -0800)]
tls http srtp: fix session index for listeners
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If5e6d0e8c686ea93674d6201c38b3a4d1c4786a5
Klement Sekera [Mon, 31 May 2021 14:08:53 +0000 (16:08 +0200)]
tests: make tests less make dependent
Implement command line argument parsing instead of passing arguments via
environment variables. Add script for running tests without having to
invoke make. Deprecate running tests via make.
Type: improvement
Change-Id: I2e3054a61a2ae25d460e9be00be7d7705fbf943e
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Filip Tehlar [Wed, 2 Feb 2022 17:38:20 +0000 (17:38 +0000)]
vcl: add support for reconnect
Supported only when eventfd option is enabled.
Type: feature
Change-Id: Ic9d6e38604e978f7bc8e54d74fe9b8f3fc53622d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Neale Ranns [Thu, 17 Feb 2022 14:29:28 +0000 (14:29 +0000)]
ip: Move the IPv6 echo responder into the ping plugin
Type: refactor
To be consistent with the location of the IPv4 responder
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ie3a5c3ecc10755317591d7ff57b74770c2798e77
Neale Ranns [Mon, 10 Jan 2022 11:21:17 +0000 (11:21 +0000)]
ipsec: Improve the handling of NAT-T keepalive messages
Type: improvement
Ethernet frames on the wire are a minimum of 64 bytes, so use the length in the UDP header to determine if the ESP payload is one bytes of the special SPI, rather than the buffer's size (which will include the ethernet header's padding).
In the case of drop advance the packet back to the IP header so the ipx-drop node sees a sane packet.
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ic3b75487919f0c77507d6f725bd11202bc5afee8
Vyshakh Krishnan [Thu, 17 Feb 2022 04:32:25 +0000 (10:02 +0530)]
ping: fix incorrect index while clearing ping
Type: fix
Signed-off-by: Vyshakh Krishnan <vyshakh@rtbrick.com>
Change-Id: I0b085fd2d3d9b8e08a16585c4964101b6461bf06
akolechk [Wed, 16 Feb 2022 10:09:03 +0000 (12:09 +0200)]
dpdk: enable scatter on Rx for net/ena
Type: fix
Since commit https://github.com/DPDK/dpdk/commit/
e2a6d08bef489215ebb77b1d3033875ada757cfa
DPDK started advertising scattered Rx feature for elastic network adapters. Thus, dpdk
plugin doesn't have to disable it for ENA by default anymore
Signed-off-by: akolechk <akolechk@cisco.com>
Change-Id: I2d4f429be992e3c4edcc0c3adf8c55f3d5381631
Dastin Wilski [Thu, 3 Feb 2022 09:19:01 +0000 (09:19 +0000)]
af_xdp: change flag passed to bpf_set_link_xdp_fd
Originally XDP_FLAGS_REPLACE was passed to the function.
For kernels not defining this macro (for example 5.4) in if_link.h vpp
sets it to 0.
If kernel has this macro problem appears, replace flag requires
specifying the program to be replaced. bpf_set_link_xdp_fd wraps
around __bpf_set_link_xdp_fd_replace and passes 0 as old_fd, it leads to
an error while assessing for replacement (if 0 is passed
there is no assessing for replacement).
To address this issue no flag is passed to the function, only 0.
Type: improvement
Signed-off-by: Dastin Wilski <dastin.wilski@gmail.com>
Change-Id: I3689ce7eb8c71c699f0e589111929979c2bbe213
Neale Ranns [Tue, 15 Feb 2022 08:28:19 +0000 (08:28 +0000)]
fib: Use the same adjacency that BFD is using
Type: improvement
When the adj subsystem is notified of a BFD session, it attempts to find the appropriate adjacency from the session's key.
This could lead to a mismatch between the adj used by BFD and that of FIB. The BFD session stores the adj it is using, so FIB uses that instead.
Since adj is now using the same adj as BFD, it does not need to maintain its own locks.
In BFD it is necessary to initialise the adj index used in INVALID and ensure it is not unlock before listeners are notified of the session delete.
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I9630867b10bb18969475299a0c754942a8df0f44
Neale Ranns [Tue, 15 Feb 2022 08:24:48 +0000 (08:24 +0000)]
bfd: On a point to point link use the all zeros address for the peer.
Type: fix
The adjacency used is then the same one as that used by routes in the FIB and so the BFD protection/fast-failover works for thise route, since they are children of the BFD protected adjacency.
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I72e10b3074697cba8a002a4c1acf690983985157
Paul Atkins [Wed, 1 Dec 2021 13:13:16 +0000 (13:13 +0000)]
ipfix-export: pass ipv4 addr to format fn for show
When the ipfix address was changed to be an ip_address instead of
an ip4_address the output when creating an exporter via the cli
should have been modified to take the address of the v4 part of
the addr.
Type: fix
Signed-off-by: Paul Atkins <patkins@graphiant.com>
Change-Id: I141456cd9092c861a4c4aefba4035dbde23efcd6
mgovind [Wed, 16 Feb 2022 01:15:02 +0000 (01:15 +0000)]
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
fanxb [Tue, 15 Feb 2022 06:19:04 +0000 (14:19 +0800)]
quic: fix quic_config_fn cfg cmd parse error
Type:fix
Signed-off-by: fanxb <fxb_mail@163.com>
Change-Id: I244f6ddd0a34e82ababd375646d3bb194602b5d5
Neale Ranns [Tue, 15 Feb 2022 09:02:27 +0000 (09:02 +0000)]
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
Klement Sekera [Mon, 14 Feb 2022 20:20:22 +0000 (20:20 +0000)]
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
Klement Sekera [Mon, 14 Feb 2022 20:19:28 +0000 (20:19 +0000)]
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
Florin Coras [Sun, 13 Feb 2022 02:42:19 +0000 (18:42 -0800)]
srtp: flag connections for no session layer lookup
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id78cdf742689a5cff356ac0aa3167af1c886b531
Rajith P R [Sat, 12 Feb 2022 06:45:23 +0000 (12:15 +0530)]
fib: fix incorrect display of mpls fib_index
Type: fix
Signed-off-by: Rajith P R <rajith@rtbrick.com>
Change-Id: I8c9c85081c27bfe7ee71b5b620a2a761e027789c
Florin Coras [Fri, 11 Feb 2022 04:58:21 +0000 (20:58 -0800)]
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
Nathan Skrzypczak [Fri, 11 Feb 2022 10:19:58 +0000 (11:19 +0100)]
memif: Fix underflow
Type: fix
Change-Id: Id183c47328510b5db7ffcc7a4dfb41f5a3151399
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Florin Coras [Fri, 11 Feb 2022 19:59:04 +0000 (11:59 -0800)]
http: fix support for files larger than u32
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iad7304c3a8fef14ec85c4240714feb86637411ca
Florin Coras [Thu, 10 Feb 2022 21:51:10 +0000 (13:51 -0800)]
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
Florin Coras [Thu, 10 Feb 2022 19:57:06 +0000 (11:57 -0800)]
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
Damjan Marion [Thu, 10 Feb 2022 14:01:03 +0000 (15:01 +0100)]
vlib: vlib frame bitmaps
Special bitmaps with VLIB_FRAME_SIZE bits.
Type: improvement
Change-Id: I48747e422e519e7b5e930fa720397459d3adbb8e
Signed-off-by: Damjan Marion <damarion@cisco.com>
Neale Ranns [Wed, 9 Feb 2022 13:30:37 +0000 (13:30 +0000)]
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
Steven Luong [Wed, 9 Feb 2022 23:11:48 +0000 (15:11 -0800)]
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
Damjan Marion [Mon, 31 Jan 2022 16:42:44 +0000 (17:42 +0100)]
vppinfra: small optimization in clib_memset_u64
Type: improvement
Change-Id: I4b89c32c224caf8a3a4ac94b26ecefffd26c7038
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Thu, 10 Feb 2022 13:31:59 +0000 (14:31 +0100)]
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>
Damjan Marion [Thu, 10 Feb 2022 14:23:15 +0000 (15:23 +0100)]
vppinfra:remove uXxY_is_greater
not needed, '>' works...
Type: improvement
Change-Id: I9bfbac787e8dca24e9b1bceda0922740eed26346
Signed-off-by: Damjan Marion <damarion@cisco.com>
Florin Coras [Thu, 10 Feb 2022 03:17:02 +0000 (19:17 -0800)]
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
Filip Tehlar [Wed, 9 Feb 2022 08:35:26 +0000 (08:35 +0000)]
vcl: make eventfd flag configurable from env
Type: feature
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Id25e2188c9167b2e187923ebe10660e0bc9c3c0a
Steven Luong [Tue, 8 Feb 2022 15:59:11 +0000 (07:59 -0800)]
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
Neale Ranns [Wed, 9 Feb 2022 13:47:29 +0000 (13:47 +0000)]
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
Florin Coras [Tue, 8 Feb 2022 00:24:43 +0000 (16:24 -0800)]
http_static: cleanup file handler and cache
Type: refactor
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7aff3a02315f9f92039dd2e3af1cbd8312aec662
Filip Tehlar [Tue, 8 Feb 2022 09:40:00 +0000 (09:40 +0000)]
tests: vcl: add missing host stack echo test
Type: test
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I3b6e56b319aab3ffd2cc82d31e646bd42901275b
Steven Luong [Mon, 31 Jan 2022 21:30:37 +0000 (13:30 -0800)]
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
Andrew Yourtchenko [Wed, 2 Feb 2022 19:32:18 +0000 (19:32 +0000)]
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
Benoît Ganne [Mon, 7 Feb 2022 17:07:39 +0000 (18:07 +0100)]
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>
Dave Wallace [Sat, 5 Feb 2022 14:27:05 +0000 (09:27 -0500)]
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
Florin Coras [Mon, 7 Feb 2022 00:52:57 +0000 (16:52 -0800)]
http_static: fix coverity warning
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6d5527c49e9085f35be988549c2f1460be7fd4f0
Benoît Ganne [Mon, 31 Jan 2022 17:29:09 +0000 (18:29 +0100)]
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>
Ole Troan [Tue, 1 Feb 2022 11:10:40 +0000 (12:10 +0100)]
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>
Jon Loeliger [Wed, 2 Feb 2022 18:01:36 +0000 (12:01 -0600)]
perfmon: Fix typo in debug log messages
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Type: style
Change-Id: I955c19ddbe06ef3651c03820fcc14054c63258b9
Florin Coras [Sat, 5 Feb 2022 03:40:26 +0000 (19:40 -0800)]
http_static: handle empty requests
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic002444c51b1ecbbf18a49863cf01888d28c4632
Florin Coras [Fri, 4 Feb 2022 22:37:04 +0000 (14:37 -0800)]
http: estimate tx packets for scheduler
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibca4bf59e6319ffdc1beaa084ca80f216e062af0
Florin Coras [Fri, 4 Feb 2022 21:31:25 +0000 (13:31 -0800)]
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
Naveen Joy [Fri, 10 Sep 2021 00:57:02 +0000 (17:57 -0700)]
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>
Klement Sekera [Mon, 31 May 2021 14:11:49 +0000 (16:11 +0200)]
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
Klement Sekera [Thu, 3 Feb 2022 16:03:26 +0000 (16:03 +0000)]
tests: fix test-checkstyle-diff if no .py changed
Type: fix
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: I6d23ff14380b0154f617b3ab7cd1acd5aa45106a
Florin Coras [Thu, 3 Feb 2022 23:17:21 +0000 (15:17 -0800)]
prom: add option to set stat name prefix
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I8b40d4e935c9280ff89a3d0f8b30bd7beac1e08a
Florin Coras [Thu, 3 Feb 2022 19:48:55 +0000 (11:48 -0800)]
http: honor max seg len in ptr buffer
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I58ecd933f36c6622f4c6b373d2d94a48f9fc9eae
Florin Coras [Wed, 10 Nov 2021 02:29:03 +0000 (18:29 -0800)]
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
Florin Coras [Tue, 1 Feb 2022 00:16:13 +0000 (16:16 -0800)]
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
Andrew Yourtchenko [Wed, 2 Feb 2022 12:32:39 +0000 (13:32 +0100)]
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>
Florin Coras [Tue, 1 Feb 2022 21:17:13 +0000 (13:17 -0800)]
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
Mohsin Kazmi [Tue, 1 Feb 2022 19:06:58 +0000 (19:06 +0000)]
gso: remove the assert if packet is geneve or gre encaped
Type: fix
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I3265d4a3843b07c2e0050e297f1e014fc5b31cf7
Steven Luong [Wed, 19 Jan 2022 17:08:27 +0000 (09:08 -0800)]
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
Steven Luong [Fri, 28 Jan 2022 22:12:53 +0000 (14:12 -0800)]
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
Steven Luong [Fri, 28 Jan 2022 16:28:04 +0000 (08:28 -0800)]
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
Filip Varga [Tue, 18 Jan 2022 21:17:07 +0000 (13:17 -0800)]
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>
Ray Kinsella [Fri, 28 Jan 2022 09:02:10 +0000 (09:02 +0000)]
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
Klement Sekera [Sat, 10 Apr 2021 10:37:04 +0000 (12:37 +0200)]
tests: correct python usage in virtualenv
Use 'python3' for all python calls in virtualenv. Using $(PYTHON_INTERP)
(set to $(PYTHON)) is incorrect when $(PYTHON) contains absolute path
(e.g. '/usr/bin/pypy3') as it uses interpreter outside of virtualenv.
Type: fix
Change-Id: I19878360cfc1ab6a591e09a079b0b69c1a1a58cf
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Klement Sekera [Tue, 14 Dec 2021 18:25:11 +0000 (18:25 +0000)]
ip: reassembly - add a way to disable for forus
Add API to disable full reassembly of "forus" packets. Mark packets
passing through ip[4|6]-local nodes with a new buffer flag and check for
that flag in reassembly.
Enable IP6 "forus" full reassembly by default to be consistent with
existing IP4 setting.
Type: improvement
Change-Id: I7067792fcd4304182654237968e4c4d9293c6143
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Klement Sekera [Fri, 28 Jan 2022 13:16:46 +0000 (13:16 +0000)]
ip: fix length calculation in ip6-receive
Replace unconditional usage of
buffer->total_length_not_including_first_buffer with a logic checking
whether that length is set to a valid value.
Type: fix
Fixes:
17478e4eb81d384f171ca27c9110a051cd434f16
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I161d0957d62cc23826edd821aa5560bcfc5c1a33
Klement Sekera [Tue, 25 May 2021 19:15:36 +0000 (21:15 +0200)]
tests: make VPP_BUILD_DIR to point to correct dir
Make VPP_BUILD_DIR hold the correct value and adjust paths where
necessary.
Type: refactor
Change-Id: I5bc60666c04919956bf26badaf1ee1f1b188ef65
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Klement Sekera [Fri, 28 Jan 2022 11:31:01 +0000 (11:31 +0000)]
tests: support skipping to test method with STEP
Allow entering a test name on stack trace window with STEP=y option
instead of a number. This allows to run a whole suite and skip all tests
until a particular test is hit.
Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I23e45f8022b82545365b8921390e0e106e02b39c
Nathan Skrzypczak [Mon, 24 Jan 2022 16:10:41 +0000 (17:10 +0100)]
cnat: maglev fixes & improvements
This fixes the maglev logic which previously
included a wrong simplication.
It moves the maglev logic to its own file,
and adds a test function in the debug cli.
Type: improvement
Change-Id: I2790ae2a26fc1c5739ff02f41d436bfcafd5b380
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Sivaprasad Tummala [Fri, 21 Jan 2022 21:39:18 +0000 (03:09 +0530)]
snort: feature support on interface output
support snort plugin on interface output via ip4-output fa
Type: feature
Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com>
Change-Id: I2d5e7d0719c03f88806b12debfe596675dbd66c1
Ray Kinsella [Thu, 27 Jan 2022 09:55:02 +0000 (09:55 +0000)]
perfmon: topdown level 1 and 2 for icx
Topdown level 1 and 2 for Intel Ice Lake (ICX). Limiting topdown support
to THREAD for the moment on Ice Lake, as NODE support is still
unreliable. Also removing Topdown Level 1 from Sapphire Rapids onwards,
as Topdown LeveL 2 also shows Level 1 on Sapphire, and it reduces the
overall number of bundles.
Type: improvement
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: Iaa68b711dc8b6fb1090880b411debadb3c37f8bc
Ray Kinsella [Fri, 28 Jan 2022 05:01:52 +0000 (05:01 +0000)]
perfmon: fix init of bundles with pseudo events
Previously Linux pseudo events were being counted as multiple fixed
events, such that a bundle with pseudo events could exceed the number of
available fixed counters. Reworked to ignore pseudo events in the
accounting for the moment.
Type: fix
Fixes:
0024e53ad
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: Ic938f8266fd04d7731afbd02e261c61ef22a8522
Ray Kinsella [Fri, 28 Jan 2022 04:59:00 +0000 (04:59 +0000)]
perfmon: check for duplicates after other checks
Move checking for duplicate bundle names after the other checks.
Type: fix
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I7fed5be758814e166eb8756b3df090130ac13bfd