Florin Coras [Fri, 7 Jan 2022 23:06:42 +0000 (15:06 -0800)]
tcp: fix cubic cwnd accumulate use of bytes acked
Use what was provided instead of tc->bytes_acked
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0ed736d2ee247e231fccdf4a969fcf6bc15b7978
Steven Luong [Thu, 6 Jan 2022 21:02:00 +0000 (13:02 -0800)]
bonding: memory leak on parsing bad CLI command
When parsing bad "create bond" command, we should call unformat_free
prior to return
Type: fix
Fixes:
9cd2d7a5a4fafadb65d772c48109d55d1e19d425
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I8f20a0e7f29de670e09633880d0aa50a51444e11
Steven Luong [Thu, 6 Jan 2022 23:15:11 +0000 (15:15 -0800)]
vmxnet3: memory leak on parsing bad CLI command
When parsing bad "create interface vmxnet3" command, we should call
unformat_free prior to return
Type: fix
Fixes:
df7f8e8cffcc43531f7daeda44d436b60e538141
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I2663894c6cb8066ca2abb1c56f0ca46d0fef19f7
Damjan Marion [Thu, 6 Jan 2022 19:36:14 +0000 (20:36 +0100)]
ethernet: new interface registration function
Prep for supporting multiple callbacks, optional args, etc.
Type: improvement
Change-Id: I96244c098712e8213374678623f12527b0e7f387
Signed-off-by: Damjan Marion <damarion@cisco.com>
Florin Coras [Fri, 7 Jan 2022 01:51:17 +0000 (17:51 -0800)]
dpdk: fix rx and tx descriptor config
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I48ac0a2c77154b5232a0fe4166518f28d1f1d8ef
Florin Coras [Fri, 7 Jan 2022 01:47:14 +0000 (17:47 -0800)]
tcp: optimize newreno cong ack handler
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I196ee5f4630cec637245493f370b5f83a939fe44
Florin Coras [Thu, 6 Jan 2022 19:58:24 +0000 (11:58 -0800)]
tcp: update snd_congestion only during congestion
If running without sacks, if snd_una does not cover snd_congestion fast
recovery can be missed but the two heuristics from RFC6582 should avoid
that.
Also snd_congestion was used as a means of inferring if the connection
recently exited congestion while setting the persist timer but that does
not always work correctly if not congested.
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I94d4ac738cdd4f7f23f62e97dd63059de1cd4af9
Florin Coras [Wed, 5 Jan 2022 18:16:07 +0000 (10:16 -0800)]
tcp: mark lost first sack hole on timeout
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1abff943f3fe3ff0219126b5b8beded4ad859758
Florin Coras [Wed, 5 Jan 2022 17:48:36 +0000 (09:48 -0800)]
tcp: handle start tx event in cubic
If app was idle update start time of current congestion avoidance phase
unless tcp connection was not idle.
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idf6a03a9ef96c409462de9f9cb19df609f730afe
Florin Coras [Thu, 6 Jan 2022 03:54:45 +0000 (19:54 -0800)]
tcp: always exit recovery if not in fastrecovery
Stay in fast recovery only if it's already on.
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idcdbbacfed3e5f3c991fa293c532be1c671f5217
Florin Coras [Wed, 5 Jan 2022 20:55:35 +0000 (12:55 -0800)]
tcp: exit retransmit before processing feedback
Type: refactor
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5838e4c370d0c02a21b5eadb4af3baae781df097
Florin Coras [Wed, 5 Jan 2022 16:47:11 +0000 (08:47 -0800)]
tcp: use bytes delivered to compute cwnd
Should estimated cwnd better with loss
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idd75d40dbab212ac0a5d533009c5540b1a58f4c4
Florin Coras [Mon, 3 Jan 2022 18:34:52 +0000 (10:34 -0800)]
tcp: cast timer ticks to u32
tc->rto * TCP_TO_TIMER_TICK can return garbage if not cast to u32 and
that confuses clib_max
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
signed-off-by: Vipul Agrawal <Vipul.Agrawal@enea.com>
Change-Id: Ief4d29b9625e2ef2e75e0c7e3d731ab147465f6d
Damjan Marion [Wed, 5 Jan 2022 22:25:12 +0000 (23:25 +0100)]
dpdk: cleanup MTU handling
Type: improvement
Change-Id: I4b929693f3671be8ee63a58afcbac75a27d99d57
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 5 Jan 2022 23:23:38 +0000 (00:23 +0100)]
dpdk: port type from speed_capa bitmap on Cisco VIC
enic driver now properly exposes speed_capa bitmap so this workaround
is not needed anymore.
Type: refactor
Change-Id: Ic754de0b9de32d488405ffcd8d62dd6aa035d2bc
Signed-off-by: Damjan Marion <damarion@cisco.com>
Nathan Skrzypczak [Wed, 15 Dec 2021 17:45:59 +0000 (18:45 +0100)]
tap: add num_tx_queues API
This adds a create_tap_v3 api that has a num_tx_queues
parameter allowing to create more than num_workers queues,
following on multi TX support
Type: feature
Change-Id: Idce433147e8dd165f842241d6c76e041e1b1c9b8
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Damjan Marion [Wed, 5 Jan 2022 20:30:54 +0000 (21:30 +0100)]
dpdk: remove unused defines
Type: refactor
Change-Id: I41d5d07eef670e89eba8fd816e123981940b5d79
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 5 Jan 2022 20:26:51 +0000 (21:26 +0100)]
dpdk: no need to copy default tx conf
Type: improvement
Change-Id: Ifd5201c101da7f4fb63f9b64280a6ec35b2af6a0
Signed-off-by: Damjan Marion <damarion@cisco.com>
Florin Coras [Wed, 5 Jan 2022 19:31:03 +0000 (11:31 -0800)]
dpdk: improve checksum computation
Type: improvement
Based on gerrit 26480 by chenmin.sun@intel.com
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id8f2127f0fac5f555b38483714fe92c038875915
Damjan Marion [Wed, 5 Jan 2022 00:52:38 +0000 (01:52 +0100)]
interface: refactor interface capabilities code
Make it shorter to type, easier to debug, make adding callbacks in
future simpler.
Type: improvement
Change-Id: I6cdd6375e36da23bd452a7c7273ff42789e94433
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 5 Jan 2022 13:51:50 +0000 (14:51 +0100)]
dpdk: move port config to single struct
Type: refactor
Change-Id: I0bce385c7e391fa2b74646d001980610f80f7062
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 5 Jan 2022 13:06:34 +0000 (14:06 +0100)]
vppinfra: few bitops inlines
Change-Id: I9aa01fafd5329a399aa9d72a6e2cc6c9d65dc85c
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 5 Jan 2022 00:28:55 +0000 (01:28 +0100)]
dpdk: remove unused flag
Type: refactor
Change-Id: Iff96a79323d7d428a779e9736e07c1dc9dddb518
Signed-off-by: Damjan Marion <damarion@cisco.com>
Tetsuya Murakami [Fri, 10 Dec 2021 16:11:07 +0000 (08:11 -0800)]
srv6-mobile: Update GTP4/6.D function
GTP4/6.D behavior is updated as shown below.
1. When receiving GTP-U message or IPv6 linklocal destination in inner IP, GTP packet is tnralated to SRv6.
2. When receiving T-PDU packet, OuterIP/UDP/GTP headers are stripped off and Inner IP is encapsulated into SRv6 based on L3VPN SRv6 manner.
Type: feature
Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
Change-Id: I6092c98ea80236d54017f84c5b35cca0b645f034
Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
Damjan Marion [Tue, 4 Jan 2022 19:07:32 +0000 (20:07 +0100)]
dpdk: keep buffer flags per-device
Type: improvement
Change-Id: Idb0b079df49c12643c9a93ee0effe011d3489068
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Tue, 4 Jan 2022 19:03:29 +0000 (20:03 +0100)]
dpdk: remove unused logging class
Type: refactor
Change-Id: I2de762953faa5056d5fefa678e4faafbe7710dc6
Signed-off-by: Damjan Marion <damarion@cisco.com>
Filip Varga [Fri, 12 Nov 2021 16:22:11 +0000 (17:22 +0100)]
dpdk: remove vlan-strip offload code
This code was actually never working. It was just used as workaround for
Cisco ENIC issue with tagged default vlan frames.
Today Cisco ENIC provides solution to this problem with devargs flags...
Change-Id: Ia8284274117cb200bf6c7f7911d945d5a093d878
Type: refactor
Signed-off-by: Damjan Marion <damarion@cisco.com>
Jakub Wysocki [Tue, 30 Nov 2021 10:53:03 +0000 (10:53 +0000)]
crypto: encrypt/decrypt queues sw_scheduler
Type: improvement
Previously multiple sw crypto scheduler queues per core design
caused unaverage frame processing rate for each async op ID –
the lower the op ID is the highly likely they are processed first.
For example, when a RX core is feeding both encryption and
decryption jobs of the same crypto algorithm to the queues at a
high rate, in the mean time the crypto cores have no enough
cycles to process all: the jobs in the decryption queue are less
likely being processed, causing packet drop.
To improve the situation this patch makes every core only owning
a two queues, one for encrypt operations and one for decrypt.
The queue is changed either after checking each core
or after founding a frame to process.
All crypto jobs with different algorithm are pushed to
thoses queues and are treated evenly.
In addition, the crypto async infra now uses unified dequeue handler,
one per engine. Only the active engine will be registered its
dequeue handler in crypto main.
Signed-off-by: DariuszX Kazimierski <dariuszx.kazimierski@intel.com>
Signed-off-by: PiotrX Kleski <piotrx.kleski@intel.com>
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Jakub Wysocki <jakubx.wysocki@intel.com>
Change-Id: I517ee8e31633980de5e0dd4b05e1d5db5dea760e
Damjan Marion [Tue, 4 Jan 2022 19:15:59 +0000 (20:15 +0100)]
dpdk: remove "convenience" vars
It is actually longer and slower...
Type: refactor
Change-Id: I0f126d4cdb13ecc60a2d370409f23820d7f7eb72
Signed-off-by: Damjan Marion <damarion@cisco.com>
Miroslav Miklus [Wed, 1 Dec 2021 20:35:59 +0000 (21:35 +0100)]
wireguard: fix 'wireguard add peer' cli behavior
- change 'port' to 'dst-port' to make the input self-explanatory
- add empty spaces to short help
Type: fix
Signed-off-by: Miroslav Miklus <miroslav.miklus@pantheon.tech>
Change-Id: I74c783e6e8629e61b1c100e9355d09cf5e35a750
Arthur de Kerhor [Tue, 4 Jan 2022 14:53:43 +0000 (15:53 +0100)]
ipsec: allow registering random ports in tests
We add the possibility to bind the destination UDP port of a Scapy SA
to the ESP layer in the IPsec tunnel protection tests, even if it is not
the default port for ESP (4500).
This allows to test IPSec tunnel protection with ports other than 4500
in the UDP header, without hardcoding them in the Scapy patch (ex: 4545)
Type: improvement
Change-Id: I1eea3d4660ed1b59d827250a419af6b7b41c4a72
Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
Florin Coras [Mon, 3 Jan 2022 22:32:26 +0000 (14:32 -0800)]
nsim: cli improvements
- improve format and unformat of bandwidth and delay
- integer packet size
- track worker wheel size as config
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I616fa96237c5e06d9c809bb5c2e0bed0447f2c4d
Filip Varga [Fri, 12 Nov 2021 16:22:11 +0000 (17:22 +0100)]
nat: remove nat44-ed relation between SM and addr
Change [1] put static mappings in flow hash. This change also broke
relationship between nat pool addresses and static mappings. Port and
address are no longer reserved in nat pool address records for a new
static mapping.
Because of this change both nat objects and their configuration can
function independently. This change also removed already broken logic of
having static-mapping-only configuration.
In this patch i have cleaned up and removed unnecessary logic for static
mapping configuration functions, address configuration functions,
interface configuraiton functions and all callback functions used for
resolving interface address bound records.
No more viable configuration option static-mapping-only is also removed
because there is no more option to run traffic through vpp for static
mappings without having flow hash table allocated. Instead user is now
able to create static mapping records without using nat pool addresses.
Fixed and improved management of required fib entries (ensuring VPP will
reply to ARP for all external addresses on outside interfaces) through
holding a refcount for their creation and removal.
[1] https://gerrit.fd.io/r/c/vpp/+/34077
Type: improvement
Change-Id: Ic16deefbede833d574c2a5972155c9afa5bc62ce
Signed-off-by: Filip Varga <fivarga@cisco.com>
Filip Varga [Mon, 4 Oct 2021 12:36:05 +0000 (14:36 +0200)]
nat: nat44-ed pool address allocation improvement
This patch improves algorithm responsible for choosing nat pool address
during dynamic session creation.
Patch synchronizes nat pool address attributes with vpp interfaces doing
so gives nat option to determine correct nat pool address when creating
dynamic session.
Improvements:
* match dst address subnet and src fib with nat pool address
* for output-feature also fallback match of tx_sw_if_index with nat
pool address
Type: improvement
Change-Id: I594638bc76fc1153f582add376838b4b72ff573a
Signed-off-by: Filip Varga <fivarga@cisco.com>
Matthew Smith [Tue, 21 Dec 2021 15:00:05 +0000 (09:00 -0600)]
vrrp: fix support for VRs in different FIBs
Type: fix
Fixes:
4b1b13315a3c
When adding or deleting a VR, multicast routes can be added or deleted.
When the first VR is added, a local (dpo-receive) route is added. The
route is deleted when the last VR is deleted.
Perform the check on whether to add or delete the route on a per-FIB
basis. Otherwise, if the route is only added after the first VR is added
without regards to the FIB being used and a second VR is added later on
an interface attached to a different FIB, the necessary route will not be
added to the FIB used by the second interface.
Change-Id: Ib30925ecf45c714cfe3ac6a223754bea918f10e3
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
jiangxiaoming [Thu, 30 Dec 2021 08:52:38 +0000 (08:52 +0000)]
vppinfra: fix bitmap can't get correct next clear index
when bitmap vec len is 1 and all the bits has been
occupied, clib_bitmap_next_clear(ai, 63) will
return result:65 which should be 64. It will lead to
missing iteration for pool_foreach.
Type: fix
Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Change-Id: Iadac7e6f6b4da357943c4c9d50bf22353c4a8408
Neale Ranns [Fri, 31 Dec 2021 09:18:31 +0000 (09:18 +0000)]
fib: Refetech the adj after the walk in case the pool realloc'd
Type: fix
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I8734c72cf15533d6614fbeb53b95c824dbd251a9
Neale Ranns [Fri, 31 Dec 2021 10:37:45 +0000 (10:37 +0000)]
misc: Remove the unused GBP fields from the buffer meta-data
Type: refactor
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I92496501360ee073795206bde87f4731a5ce074c
Damjan Marion [Tue, 28 Dec 2021 19:32:20 +0000 (20:32 +0100)]
vlib: remove external thread management support
Now DPDK have API to register external threads so we can remove this
mess...
Type: improvement
Change-Id: I71a21f0cd94bd668aa406710c75a0bcc63fdc840
Signed-off-by: Damjan Marion <damarion@cisco.com>
Florin Coras [Wed, 29 Dec 2021 23:44:48 +0000 (15:44 -0800)]
svm: merge want deq and leq threshold notifications
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2775af35386a4e52ba82991c68bce6c56f13410f
Michal Kalderon [Wed, 24 Nov 2021 09:33:15 +0000 (01:33 -0800)]
http_static: Fix timeout on large files
When trying to read files that are larger than the fifo
a timeout was reached on client side leading to an abort of the request
and a retry (sending another GET command).
The svm fifo notification request was set to notify when the fifo is no
longer full, this lead to an inefficient loop of sending small amounts
of data each time with a large overhead of context switch and waiting
for the next notification, eventually leading to a timeout.
Modifying the trigger on the svm-fifo to be notified on a preset threshold
value enabled sending larger amounts of data between context switches and
sending large files more efficiently. This solved the timeout issue.
In addition, cap the max write from application to 4MB to avoid running
into a case of trying to allocate chunks that are too large.
Reproduce:
Server:
http static server www-root /var/www/data uri tcp://0.0.0.0/80 cache-size 5m fifo-size 300
Client:
wget http://11.0.0.2/file_of_size_32M
Type: fix
Change-Id: Idfceedffd935da9486cde820e9dca5dad69d9ca5
Signed-off-by: Yuval Caduri <cyuval@marvell.com>
Signed-off-by: Michal Kalderon <mkalderon@marvell.com>
Michal Kalderon [Tue, 21 Dec 2021 12:41:53 +0000 (04:41 -0800)]
svm: Add support for thresh dequeue notification
Add the ability to set a threshold on the fifo that will
be used to notify caller when de-queue from the fifo reached
a value that is less than or equal to the threshold.
Type: feature
Change-Id: I70ba1a05f783ce5247409e9beebe4e336b7c1eb5
Signed-off-by: Michal Kalderon <mkalderon@marvell.com>
Signed-off-by: Yuval Caduri <cyuval@marvell.com>
Mercury [Fri, 24 Dec 2021 03:58:27 +0000 (11:58 +0800)]
tcp: set sw_if_index in tcp src-address cli
the receive dpo added by tcp src-address cli do not have a valid sw_if_index ,
ip4_local_check_src() and tcp_input_lookup_buffer() will set ~0 to vnet_buffer(b)->sw_if_index[VLIB_RX],
which will cause crash in tcp46_reset_inline,
Type: fix
Signed-off-by: Mercury <mercury124185@gmail.com>
Change-Id: Ie01c31f3575e14187c6380ebcfff96fcb6098cde
Damjan Marion [Thu, 23 Dec 2021 12:19:15 +0000 (13:19 +0100)]
ip: remove archaic vector code from mtrie
Type: improvement
Change-Id: Ib39478a2e6991d721c4ba3ea61c97bfb07238016
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Thu, 23 Dec 2021 16:05:02 +0000 (17:05 +0100)]
vlib: introduce vlib frame aux data
Type: improvement
Change-Id: I53890a13210cfb0d2b2d9d8cfd9b15118d3bb273
Signed-off-by: Damjan Marion <damarion@cisco.com>
Mercury [Thu, 23 Dec 2021 11:15:02 +0000 (19:15 +0800)]
tcp: fix endpoint lookup failed caused by key uninitialized
fix ipv4 key uninitialized in local_endpoints_table,
which will cause transport_endpoint_cleanup() failed
to lookup the endpoint and can not delete it,
as for ipv6, clib_memcpy_fast() will change all bytes of lcl_addr
and there maybe no need to initalize,
Type: fix
Signed-off-by: Mercury <mercury124185@gmail.com>
Change-Id: I56676493a393b1d64eaa438224e256094ca75d2f
Florin Coras [Wed, 22 Dec 2021 20:54:17 +0000 (12:54 -0800)]
session svm: track fs and seg manager index in fs
Simplifies allocation of fifos as fifo segment and segment manager
indices can be set at alloc time.
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibd357b3ff0279d8deefcdcb17010b4068007ccb7
Damjan Marion [Wed, 22 Dec 2021 20:58:54 +0000 (21:58 +0100)]
vppinfra: add format_u64_bitmap function
Sample output:
60 56 52 48 44 40 36 32 28 24 20 16 12 8 4 0
0x0020 .... .... .... .... .... .... .... .... .... .... .... .... ..11 .... ...1 1... 0x0000000000003018
0x0018 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 111. .1.1 0xffffffffffffffe5
0x0010 .... .... .... .... .... .... ..1. ...1 .1.1 1... 11.. 1... .... .1.. 1111 ..11 0x0000002158c804f3
0x0008 .... .... .... .... .... .... .... .... .... .... .... .... .... .... ..1. 11.. 0x000000000000002c
0x0000 .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ...1 0x0000000000000001
Type: improvement
Change-Id: Ib99129866ad5a1d2d52be6855406e2829aa9ec3e
Signed-off-by: Damjan Marion <damarion@cisco.com>
Florin Coras [Wed, 1 Dec 2021 04:21:57 +0000 (20:21 -0800)]
session: fix segment alloc/free worker race
Avoid scenarios where a worker allocates a segment but while it drops
the segment manager writer lock and acquires the reader lock another
worker uses the segment and frees it.
Type: fix
Thanks to wanghanlin@corp.netease.com for the report.
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0a88d738c51b33fd07c34916f125c98806861a06
Damjan Marion [Wed, 22 Dec 2021 11:22:59 +0000 (12:22 +0100)]
vppinfra: add bihash 12_4 template
Type: feature
Change-Id: I8a6b2c7d7682a01c472d7375d444e8b43eb5db04
Signed-off-by: Damjan Marion <damarion@cisco.com>
liuyacan [Wed, 22 Dec 2021 08:41:21 +0000 (16:41 +0800)]
vppinfra: fix map_lock issue
The release of the map_lock is a bit too early, it needs to wrap
mprotect(), otherwise the access rights of hdr may be deprived of
other worker threads.
Type: fix
Signed-off-by: liuyacan <liuyacan@corp.netease.com>
Change-Id: I9cb89d49a097ec6d5ae9fd2af2bddf967ec946e9
Damjan Marion [Wed, 8 Dec 2021 12:48:37 +0000 (13:48 +0100)]
memif: refactor descriptor handling in the input node
Type: improvement
Change-Id: I06130447b4e6f4726c4f5bffbe606385c45b8bd4
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 22 Dec 2021 11:25:49 +0000 (12:25 +0100)]
vlib: null terminate elog string
Type: fix
Fixes:
bc867c3
Change-Id: Ibcdb46d3b322195f5573e5ec93b31e177acaca49
Signed-off-by: Damjan Marion <damarion@cisco.com>
Florin Coras [Mon, 7 Jun 2021 18:41:21 +0000 (11:41 -0700)]
hsi: host stack intercept plugin
Enable selective punting of flows to host stack
Type: feature
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib31a3abfe3b21a2aa448bfacc4591fa5c840f935
Filip Tehlar [Mon, 20 Dec 2021 14:40:59 +0000 (14:40 +0000)]
tls: don't add listen to lookup table
Type: fix
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I0432dd0209f9c7702a8497161e21e178ee243bb1
Neale Ranns [Mon, 20 Dec 2021 18:18:42 +0000 (18:18 +0000)]
fib: MPLS EOS chains built for attached prefixes should link to a lookup DPO
Type: fix
Presently a local label associated with an attached or connected prefix will link to the glean. This is a problem since it will never use the adj-fibs that are installed for that attached prefix. Instead link the local label to a lookup in the table in which the attached link is bound.
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Iad49fb6168b9ba47216a9a52bd262363b49c3c43
jinsh [Sat, 18 Dec 2021 14:24:26 +0000 (22:24 +0800)]
vrrp:fix vrrp vr delete case memory leak
when vrrp vr delete, vr->config.peer_addrs not free
Type: fix
Signed-off-by: jinsh <jinsh11@chinatelecom.cn>
Change-Id: I9ead188d6409412b475b5f6add767cb58f1af6e0
Florin Coras [Sun, 19 Dec 2021 19:38:30 +0000 (11:38 -0800)]
session: ignore rpc in fifo event lookups
RPCs are not associated to sessions.
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6b7870a3ebc2e8f32a6c1b10e2552d9e074c7eb3
Florin Coras [Thu, 16 Dec 2021 18:09:17 +0000 (10:09 -0800)]
session: improve sh segment-manager cli
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5d669fcba609bcdb35103f57c45e0a270213d84a
Klement Sekera [Fri, 17 Dec 2021 12:47:51 +0000 (12:47 +0000)]
ip: SVR fix race condition
There could be a race condition where two fragments of one chain end up
at the same time on different workers, one overwriting others hash
entry. Add a check for that and restart processing on the unlucky worker
who ends up being second from hash table POV. This will then result in a
proper handover to worker now owning this reassembly.
Type: fix
Fixes:
de34c35fc73226943538149fae9dbc5cfbdc6e75
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I9eb29c5cb1ffe3b5eb1d5a638e17ab7ba2628d28
Neale Ranns [Sun, 19 Dec 2021 15:10:20 +0000 (15:10 +0000)]
fib: Incorrect logic for IPv6 link-local attached export.
Type: fix
IPv6 link-local FIB entries are never needed for attached export.
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I08aad78e754d89ad54d07a211fb7a0d7fbc7a0fe
Frédéric Perrin [Fri, 17 Dec 2021 14:38:38 +0000 (14:38 +0000)]
bfd: fix NULL dereference in bfd_api_verify_common
ip6_get_link_local_address() may return NULL if the local interface
is not (or not yet) configured
Type: fix
Signed-off-by: Frédéric Perrin <fred@fperrin.net>
Change-Id: I42bf2081582c4a36fa4e32145ca2f0ff73488110
benker [Tue, 14 Dec 2021 15:31:14 +0000 (15:31 +0000)]
vppinfra: missing __clib_export
Type: fix
hash_resize is available in hash.h file, but missing __clib_export in hash.c
Signed-off-by: Leung Lai Yung <benkerbuild@gmail.com>
Change-Id: Ibb741b532cd1080ec5d8314aae8dbbca87f42502
Florin Coras [Tue, 23 Nov 2021 05:19:01 +0000 (21:19 -0800)]
session: app mq congestion detection
Detect mq congestion and handle it by queueing messages in a fifo and
postponing handling via rpcs. App workers with congested mqs cannot
accept nor connect additional sessions.
Type: feature
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I401d971a1a53896758b88fc60f158cbc31e0c7cb
Damjan Marion [Thu, 16 Dec 2021 12:23:23 +0000 (12:23 +0000)]
vppinfra: clang doesn't know about attribute noclone
Type: fix
Fixes:
88019c40
Change-Id: I219597c95883f49b6ff51e65e6c6c80e3c1518b7
Signed-off-by: Damjan Marion <dmarion@me.com>
Klement Sekera [Mon, 22 Nov 2021 20:25:57 +0000 (21:25 +0100)]
ip: add tests for message size verification
Coverity complained that there is boundary checking in
add_del_punt_redirect_v2 handler. This test proves that such boundary
checking is not necessary as it is handled in the common path.
Type: test
Change-Id: Ibec054c01d4eb057accdc9d5732aba6fe6de51cc
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Benoît Ganne [Tue, 9 Nov 2021 17:34:36 +0000 (18:34 +0100)]
af_xdp: mark API as stable
Type: improvement
Change-Id: I55b080f994eafc4ecfe0e774d7cd05218d715526
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Florin Coras [Wed, 15 Dec 2021 03:30:04 +0000 (19:30 -0800)]
vppinfra: fix clib_fifo_elt_at_index
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4924420b827bdf7d161a1f723c2bfd5370d43772
Benoît Ganne [Wed, 1 Dec 2021 10:01:58 +0000 (11:01 +0100)]
af_xdp: bump libbpf version to 0.5
Type: improvement
Change-Id: Ia089a82a460b69e0edf69c8b8d3dc2814fa54c35
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Neale Ranns [Wed, 15 Dec 2021 12:59:26 +0000 (12:59 +0000)]
api: Fix reaper functions for socket clients
Type: fix
The pub_sub_handler() stores registrations key'd with the message's client_index (which is in network-order).
The socket-client invokes the reaper function (to cleanup these registrations) using the pool index of the registration. hence the pub-sub registration is not removed.
change the socket-client to pass the network-order client_index.
This approach was chosen in preference to chaning the way the registrations are key'd since the memory-client also uses this registration, and correclty passes the client_index to the reaper.
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I6118555c8601149d05801f558e08bcc7aed4fc98
Damjan Marion [Wed, 15 Dec 2021 10:17:04 +0000 (10:17 +0000)]
vppinfra: toeplitz hash four in parallel
Type: improvement
Change-Id: Icb3f39f42d01c51d7b03543cb7d6b5dabad11866
Signed-off-by: Damjan Marion <dmarion@me.com>
Mohsin Kazmi [Mon, 13 Dec 2021 18:32:42 +0000 (18:32 +0000)]
virtio: integrate with new tx infra
Type: improvement
Change-Id: I337ec63d0868f665329d68eadf1744e080b73a0d
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Damjan Marion [Sun, 28 Nov 2021 21:57:15 +0000 (22:57 +0100)]
vppinfra: toeplitz hash
Type: feature
Change-Id: I0ccf280c4b769ee624cfb780146b847a0e8e4942
Signed-off-by: Damjan Marion <dmarion@me.com>
Damjan Marion [Tue, 14 Dec 2021 09:40:48 +0000 (10:40 +0100)]
vppinfra: display cpu frequency in test_vector_funcs perf test
Type: improvement
Change-Id: I350a30eca0d3d7ec8816e4e7c30889621029c694
Signed-off-by: Damjan Marion <damarion@cisco.com>
Nathan Skrzypczak [Tue, 9 Nov 2021 17:18:21 +0000 (18:18 +0100)]
interface: Add interface monitor cli
This adds an interface CLI 'monitor
interface <interface>' that periodically
reports rx/tx pps & bandwidth for a
given interface.
Type: feature
Change-Id: Ia9d59b3443913520a52b38d7bda012190be6f167
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Jieqiang Wang [Mon, 29 Nov 2021 14:25:03 +0000 (14:25 +0000)]
crypto-native: fix build error on Arm using clang-13
Building VPP on Arm using clang-13 as compiler will fail with following
error message. The root cause is the unmatched alignment of parameter
key for functions aes128_key_expand/aes256_key_expand on aarch64.
Fix this error by explicitly declaring parameter key as type u8x16u.
[285/2593] ccache /home/snowball/tasks/benchmark_compilers/clang_13/bin/clang-13 --target=aarch64-linux-gnu -D_FORTIFY_SOURCE=2 -I/home/snowball/tasks/benchmark_compilers/vpp-clang-13/src -ICMakeFiles -I/home/snowball/tasks/benchmark_compilers/vpp-clang-13/src/plugins -ICMakeFiles/plugins -fPIC -g -fPIC -Werror -Wall -Wno-address-of-packed-member -O3 -fstack-protector -fno-common -march=armv8.1-a+crc+crypto -MD -MT CMakeFiles/plugins/crypto_native/CMakeFiles/crypto_native_armv8.dir/aes_cbc.c.o -MF CMakeFiles/plugins/crypto_native/CMakeFiles/crypto_native_armv8.dir/aes_cbc.c.o.d -o CMakeFiles/plugins/crypto_native/CMakeFiles/crypto_native_armv8.dir/aes_cbc.c.o -c /home/snowball/tasks/benchmark_compilers/vpp-clang-13/src/plugins/crypto_native/aes_cbc.c
FAILED: CMakeFiles/plugins/crypto_native/CMakeFiles/crypto_native_armv8.dir/aes_cbc.c.o
ccache /home/snowball/tasks/benchmark_compilers/clang_13/bin/clang-13 --target=aarch64-linux-gnu -D_FORTIFY_SOURCE=2 -I/home/snowball/tasks/benchmark_compilers/vpp-clang-13/src -ICMakeFiles -I/home/snowball/tasks/benchmark_compilers/vpp-clang-13/src/plugins -ICMakeFiles/plugins -fPIC -g -fPIC -Werror -Wall -Wno-address-of-packed-member -O3 -fstack-protector -fno-common -march=armv8.1-a+crc+crypto -MD -MT CMakeFiles/plugins/crypto_native/CMakeFiles/crypto_native_armv8.dir/aes_cbc.c.o -MF CMakeFiles/plugins/crypto_native/CMakeFiles/crypto_native_armv8.dir/aes_cbc.c.o.d -o CMakeFiles/plugins/crypto_native/CMakeFiles/crypto_native_armv8.dir/aes_cbc.c.o -c /home/snowball/tasks/benchmark_compilers/vpp-clang-13/src/plugins/crypto_native/aes_cbc.c
In file included from /home/snowball/tasks/benchmark_compilers/vpp-clang-13/src/plugins/crypto_native/aes_cbc.c:22:
/home/snowball/tasks/benchmark_compilers/vpp-clang-13/src/plugins/crypto_native/aes.h:415:40: error: passing 1-byte aligned argument to 16-byte aligned parameter 2 of 'aes128_key_expand' may result in an unaligned pointer access [-Werror,-Walign-mismatch]
aes128_key_expand (key_schedule, (u8x16u const *) key);
^
/home/snowball/tasks/benchmark_compilers/vpp-clang-13/src/plugins/crypto_native/aes.h:421:40: error: passing 1-byte aligned argument to 16-byte aligned parameter 2 of 'aes256_key_expand' may result in an unaligned pointer access [-Werror,-Walign-mismatch]
aes256_key_expand (key_schedule, (u8x16u const *) key);
^
2 errors generated.
Type: fix
Fixes:
415b4b0bb ("crypto-native: refactor GCM code to use generic types")
Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
Reviewed-by: Lijian Zhang <lijian.zhang@arm.com>
Reviewed-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: Ic99a63526031e60760929238922a6e4547388368
Tianyu Li [Mon, 6 Dec 2021 05:15:59 +0000 (13:15 +0800)]
misc: vppctl fix heap-buffer-overflow & memleaks
1. Malloc may return not zero buffer, causing strncat buffer overflow
2. Malloc buffer not freed
Type: fix
Fixes:
31f192434660 ("misc: vppctl - remove the dependency on vppinfra")
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I5aebaccf3d0f8b7e3617068267f62cc2aa39d827
Steven Luong [Mon, 13 Dec 2021 19:26:30 +0000 (11:26 -0800)]
vxlan: crash on configuring vxlan tunnel on l3 mode
Configure a vxlan tunnel using this CLI and then assign an ip address to
the vxlan tunnel cause VPP to crash immediately
create vxlan tunnel src x.x.x.x dst y.y.y.y vni 1000 decap-next node ethernet-input l3
set interface ip address vxlan_tunnel0 z.z.z.z/24
It looks like when l3 mode is configured, the code calls the wrong function
to register the interface
Type: fix
Fixes:
3e38422ab905d26ab1625c74268e30c94327ea54
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ie1a08efc028f37fb528a7dfd7048ff6836bb8ddc
Klement Sekera [Mon, 22 Nov 2021 20:26:20 +0000 (21:26 +0100)]
api: verify message size on receipt
When a message is received, verify that it's sufficiently large to
accomodate any VLAs within message. To do that, we need a way to
calculate message size including any VLAs. This patch adds such
funcionality to vppapigen and necessary C code to use those to validate
message size on receipt. Drop messages which are malformed.
Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I2903aa21dee84be6822b064795ba314de46c18f4
Klement Sekera [Wed, 1 Dec 2021 10:14:38 +0000 (10:14 +0000)]
ip: reassembly: drop zero length fragments
Zero length fragments are invalid and should be dropped. This patch adds
that.
Type: improvement
Change-Id: Ic6466c39ca8bf376efe06bb3b7f5d7f1ae812866
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Damjan Marion [Sun, 12 Dec 2021 21:43:56 +0000 (21:43 +0000)]
vppinfra: multiple perf bundle support in test_vector_funcs
Type: improvement
Change-Id: I93be722f4dabc2b49a5e83f61f4eb1d72f5f7d45
Signed-off-by: Damjan Marion <dmarion@me.com>
Mercury [Sun, 12 Dec 2021 00:45:38 +0000 (08:45 +0800)]
arp: fix arp_vft callback
arp proxy is not enabled correctly by ip4_neighbor_proxy_enable()
Type: fix
Signed-off-by: Mercury <mercury124185@gmail.com>
Change-Id: I672b5d4a9652030b5604e9d39743c39cb93a2531
Mercury [Sat, 11 Dec 2021 07:58:32 +0000 (15:58 +0800)]
tcp: fix the tcp src-address cli
When the src-address to add match a route
without a valid output interface(such as default route 0.0.0.0/0),
fib_entry_get_resolving_interface() will return (u32)~0,
which will cause crash in ip4_neighbor_proxy_enable().
Type: fix
Signed-off-by: Mercury <mercury124185@gmail.com>
Change-Id: I5aee5676a2ff43ec06745ebed4dba2b9e5b98c4d
Klement Sekera [Tue, 7 Dec 2021 09:49:53 +0000 (09:49 +0000)]
ip: reassembly: handle atomic fragments correctly
If a fragment arrives with fragment offset = 0 and M = 0, it means that
this is actually a complete packet and per RFC 8200, it should be
treated independently from other fragments. This patch does that.
Fragmentation header is stripped and fragment is forwarded irregardles
of other existing reassemblies in case of full reassembly and treated
the same way as regular packet in shallow virtual reassembly.
Type: improvement
Change-Id: If3322d5e3160cd755b8465a642702a9166d46cc2
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Florin Coras [Thu, 9 Dec 2021 18:24:31 +0000 (10:24 -0800)]
dpdk: disable l4 csum offload for vmxnet3
TCP csum offload fails although udp seems to work.
Type: fix
Fixes:
fa1fb60
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie0651887b09920365806eaad776b0d13059faee8
Damjan Marion [Thu, 9 Dec 2021 10:34:44 +0000 (11:34 +0100)]
build: fix PYTHONPYCACHEPREFIX path
Type: make
Change-Id: I20fd245585e5b62ff20fe3adf20b14bfef47a9ca
Signed-off-by: Damjan Marion <damarion@cisco.com>
Florin Coras [Wed, 8 Dec 2021 19:03:08 +0000 (11:03 -0800)]
vcl: validate closed sessions on disconnect and reset
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0375d639e979e29d287dc9fee16b0434fb5c788b
Han Wu [Thu, 2 Dec 2021 12:13:24 +0000 (20:13 +0800)]
memif: fix the memory leak when memif cli getting wrong parameters inputs
Type: fix
Signed-off-by: Han Wu <wuhan9084@163.com>
Change-Id: I0aeafd273b3d1d01df02d638c72461943f91ef90
Klement Sekera [Thu, 2 Dec 2021 16:36:34 +0000 (16:36 +0000)]
api: improve REPLY_MACRO safety
Improve vppapigen to generate per-message #define indicating whether
said message is dynamically sized (due to VLA or string) or not. Use
these #defines in REPLY_MACROs to prevent improper usage. Fix existing
improper REPLY_MACRO* usage.
Type: improvement
Change-Id: Ia77aaf9f6cf3ed68ea21075a4cc8deda78a68651
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Florin Coras [Tue, 7 Dec 2021 23:12:06 +0000 (15:12 -0800)]
session: stricter tx checks for ct sessions
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ied4fe0f2b35eeca4e3e82fa21346de7f243aa52a
Florin Coras [Tue, 7 Dec 2021 22:47:12 +0000 (14:47 -0800)]
session: fix duplicate segment del message
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I42b5a5a07aae6708a20ed424c8f26ddbe91278fb
Florin Coras [Sat, 4 Dec 2021 01:24:13 +0000 (17:24 -0800)]
vcl: debug code improvements
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I18cd4131c692e776c98eba36161813035e9dec53
Florin Coras [Sat, 4 Dec 2021 01:03:37 +0000 (17:03 -0800)]
vcl: handle reordering of disconnect and reset msgs
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I817e8510029a060876697701b81a952286597db1
Jakub Grajciar [Wed, 1 Dec 2021 08:07:09 +0000 (09:07 +0100)]
libmemif: reset memif buffer flags
Reset memif_buffer_t flags in memif_buffer_alloc and
memif_rx_burst
Type: fix
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: If62ba510fad783afb9f7f58411562b6989fa1573
Klement Sekera [Tue, 26 Oct 2021 14:23:11 +0000 (16:23 +0200)]
fib: fix coverity warning/don't dereference NULL
fib_sas6_get is called with NULL dst explicitly so add a NULL check to
avoid a NULL dereference.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I8ebcba98832f374991f5442c1b83a4b6e64771d0
Florin Coras [Sat, 4 Dec 2021 07:02:13 +0000 (23:02 -0800)]
vcl: fix ldp shared listener bitmap leak
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id1e273bf80c1cc687ce7e5ea3b8cc6a3ec3862f9
Damjan Marion [Mon, 6 Dec 2021 12:21:33 +0000 (13:21 +0100)]
vppinfra: add 'filter' option to test_vector_funcs
Type: improvement
Change-Id: I5ed9029e5dc1368b7debbef04a3ac439a61af9ea
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Mon, 6 Dec 2021 11:48:46 +0000 (12:48 +0100)]
vppinfra: sha2 tests
Type: improvement
Change-Id: I8a5d8d5db4e4a8ee3a1164bfbe91badff181d06a
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Fri, 3 Dec 2021 13:07:41 +0000 (14:07 +0100)]
build: leave to CMake to deal with -fPIE
Type: make
Change-Id: Icced0e09b75b3114b1652d552e288091968ee7cc
Signed-off-by: Damjan Marion <damarion@cisco.com>
Matthew Smith [Wed, 1 Dec 2021 20:02:35 +0000 (20:02 +0000)]
ipsec: fix async buffer leak
Type: fix
Fixes:
f16e9a5507
If an attempt to submit an async crypto frame fails, the buffers that
were added to the frame are supposed to be dropped. This was not
happening and they are leaking, resulting in buffer exhaustion.
There are two issues:
1. The return value of esp_async_recycle_failed_submit() is used to
figure out how many buffers should be dropped. That function calls
vnet_crypto_async_reset_frame() and then returns f->n_elts. Resetting
the frame sets n_elts to 0. So esp_async_recycle_failed_submit() always
returns 0. It is safe to remove the call to reset the frame because
esp_async_recycle_failed_submit() is called in 2 places and a call to
reset the frame is made immediately afterwards in both cases - so it
is currently unnecessary anyway.
2. An array and an index are passed to esp_async_recycle_failed_submit().
The index should indicate the position in the array where indices of the
buffers contained in the frame should be written. Across multiple calls,
the same index value (n_sync) is passed. This means each call may overwrite
the same entries in the array with the buffer indices in the frame rather
than appending them to the entries which were written earlier. Pass n_noop
as the index instead of n_sync.
Change-Id: I525ab3c466965446f6c116f4c8c5ebb678a66d84
Signed-off-by: Matthew Smith <mgsmith@netgate.com>