Mohsin Kazmi [Fri, 5 Nov 2021 16:13:57 +0000 (16:13 +0000)]
virtio: fix the initialization
Type: fix
Fixes:
d96b28ac0917 ("virtio: improve input node performance")
vlib_buffer_t is defined on stack to be used for input feature arc
lookup once per frame call for performance reasons. The definition
is missing the initialization to avoid the assignment of garbage value.
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ie7930186bbd8240c44d257808ebd31e06e854b29
Klement Sekera [Tue, 2 Nov 2021 14:33:55 +0000 (15:33 +0100)]
ip: speed up reassembly code compilation
Refactor code so that code is inlined in one place instead of in
multiple to speed up compilation.
Type: refactor
Change-Id: I41357b89715b66ebdc8c0d5ccd69347a254fc266
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Klement Sekera [Wed, 3 Nov 2021 16:57:28 +0000 (17:57 +0100)]
ip: reassembly: avoid reading truncated L4 headers
Check if L4 headers are truncated and if so, set a flag for (future)
consumers instead of reading/writing garbage data.
Type: fix
Fixes:
de34c35fc73226943538149fae9dbc5cfbdc6e75
Change-Id: I0b656ec103a11c356b98a6f36cad98536a78d1dc
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Steven Luong [Wed, 3 Nov 2021 23:49:04 +0000 (16:49 -0700)]
vppinfra: strstr_s_inline checks string unterminated wrong
When checking whether s2 is unterminated, it uses s1max. It should
use s2max.
Type: fix
Fixes:
b0598497afde60146fe8480331c9f96e7a79475a
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I8a0b8ceebc2dd18402a87274add528c3d085a95a
Ray Kinsella [Wed, 3 Nov 2021 09:13:41 +0000 (09:13 +0000)]
pci: allocate and set length pci product name
Original fix for this issue, allocated sufficent memory but didn't set the
vector length correctly.
Type: fix
Fixes:
7d0ca6af0
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I3c8ce310d7a6266840a2d8d6b8620254acd042ab
Gabriel Oginski [Fri, 8 Oct 2021 08:09:45 +0000 (09:09 +0100)]
wireguard: reduce memcopy and prefetch header
Originally wireguard implementation does memory copy of the whole
packet in encryption and decryption.
This patch removes unnecessary packet copy in wireguard. In addition,
it contains some performance improvement such as prefetching header
and deleting unnecessary lock and unlock for decryption.
Type: improvement
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I1fe8e54d749e6922465341083b448c842e2b670f
Florin Coras [Wed, 3 Nov 2021 00:13:15 +0000 (17:13 -0700)]
tcp: make buffer reset function public
Also does a bit of code cleanup.
Type: refactor
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ifbff1e03a2e1fdca98925fdd3db7eb230ff24a37
liuyacan [Mon, 1 Nov 2021 02:22:09 +0000 (10:22 +0800)]
vcl: fix event triggered after closing connections.
Improve the accuracy of epoll event(EPOLLRDHUP).
Type: fix
Signed-off-by: liuyacan <liuyacan@corp.netease.com>
Change-Id: Ia31e696a0666c417ca99e684c6a4515f1cafc646
Neale Ranns [Mon, 4 Oct 2021 15:28:47 +0000 (15:28 +0000)]
linux-cp: Cleanup any existing pairs when an interface is deleted
Type: fix
This only happens when the user deletes the physical before they delete the pair, that's not supoosed to be the case, but don't crash if it is.
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I8c2317b360d897775dde23833d04430f88531cbd
Neale Ranns [Fri, 22 Oct 2021 14:10:06 +0000 (14:10 +0000)]
ipsec: Support the single IPSec interface dump
Type: fix
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I93c819cdd802f0980a981d1fc5561d65b35d3382
Neale Ranns [Mon, 25 Oct 2021 09:13:00 +0000 (09:13 +0000)]
tests: Apply the 'return self' pattern for the L2 objects
Type: test
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I3286fbf09d18719546ba80e9cb81c7e58f87a603
Klement Sekera [Mon, 25 Oct 2021 11:39:13 +0000 (13:39 +0200)]
ip: fix coverity warning
Remove unnecessary NULL check of t0, which causes coverity to scream. t0
is always initilised to *something* by doing pool_elt_at_index().
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I7cf21767c43a24923e490ad40622743c17142fe2
Benoît Ganne [Thu, 28 Oct 2021 08:50:47 +0000 (10:50 +0200)]
fib: allow vnet rewrite max size to be smaller the pre_data
There is no reason to enforce vnet rewrite size to be equal to pre_data.
Moreover, since vnet rewrite size is now saved as u8, this limits
pre_data to 192 bytes.
Type: fix
Fixes:
7dbf9a1a4fff5c3b20ad972289e49e3f88e82f2d
Change-Id: I3f848aa905ea4a794f3b4aa62c929a481261a3f1
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Dave Wallace [Sat, 30 Oct 2021 19:30:38 +0000 (15:30 -0400)]
tests: update python packages
- Also fix docs requirements and venv cleanup
required for docker executor building
Type: test
Change-Id: I839423224d95c45af42f459217887f4201cbb11a
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Sivaprasad Tummala [Tue, 2 Nov 2021 05:34:10 +0000 (11:04 +0530)]
snort: fix inconsistent snort input mode
Type: fix
Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com>
Change-Id: If42bb9924fa8298b5fac679bc1f2dc1f5b1ad58c
Klement Sekera [Tue, 2 Nov 2021 17:42:17 +0000 (18:42 +0100)]
tests: change code to avoid gcc-11 warning
For some reason gcc-11 doesn't like memcpy in a particular location,
change memcpy to assignment.
Type: refactor
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Iddf4b788cdca8e55221b121e74cf50b1e6bdf2d5
Ray Kinsella [Fri, 15 Oct 2021 16:53:24 +0000 (17:53 +0100)]
build: remove unnecessary executable bits
Run 'find src -executable -type f', remove unnecessary executable bits from the
source tree.
Type: refactor
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I070e22c8fb2ef8712bc3ea620727ee5ab3d9a9fb
Ray Kinsella [Tue, 2 Nov 2021 13:44:13 +0000 (13:44 +0000)]
perfmon: added bundle to measure pci bandwidth
Added an Intel Ice Lake specific bundles to measure pci bandwidth through the
Intel IO PMU. The "PCI" bundle measures read/writes from pci devices. The "CPU"
bundle measure read/writes from cpus to pci devices.
Type: improvement
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: Id48cef5988113e8dc4690b97d22243311bfa7961
Ray Kinsella [Tue, 2 Nov 2021 13:41:06 +0000 (13:41 +0000)]
perfmon: added intel internal io pmu support
Added support for the Intel Internal IO Uncore PMU, along with the ability to
format PMU Unit specific names.
Type: improvement
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I2939f8ade5e5ed63ccf7f3ccd0279d7c72e95a6e
Ray Kinsella [Tue, 2 Nov 2021 13:33:44 +0000 (13:33 +0000)]
vlib: retrieve the root bus of a given pci device
Added a function to parse sysfs, determine the root bus & domain of a given pci
device.
Type: improvement
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I36778116ecaa2d591617450fe5ae0bdb46b4424b
Ray Kinsella [Tue, 2 Nov 2021 13:26:49 +0000 (13:26 +0000)]
vlib: add format pci link port
Added a function to nicely format pci link ports. Similar to the existing
link_speed etc format functions.
Type: improvement
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: Ic1f104e0cb34dad274f6c959e776a32c0bab697d
Ray Kinsella [Tue, 2 Nov 2021 13:18:49 +0000 (13:18 +0000)]
vlib: allocate pci product_name with vec_alloc
The pci device product_name array was being allocated with vec_validate, not
vec_alloc. This was allocating an additional byte at the end of the array, which
was causing a spurious '\0' to be returned in the middle of format strings.
Type: fix
Fixes:
cef87f1a5e
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I21e0aa4f0455ee03bd0acc675d0deae02eddea2b
Damjan Marion [Sun, 31 Oct 2021 18:04:33 +0000 (19:04 +0100)]
vppinfra: initial RISC-V support
Type: feature
Change-Id: I1314d60fc420366526efaddd1ed215cf5f8b75dd
Signed-off-by: Damjan Marion <damarion@cisco.com>
Florin Coras [Tue, 2 Nov 2021 17:32:19 +0000 (10:32 -0700)]
interface: avoid dependency on crc32 for eth handoff
Make sure the infra works on platforms without crc32, like risc-v
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5f267497bb4e73a91a5320822ca42388f1f8b037
Damjan Marion [Sun, 31 Oct 2021 18:56:44 +0000 (19:56 +0100)]
ip: fix build without vector unit
Change-Id: I102f84d6d72a7f17e62fb8c16a1d4a3234753476
Type: fix
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Sun, 31 Oct 2021 18:53:27 +0000 (19:53 +0100)]
classify: fix build on systems without crc32f and vector unit
Change-Id: I4229239ed6b81c10362faa1aa9f658c3fccfd31b
Type: fix
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Sun, 31 Oct 2021 18:48:43 +0000 (19:48 +0100)]
flowprobe: missing header
Change-Id: I7a6df4317beed78e394dc4ba8edd350ca5b2bc80
Type: fix
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Fri, 29 Oct 2021 20:08:39 +0000 (22:08 +0200)]
build: clang-13 support
Type: make
Change-Id: I20770650d7e0475ee7791da4d5df941792bf7741
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Sun, 31 Oct 2021 18:21:31 +0000 (19:21 +0100)]
l2: fix outside array bounds errors
Reported by gcc-11...
Type: fix
Change-Id: Ia00001a6334722a6ae9cc771e6861c1f709df286
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Sun, 31 Oct 2021 18:26:58 +0000 (19:26 +0100)]
lisp: fix outside array bounds
Reported by gcc-11...
Type: fix
Change-Id: I30262f6496217335aa45cca2f541846a69bc15ee
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 27 Oct 2021 16:19:43 +0000 (18:19 +0200)]
vppinfra: add CLIB_ASSUME() macro
This macro privides a way to tell compiler that it is safe to assume
that specified expression is true so it can optimize code accordingly.
i.e.
CLIB_ASSUME (n < 3);
while (n)
{
/* ... */
}
Will tell compiler that n is never going to be >= 3 so instead of
creating loop it will just unroll loop 2 times.
Type: improvement
Change-Id: I718a9b95ff7980d7ac68eb9a88357a4ab6eee74a
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Sun, 31 Oct 2021 18:13:24 +0000 (19:13 +0100)]
tcp: fix uninitializad value
May not be valid error but gcc-11 complains.
Type: fix
Change-Id: I207b8b4966c5eadd534495e29c873663249a377f
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Sun, 31 Oct 2021 18:06:20 +0000 (19:06 +0100)]
vppinfra: fix calljmp test
Change-Id: Id1b380880c6509d983727f6fb57e7db97e66655a
Type: fix
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Sun, 31 Oct 2021 19:18:13 +0000 (20:18 +0100)]
hash: check if crc32c is available
Type: fix
Change-Id: I2f87ed4b151ecd5034b69d6f060626be6fd74e85
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Sun, 31 Oct 2021 19:02:19 +0000 (20:02 +0100)]
ipsec: silence gcc-11 parentheses warning
Type: fix
This reverts commit
5ecda99d673298e5bf3c906e9bf6682fdcb57d83.
Change-Id: I393c7d8a6b32aa4f178d6b6dac025038bbf10fe6
Signed-off-by: Damjan Marion <damarion@cisco.com>
Florin Coras [Wed, 27 Oct 2021 22:17:47 +0000 (15:17 -0700)]
interface: handoff refactor and optimizations
- move existing ethernet hash functions to hash infra (no l4
awareness)
- refactor code to use hash infra and add apis to request l4 aware
hashing functions
- hashing functions per interface
- code cleanup
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia9f44db98d83f0f027aeb37718585a2e10ffd2c6
Benoît Ganne [Mon, 18 Oct 2021 09:16:01 +0000 (11:16 +0200)]
build: add missing fib headers in packages
Type: fix
Fixes:
d6953332db225d5355f50348ef3b09f0525d5282
Change-Id: Ib85fee40e71ebe5bc2b84c62e37298b5e390d520
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Klement Sekera [Fri, 22 Oct 2021 10:52:34 +0000 (12:52 +0200)]
nat: fix coverity warning
Fix coverity warning by initialising proto variable to a dummy value.
This value is never used because consuming function uses this parameter
value only if is_addr_only flag is not set and this flag is always set
if proto value is not provided by user.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I041bc821a392f0746ef9f07f9b259d62884305b7
Klement Sekera [Wed, 27 Oct 2021 08:56:38 +0000 (10:56 +0200)]
policer: fix coverity warning/NULL dereference
Add a NULL check in case of hash lookup failure to make coverity happy.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I3cfa5960458d3618f1277ba442b4ca5ca15064ea
Nathan Skrzypczak [Tue, 26 Oct 2021 14:11:38 +0000 (16:11 +0200)]
devices: default mode eth in the api
Type: fix
https://gerrit.fd.io/r/c/vpp/+/34027 added support
for l3 mode, but as the eth_mode constant was set
to 1 we did default to l3 mode in the api.
This reverts to the original logic.
Change-Id: If8b90b300d3868de5233dfa1f33ec975853cba11
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Mohsin Kazmi [Thu, 14 Oct 2021 12:21:16 +0000 (12:21 +0000)]
interface: refactor interface output node in different processing levels
Type: refactor
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I4f29e6118630146876b7f58f1afe6b6733401047
Damjan Marion [Thu, 28 Oct 2021 10:02:15 +0000 (12:02 +0200)]
ip: improve csum fold on x86_64
New code seems to be 1.5 clocks faster.
old:
mov eax,edi
shr rdi,0x20
add rdi,rax
movzx edx,di
shr rdi,0x10
add rdx,rdi
movzx eax,dx
shr rdx,0x10
add rax,rdx
mov rdx,rax
shr rdx,0x10
add eax,edx
new:
mov rax,rdi
shr rax,0x20
add eax,edi
mov edi,0x10
shrx edi,eax,edi
adc ax,di
adc ax,0x0
Type: improvement
Change-Id: I3c565812c67ff4c3db197a9d4137a6c131b5b66c
Signed-off-by: Damjan Marion <damarion@cisco.com>
Klement Sekera [Wed, 27 Oct 2021 15:02:47 +0000 (17:02 +0200)]
vrrp: fix coverity warning/NULL dereference
Add error handling for unlikely case where getting IP address of an
interface fails.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ief8642af79fb1d25f061357cd716b93cfdf23fc8
Matthew Smith [Fri, 22 Oct 2021 14:53:44 +0000 (09:53 -0500)]
tap: handle null namespace and bridge correctly
Type: fix
In tap_create_if(), if args->host_namespace or args->host_bridge are
null because no values were set for those, the virtio_if_t entry in
virtio_main.interfaces ends up getting populated with values of "(nil)"
in net_ns or host_bridge, respectively.
Check whether args->host_namespace and args->host_bridge are null before
trying to set the corresponding fields on virtio_if_t.
Change-Id: I8e1e66a6d7b246e7c66fece406d116ffb1312c64
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Neale Ranns [Mon, 25 Oct 2021 09:06:48 +0000 (09:06 +0000)]
vppinfra: A bitmap copy function
Type: improvement
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Id7a7788b41dbcf280e025e5256c41729b0c95f39
Klement Sekera [Fri, 22 Oct 2021 11:05:48 +0000 (13:05 +0200)]
perfmon: fix coverity warning
Check that cpumask is initialised properly to avoid possible NULL
pointer dereference.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I8df5a718104fe703d6baf3f1294b4a6d2ca01619
Klement Sekera [Thu, 28 Oct 2021 08:16:09 +0000 (10:16 +0200)]
ioam: fix coverity warning/NULL dereference
Add a NULL check and missing array index to avoid multiple NULL
derefences.
Runnning:
set ioam ip6 sr-tunnel-select disable
on a fresh VPP no longer crashes.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ia85f92024f3b14ef1c4cdb9fcf794b962cad9422
Klement Sekera [Tue, 26 Oct 2021 14:19:45 +0000 (16:19 +0200)]
devices: fix coverity warning/don't leak fd
Move socket creation past code which returns from function to avoid
leaking the socket in case of an early error return.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I9e18bd32022441c17ca920d1c2458b058b76c3c0
Florin Coras [Wed, 27 Oct 2021 17:53:41 +0000 (10:53 -0700)]
tcp: fix use of invalid local sw_if_index
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id58ac44d45fb8b8a0d803f02e0242ec6f4b3db05
Damjan Marion [Wed, 27 Oct 2021 15:28:26 +0000 (17:28 +0200)]
vppinfra: improve clib_array_mask_u32
Type: improvement
Change-Id: Ibdb79a0a1c3ba56f9b2f0f2536aafcdeda5cb6d6
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 27 Oct 2021 15:31:46 +0000 (17:31 +0200)]
vppinfra: use bzhi in pow2_mask when available
Saves one clock....
Type: improvement
Change-Id: I43da40fb4887b77ac851f759c50a7ca2814f8f40
Signed-off-by: Damjan Marion <damarion@cisco.com>
Benoît Ganne [Mon, 11 Oct 2021 11:49:59 +0000 (13:49 +0200)]
api: fix buffer overflow in vl_msg_replay_json
cJSON_Parse() and vlib_cli_output() expect a NULL-terminated C-string.
Type: fix
Fixes:
36217e3ca8a1ca2e7a341b6b44ffc25e6497191c
Change-Id: Id9819314fcd332c6076d1330b3433885fff07e36
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Matthew Giassa [Tue, 26 Oct 2021 19:33:57 +0000 (19:33 +0000)]
libmemif: fix gcc strict-proto error
- Changing function prototypes for a couple libmemif functions so that
gcc will successfully compile with the "-Wstrict-prototypes" flag
enabled.
- Re-ran unit tests via "make test" locally on Ubuntu 20.04 LTS x64.
One issue (likely unrelated to patch):
* Testcase name: Bidirectional Forwarding Detection (BFD)
ERROR: put session admin-up and admin-down
[test_bfd.BFD4TestCase.test_admin_up_down]
Type: fix
Change-Id: Ibcb7210873d39aec9348fe8ac7eebc78d089d8e0
Signed-off-by: Matthew Giassa <mgiassa@cisco.com>
Gabriel Oginski [Tue, 26 Oct 2021 06:43:33 +0000 (07:43 +0100)]
crypto: add barrier in crypto key add
Originally the pool of keys can be expand and cache with pointer for
key can be invalid.
For example in Wireguard during handshake process this pool can be
expand and pointer for these keys in cache can be invalid for workers
or can has incorrect value (poison memory).
The fixes add barrier if the pool needs be to expand to ensure that
cache in function will be valid and avoid situation when cache has
invalid pointer for these keys.
Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: Ida8f300213dfebb91ecaf1937fb08de81c20ba7b
Klement Sekera [Tue, 26 Oct 2021 09:41:10 +0000 (11:41 +0200)]
perfmon: properly unmap mmapped pages
Add missing array index so that actual mmapped pages are unmpapped
instead of attempting to unmap array holding those pages.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ib8709cce1bcbfb505307c140266834b284af796c
Michal Kalderon [Sun, 8 Aug 2021 11:30:39 +0000 (04:30 -0700)]
tcp: fix: TCP timewait port reuse rfc compliance
This patch provides a fix for early-kill of timewait sockets that is based on
rfc's 1122, 6191.
The following commits provided a solution for port re-use. However, they
are not fully compliant with rfc 1122 4.2.2.13 ( Closing a connection )
and rfc 6191 (Reducing the TIME-WAIT State Using TCP Timestamps)
commit
b092b77cf238ba ("tcp: Enable TCP timewait port use") introduced
a significant improvement by enabling TCP timewait port re-use.
commit
ee1cb469b2dd ("tcp: fix port reuse with multiple listeners") fixed
usage of the wrong value for connection_index when searching for a
listener, by storing the state in tcp.flags.
Implementation details:
When a SYN is received during time-wait state, the code
checks whether all the requirements for accepting the SYN packet are
met. If they aren't, the SYN can't be accepted and the packet is dropped,
otherwise, connection is deleted and a new connection with same port
is opened.
Type: fix
Signed-off-by: Ofer Heifetz <oferh@marvell.com>
Signed-off-by: Yuval Caduri <cyuval@marvell.com>
Signed-off-by: Michal Kalderon <mkalderon@marvell.com>
Change-Id: I38a33c6e321c760d45ebec9154399e1c90dd0250
Neale Ranns [Mon, 25 Oct 2021 10:24:51 +0000 (10:24 +0000)]
bier: Disposition paths don't set the next-hop
Type: fix
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I3c4152219e5307ac0fe773e16d597f0e4b9a7d4c
Ed Warnicke [Sat, 23 Oct 2021 00:51:22 +0000 (19:51 -0500)]
arp: fix for source address selection
Type: fix
Ticket: VPP-1970
Ticket: VPP-1992
Fixes:
9e17887db97bb9f6507270f9fa9923c10816e0df
https://gerrit.fd.io/r/c/vpp/+/33495/7 introduced a bug
where ND responses are inproperly dropped. This fixes that bug.
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
Change-Id: Iec4b07646332ced292e2211408c4f7af3088ac28
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
Florin Coras [Fri, 22 Oct 2021 17:56:54 +0000 (10:56 -0700)]
vcl: fix cfg parser handling of empty lines
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibef04947c3a2f4e700233157d581ed54558b51ed
Filip Tehlar [Wed, 20 Oct 2021 14:05:32 +0000 (14:05 +0000)]
session: fix minor issue
Type: fix
Change-Id: I2f7579980f081d3b0a8d19baade0a6599d55cf80
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Mohsin Kazmi [Fri, 8 Oct 2021 15:10:49 +0000 (15:10 +0000)]
devices: add support for l3 af_packet interface
Type: improvement
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ia6b9d4ac55be2216887bfdb99be4021f6a96f166
Filip Tehlar [Sun, 25 Jul 2021 14:38:45 +0000 (14:38 +0000)]
ipsec: add api test file
Type: improvement
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ib3fe4f306f23541a01246b74ad0f1a7074fa03bb
Neale Ranns [Thu, 21 Oct 2021 12:02:53 +0000 (12:02 +0000)]
fib: Don't back walk from a path-list when a child fist attaches.
Type: fix
If the walk is triggered when the child is added, then that child is visited in the walk. However, since it is just attahcing to the path-list it may not, or indeed cannot, have all the context it needs to successfully handle the walk.
In the case of MPLS tunnel, it does not have the path extensions ready, and cannot since the path extensions need to resolve on the path-list.
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I027af8cf2f522d2f6e37931bea60c767f0cb667d
Paul Atkins [Tue, 12 Oct 2021 13:32:11 +0000 (14:32 +0100)]
fib: respect mfib entry flags on create with paths
When an mfib entry was created with both paths and entry_flags then
the entry flags were being ignored. If there are no paths then the
flags were passed into mfib_table_entry_update, but in the case where
the entry didn't exist and there were paths and flags, the entry was
created within mfib_table_entry_paths_update() which used a default
of MFIB_ENTRY_FLAG_NONE.
Pass the flags through into the mfib_table_entry_paths_update fn. All
existing callers other than the create case will now pass in
MFIB_ENTRY_FLAG_NONE.
Type: fix
Signed-off-by: Paul Atkins <patkins@graphiant.com>
Change-Id: I256375ba2fa863a62a88474ce1ea6bf2accdd456
Nathan Skrzypczak [Thu, 9 Sep 2021 16:31:36 +0000 (18:31 +0200)]
ip: Add ip46-local node for local swif[rx]
Type: improvement
This adds a new ip[46]-receive node, sibling
of ip[46]-local. Its goal is to set
vnet_buffer (b)->ip.rx_sw_if_index to the
sw_if_index of the local interface.
In dependant nodes further down the line (e.g.
hoststack) we then set sw_if_idx[rx] to this
value. So that we know which local interface
did receive the packet.
The TCP issue this fixes is that :
On accepts, we were setting tc->sw_if_index
to the source sw_if_index. We should use
the dest sw_if_index, so that packets
coming back on this connection have the
right source sw_if_index. And also setting
it in the tx-ed packet.
Change-Id: I569ed673e15c21e71f365c3ad45439b05bd14a9f
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Filip Tehlar [Sat, 24 Jul 2021 18:10:39 +0000 (18:10 +0000)]
l2: add api test file
Type: improvement
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ie79a2deac03c04c0697e482a649ff151142126ed
Matthew Smith [Mon, 11 Oct 2021 19:10:15 +0000 (14:10 -0500)]
ip6: set local flag on outbound echo reply
Type: fix
When VPP generates an ICMP echo reply in response to an incoming
echo request to a local address, set VNET_BUFFER_F_LOCALLY_ORIGINATED
on the buffer. It will prevent ip6-rewrite from decrementing the hop
limit.
Outbound IPv4 echo replies also get this flag set.
Change-Id: Iaa229294eb158edb58cf1bf1b7a90da281321406
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Nathan Skrzypczak [Wed, 20 Oct 2021 15:41:07 +0000 (17:41 +0200)]
cnat: improve tests
Type: improvement
This is an attempt to make the cnat tests more
readable by hiding the scapy packet generation
under a common context concept.
This in order to add tests covering a wider range
of scenarios. As of now, only VIP, snat & DHCP
being covered
Change-Id: Ia84868984506bbb652fe974e9a6f54f7a3cc0bd9
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Filip Tehlar [Mon, 18 Oct 2021 09:02:37 +0000 (09:02 +0000)]
session: add api test file
Type: improvement
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I6b89c4158d10d4928c8418312180dbeba7d70ab2
Jieqiang Wang [Tue, 3 Aug 2021 16:07:52 +0000 (16:07 +0000)]
ip6: fix IPv6 address calculation error using "ip route add" CLI
Using VPP CLI "ip route add" to add static IPv6 entries outputs wrong
results. Fix this error by correctly calculating IPv6 addresses with
different increased ranges and grouping ip4/ip6 prefix calculation
functionality into two functions.
Type: fix
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: If954876301ca2095f9331799a086f75db936f246
Mohsin Kazmi [Fri, 15 Oct 2021 22:45:51 +0000 (22:45 +0000)]
gso: add support for gso perf unittest
Type: test
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I5d44a6ea24e4aa0842024a0961f1fb22c6e6419a
Filip Varga [Wed, 6 Oct 2021 18:10:51 +0000 (20:10 +0200)]
nat: enable skipped nat44-ed multi worker tests
Type: test
Change-Id: I185725c0f94084d08c8514642a84a04da62398e1
Signed-off-by: Filip Varga <fivarga@cisco.com>
Filip Varga [Thu, 30 Sep 2021 11:35:59 +0000 (13:35 +0200)]
nat: nat44-ei configuration improvements
nat44-ed core configuration improvements & fixes [0-5] adjusted
for nat44-ei plugin.
Improvements:
* repeating code converted to functions
* simplified functions used for pool address, static mapping
and interface configuration.
Clean up:
* remove obsolete code and logic persisted after plugin
separation from old SNAT plugin.
Fixes:
* [0] return correct API behavior changed in [5]
Type: improvement
[0] https://gerrit.fd.io/r/c/vpp/+/33622
[1] https://gerrit.fd.io/r/c/vpp/+/33431
[2] https://gerrit.fd.io/r/c/vpp/+/33337
[3] https://gerrit.fd.io/r/c/vpp/+/33249
[4] https://gerrit.fd.io/r/c/vpp/+/32796
[5] https://gerrit.fd.io/r/c/vpp/+/32951
Signed-off-by: Filip Varga <fivarga@cisco.com>
Change-Id: Ie197faa576cb49acb3d218f14e00cb7d13ad9342
Filip Varga [Fri, 17 Sep 2021 12:11:59 +0000 (14:11 +0200)]
nat: NAT44-ED api fix and improvement
This patch fixes issue with NAT_API_IS_TWICE_NAT and
NAT_API_IS_ADDR_ONLY flags. Because of control plane
code change - move from boolean parameters to flags
in https://gerrit.fd.io/r/c/vpp/+/32796 patch these
api flags weren't correctly set.
Type: fix
Change-Id: Ieec5fe6bdcca314da027f2d23e3a24f174391a6f
Signed-off-by: Filip Varga <fivarga@cisco.com>
Alexander Skorichenko [Fri, 15 Oct 2021 16:04:44 +0000 (16:04 +0000)]
bfd: fix bfd_key_id update
Type: fix
Currently, auth activation CLI command
"bfd upd session auth activate ... conf-key-id <cki> bfd-key-id <bki>"
allows to change both key-ids to new values at once.
But if only bfd-key-id should be corrected, e.g. as a result of mistyping,
we can't do that in a single operation, and have to deactivate auth first
and then reactivate it with a correctly entered pair of ids.
Currently, backend's bfd_auth_activate() function returns immediately,
with no action, if it finds that submitted conf-key-id matches the
current record. No check on bfd-key-id value is made.
With this fix, bfd_auth_activate() checks if session's bfd-key-id has to
be changed to a new value, and if so, it updates and logs appropriately.
Change-Id: I3b915a936cb1721707860bb503f70e7dd29e0ddd
Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
Alexander Skorichenko [Thu, 14 Oct 2021 10:09:02 +0000 (13:09 +0300)]
bfd: fix desired_min_tx_nsec update
Type: fix
Currently, the change in desired_min_tx value initiated locally
doesn't result in actual update of the transmission interval.
bfd_session_t structure has two fields for each of protocol's
local time parameters
desired_min_tx, required_min_rx
In a case of a parameter update,
"config_" prefixed fields store new values sent to remote
bs.config_desired_min_tx_nsec,
bs.config_required_min_rx_nsec
Those prefixed "effective_", keep old values, still in charge,
until new ones are being negotiated between peers:
bs.effective_desired_min_tx_nsec,
bs.effective_required_min_rx_nsec
Currently, upon termination of the Poll Sequence (negotiation) only
bfd_set_effective_required_min_rx()
is called to update effective RX value. TX value remains unchanged.
With this fix, add a call to
bfd_set_effective_desired_min_tx()
to set new, acknowledged TX value in effect.
Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
Change-Id: I80b6746533839c9572598f1ad9dabb33e621a525
Klement Sekera [Mon, 18 Oct 2021 10:28:48 +0000 (12:28 +0200)]
api: remove legacy pd msg handlers
While looking at a coverity warning it was discovered that it's caused
by return value modified by pd msg handlers. As these are legacy, it's
a good time to remove them and also fix the warning this way.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ic72ab8b2b7a2e55188d1c31cfd18a74b7cf82c43
Filip Tehlar [Fri, 23 Jul 2021 22:03:05 +0000 (22:03 +0000)]
interface: add api test file
Type: improvement
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ib07029204ecf12bf2adb5a39afa54bc98fb81f34
Nathan Skrzypczak [Thu, 27 May 2021 17:34:59 +0000 (19:34 +0200)]
interface: fix offload flag check
We should compute offloads in interface_ouput.c
in the case when any of the UDP, TCP or IP
offload flags is not present in the interface
capabilities.
e.g. if the interface supports IP cksum offload
but not tcp/udp we should still compute cksums
here.
Type: fix
Change-Id: Ibaa3a56dbc92938dca45311c38f079d040052194
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Steven Luong [Fri, 15 Oct 2021 15:35:56 +0000 (08:35 -0700)]
memif: Enhance show memif descriptors to display region
memif descriptors table may have more than one shared memory region.
To see whether a descriptor's memory address is valid or not, it
is beneficial to also display the descriptor's region. While at it,
fix the truncation problem for the offset field.
Type: improvement
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ia3b7062ac0323c39ade6f3a58333c6405889148f
Ray Kinsella [Fri, 15 Oct 2021 11:48:31 +0000 (12:48 +0100)]
perfmon: topdown lvl 2 support on sapphire rapids
Added topdown level 2 support on sapphire rapids,
including ability to indentify a sapphire rapids cpu.
Type: improvement
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I9f99a92fa0886b98bb5185cff32bebd5a094f329
Ray Kinsella [Fri, 15 Oct 2021 09:13:17 +0000 (10:13 +0100)]
perfmon: additional perf counters on icelake
The Intel Icelake uArch supports measuring up to 12 counters,
comprised of 4 fixed and 8 general counters.
Type: improvement
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I68369ea55a0c95d6a4a280a464e69502bbf5474f
wanghanlin [Thu, 14 Oct 2021 03:10:26 +0000 (11:10 +0800)]
vcl: narrow the scope of the restriction of vlsh_bit_val
The restriction of vlsh_bit_val only effect select/pselect, so move the
check to select/pselect function.
Type: fix
Signed-off-by: wanghanlin <wanghanlin@corp.netease.com>
Change-Id: I3585c83cfc2f0a2fd834450be650dccda67e3faa
Klement Sekera [Thu, 14 Oct 2021 13:41:42 +0000 (15:41 +0200)]
pppoe: fix coverity warning
Initialise variable used in tracing code in case of early error so that
tracing doesn't use this uninitialised variable.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I6b1cef07e1f126cee56e1116606869dd667274d2
Klement Sekera [Wed, 26 May 2021 11:02:35 +0000 (13:02 +0200)]
nat: static mappings in flow hash
Put static mappings in flow hash, drop existing hash tables used for
static mappings. Drop refcount variables and use hash table as a single
point of truth. Allow creating a static mapping conflicting with dynamic
mapping, which will take precedence after dynamic mapping is freed, so
that the existing flow can finish transferring data.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Idfde8efabc09971be38921d4b0ca5ccf4e9fe412
Klement Sekera [Wed, 13 Oct 2021 20:29:49 +0000 (22:29 +0200)]
ip6-nd: fix coverity warning
Add a missing return statement in case there are no parameters supplied
to 'set ip6 nd proxy' CLI to avoid calling code with uninitialised
parameters.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ie4fdb4df5d1af49471c421e5e7a6c2f885d2e8d2
Klement Sekera [Wed, 13 Oct 2021 19:45:42 +0000 (21:45 +0200)]
tests: fix coverity warnings
Fix coverity warnings by initialising variables and removing dead code.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I0254b81020cdc3d7075df003309065438526918f
Klement Sekera [Wed, 13 Oct 2021 20:06:50 +0000 (22:06 +0200)]
misc: fix coverity warning in ila plugin
Remove non-null check for a pointer which cannot be null to avoid dead
code warning.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I5ff40a4f80db7bb0dff9928c90ff757b763902fd
Nathan Skrzypczak [Wed, 13 Oct 2021 10:40:42 +0000 (12:40 +0200)]
docs: C & C++ apis examples
Type: docs
Change-Id: I5b6c388332bdd3a29777d728c3357816c8411ea2
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Nathan Skrzypczak [Thu, 19 Aug 2021 09:38:06 +0000 (11:38 +0200)]
docs: better docs, mv doxygen to sphinx
This patch refactors the VPP sphinx docs
in order to make it easier to consume
for external readers as well as VPP developers.
It also makes sphinx the single source
of documentation, which simplifies maintenance
and operation.
Most important updates are:
- reformat the existing documentation as rst
- split RELEASE.md and move it into separate rst files
- remove section 'events'
- remove section 'archive'
- remove section 'related projects'
- remove section 'feature by release'
- remove section 'Various links'
- make (Configuration reference, CLI docs,
developer docs) top level items in the list
- move 'Use Cases' as part of 'About VPP'
- move 'Troubleshooting' as part of 'Getting Started'
- move test framework docs into 'Developer Documentation'
- add a 'Contributing' section for gerrit,
docs and other contributer related infos
- deprecate doxygen and test-docs targets
- redirect the "make doxygen" target to "make docs"
Type: refactor
Change-Id: I552a5645d5b7964d547f99b1336e2ac24e7c209f
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Nathan Skrzypczak [Fri, 8 Oct 2021 12:05:35 +0000 (14:05 +0200)]
docs: convert plugins doc md->rst
Type: improvement
Change-Id: I7e821cce1feae229e1be4baeed249b9cca658135
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Klement Sekera [Wed, 13 Oct 2021 19:18:59 +0000 (21:18 +0200)]
nat: fix coverity warning
Fix coverity warning by initialising proto variable to a dummy value.
This value is never used because consuming function uses this
parameter value only if is_addr_only flag is not set and this flag is
always set if proto value is not provided by user.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I9b5e8c08346bea1e2b460bb09e962c4b8d3b6947
Nathan Skrzypczak [Fri, 8 Oct 2021 12:01:27 +0000 (14:01 +0200)]
docs: convert vpp doc md->rst
Type: improvement
Change-Id: If453321785b04f9c16e8cea36fb1910efaeb2c59
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Nathan Skrzypczak [Fri, 8 Oct 2021 12:05:58 +0000 (14:05 +0200)]
docs: convert extras doc md->rst
Type: improvement
Change-Id: Ie3b25a86b99098d2b3a21a11fc73234c8ed589d6
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Nathan Skrzypczak [Tue, 12 Oct 2021 12:00:25 +0000 (14:00 +0200)]
libmemif: docs md->rst
Type: improvement
Change-Id: Ibebd2d47a4268189f11601d004073e4858548f25
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Jakub Grajciar [Mon, 4 Jan 2021 10:36:44 +0000 (11:36 +0100)]
libmemif: update documentation
Type: refactor
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I0094ea8627cd8bcd5ea119c2fd48f077c8e2e4bb
Xiaoming Jiang [Wed, 13 Oct 2021 03:11:40 +0000 (03:11 +0000)]
session: app name should format with %v
Type: fix
Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com>
Change-Id: I2c77066cc9f1d3063373cc9559cc5b369906cc24
Joshua Roys [Tue, 12 Oct 2021 13:25:47 +0000 (09:25 -0400)]
nat: fix static mapping segv
Adding a nat44 static mapping during startup on a DHCP interface leads
to a segv via this path:
- dhcp_client_acquire_address
- ip4_add_del_interface_address
- ip4_add_del_interface_address_internal
- nat44_ed_add_del_interface_address_cb
- nat44_ed_add_static_mapping
- ip4_interface_first_address
Type: fix
Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Change-Id: I38dac8a096b052550f2b87b4e13a950d2cd868b0
Benoît Ganne [Wed, 13 Oct 2021 09:35:15 +0000 (11:35 +0200)]
dpdk: fix vmbus device name parsing
unformat_init_vector() expects a vector, not a NULL-terminated C-string.
Type: fix
Change-Id: I20a266243f63d94b0c6fe24e25ee8346c08c8ff2
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Florin Coras [Tue, 12 Oct 2021 20:55:19 +0000 (13:55 -0700)]
vapi: fix vapi test coverity warning
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5ecb73009c6ebb00b5d9e14bd09b4b3e80ab5601