Nick Brown [Wed, 29 Sep 2021 15:13:23 +0000 (16:13 +0100)]
build: consistent use of CMAKE_INSTALL_LIBDIR
Set the RPATH to based on CMAKE_INSTALL_LIBDIR so that libraries are
correctly found.
Type: make
Change-Id: I82d649345edea2c5d3f6b3f43e3e5869b9e580a7
Signed-off-by: Nick Brown <nickbroon@gmail.com>
Nathan Skrzypczak [Wed, 29 Sep 2021 13:34:29 +0000 (15:34 +0200)]
nat: doc nitfixes
Type: improvement
Change-Id: I9a4303030b9657c28bbd73168def72c7daa13483
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Filip Tehlar [Wed, 29 Sep 2021 14:20:49 +0000 (14:20 +0000)]
vat2: do not require _crc field in API messages
Type: improvement
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Icc2ce594225c3197c9e5be8faa3dc2ee5b0a553e
Andrew Yourtchenko [Tue, 28 Sep 2021 08:26:26 +0000 (10:26 +0200)]
misc: package the devtool plugins
a274c3a2ed8c4f1f38cb6f126326b4e6798869d2 has split the devtool plugins into a separate component,
which caused them not to be packaged as part of the existing .deb, however this can still be useful
to have them.
This commit adds the new deb vpp-plugin-devtools which contains that component.
Change-Id: I3cf44493745c3d4951ffd2194c6ae539e8ad5926
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Alexander Chernavin [Mon, 30 Aug 2021 08:55:27 +0000 (08:55 +0000)]
nat: nat44-ed add session timing out indicator in api (2)
Type: improvement
Currently, NAT44-ED users sessions details are returned for both active
and timed out NAT sessions. It may confuse users that expect to see only
active sessions in the response and make them think that timeouts for
NAT sessions do not work.
With this change, introduce an indicator of timing out for NAT sessions
returned in NAT44-ED user session details.
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: Ib4d689f77cec4b0b0cc8484019e13733cc8bdc0d
Filip Tehlar [Sun, 23 May 2021 18:40:40 +0000 (18:40 +0000)]
ikev2: build only when deps requirements are met
Type: improvement
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I89bcc1ba804ded676b194dbda52704cd0c54a67e
Matthew Smith [Tue, 28 Sep 2021 21:02:10 +0000 (16:02 -0500)]
classify: fix message IDs on API replies
Type: fix
When the API cleanup of classify messages was done, the code was not
updated to add the message enums to REPLY_MSG_ID_BASE. So the wrong
message IDs are being sent back in replies to classify API requests.
Add REPLY_MSG_ID_BASE when populated vl_msg_id on a reply.
Change-Id: Ic7c828f14d42a346fc58fc9ff062b954f494cdbd
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Neale Ranns [Tue, 21 Sep 2021 12:34:19 +0000 (12:34 +0000)]
ipsec: Record the number of packets lost from an SA
Type: feature
Gaps in the sequence numbers received on an SA indicate packets that were lost.
Gaps are identified using the anti-replay window that records the sequences seen.
Publish the number of lost packets in the stats segment at /net/ipsec/sa/lost
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I8af1c09b7b25a705e18bf82e1623b3ce19e5a74d
Nathan Skrzypczak [Wed, 22 Sep 2021 15:46:02 +0000 (17:46 +0200)]
tap: Fix tap create with ns
This fixes the interface creation passing
a netns. [0] made the renaming of the new
tuntap interface before switching netns
Thus, preventing creating an interface in
another netns if one exists in VPP's netns
with the same name.
This also fixes restore netns on errors
Type: fix
[0] https://gerrit.fd.io/r/c/vpp/+/33696
Change-Id: I5c83bb37d664057bcf231cd0c636f0e51aa542ad
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Nathan Skrzypczak [Fri, 7 May 2021 17:39:07 +0000 (19:39 +0200)]
libmemif: Fix abstract sockets
This fixes size computation when using
abstract sockets with libmemif
Type: fix
Change-Id: I3a686e4ff2132b9fb295bbe30633958dcfec672b
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Stanislav Zaikin [Tue, 28 Sep 2021 16:31:32 +0000 (18:31 +0200)]
fib: add barrier lock for fib_urpf_list_pool and fib_entry_pool
Pools fib_urpf_list_pool and fib_entry_pool can grow while ip6_urpf_loose_check/fib_entry_get_flags_for_source are being executed. That may result as a crash in mt environment.
Type: fix
Change-Id: I44ca2cb70255e7aaf2e1f7a7d2eecd25cbdd0aaa
Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com>
Filip Tehlar [Fri, 23 Jul 2021 08:51:10 +0000 (08:51 +0000)]
api: API trace improvements
Type: improvement
* add support for JSON format in API trace
* add ability to replay JSON API trace in both VPP and VAT2
* use CRC for backward compatibility check during JSON API replay
* fix API trace CLI (and remove duplicits)
* remove custom dump
* remove vppapitrace.py
* update docs accordingly
Change-Id: I5294f68bebe6cbe738630f457f3a87720e06486b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Ole Troan [Mon, 27 Sep 2021 15:11:34 +0000 (17:11 +0200)]
misc: vpe.api messages dynamically allocated
This is the last in the series of moving API messages from vpp/api/vpe.api to vlibmemory/memclnt.api.
This patch makes the remaining vpe.api messages dynamic, to help VAT2 binary-api command.
Moves the VAT test code to a separate file and removes the now unnused API meta files.
Type: improvement
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I01dd78eaff1d3715dff17d2643bf0f7f0089935b
Signed-off-by: Ole Troan <ot@cisco.com>
Nathan Skrzypczak [Wed, 23 Jun 2021 09:28:39 +0000 (11:28 +0200)]
devices: Add queues params in create_if
Type: feature
Change-Id: I027ff2c5c905a7ccebd3705a58e35218a94f4880
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
arikachen [Wed, 22 Sep 2021 03:13:11 +0000 (11:13 +0800)]
af_xdp: fix init lock for shared txq
Type: fix
Signed-off-by: arikachen <eaglesora@gmail.com>
Change-Id: Idb5e66d7a2a7ccb6fb5155341df54586186eb11f
Július Milan [Fri, 10 Sep 2021 07:43:31 +0000 (09:43 +0200)]
nat: NAT44 ED & EI session filtering CLI
Improving session filtering capabilities of
show nat44 sessions CLI command for EI and ED NAT
plugins. Adding filtering options: saddr, sport,
daddr, dport, proto for both i2o and o2i flows.
Type: improvement
Change-Id: I70bc94a2e922cddf9451eb7dcbf4a7be21ebf0df
Signed-off-by: Filip Varga <fivarga@cisco.com>
Alexander Chernavin [Fri, 17 Sep 2021 12:37:48 +0000 (12:37 +0000)]
stats: add name vectors to prometheus exporter output
Type: improvement
Counters are labeled with interface indices in the Prometheus exporter
output. For example:
# TYPE _if_drops counter
_if_drops{thread="0",interface="0"} 0
_if_drops{thread="0",interface="1"} 0
_if_drops{thread="0",interface="2"} 2112
[..]
Currently, it's unable to map interface indices to the interface names
using only output provided by the Prometheus exporter. However, this
mapping is present in the vpp_get_stats output:
# vpp_get_stats dump /if/names
[0]: local0 /if/names
[1]: GigabitEthernet0/8/0 /if/names
[2]: GigabitEthernet0/9/0 /if/names
[..]
With this change, add name vectors to Prometheus exporter output as info
metrics. Thus exposing interfaces and their indices:
# TYPE _if_names_info gauge
_if_names_info{index="0",name="local0"} 1
_if_names_info{index="1",name="GigabitEthernet0/8/0"} 1
_if_names_info{index="2",name="GigabitEthernet0/9/0"} 1
[..]
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: Iff86c4d6fea8805e71fb04fccf278bae855e88d1
arikachen [Tue, 28 Sep 2021 10:43:44 +0000 (18:43 +0800)]
af_xdp: fix free mem in tx while no free slot
Type: fix
Signed-off-by: arikachen <eaglesora@gmail.com>
Change-Id: Id305b9d311b2d0d11583db1a14a45d9187a1e628
Nick Brown [Thu, 16 Sep 2021 09:56:33 +0000 (10:56 +0100)]
build: complete python3 support, no hardcode path
find_package(Python3) will not set variables that are later used, so set
those needed. Perhaps the python2 support, which is EOL, could be
dropped?
Use DESTDIR, instead of hardcoding the path. This allows system
packaging, or local installs, to work properly.
Type: make
Signed-off-by: Nick Brown <nickbroon@gmail.com>
Change-Id: I045516c61473c612ab70858cd9b58c4e2838b347
Filip Tehlar [Thu, 2 Sep 2021 10:32:40 +0000 (10:32 +0000)]
sr: add API test files
Type: improvement
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Iefc88107ae96915570ae425a527c3969f7ce7b1d
Benoît Ganne [Mon, 27 Sep 2021 13:37:48 +0000 (15:37 +0200)]
ikev2: support variable-length nonces
IKEv2 nonces can be 16 to 256 bytes.
Type: fix
Change-Id: Ib332028594355c9e5b462bddb7e4dffbcdc9a927
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Dmitry Valter [Sun, 19 Sep 2021 20:47:19 +0000 (23:47 +0300)]
tests: don't install vapi_c{,pp}_test
Don't install vapi_c{,pp}_test. It confuses dpkg-shlibdeps to think we
need libsubunit as shared lib dependency
Type: fix
Fixes:
a2d6d352c6926d2f8d4e50aeb1ec59802f32b37b
Signed-off-by: d-valter@yandex-team.ru
Change-Id: Ifb702a61be32b37e79b48780cc61cb0838e87153
Jakub Grajciar [Mon, 4 Jan 2021 10:10:42 +0000 (11:10 +0100)]
libmemif: refactor connection establishment
per_thread_ namespace fuctionality replaced by memif socket.
Interfaces are grouped by memif socket which holds interface database.
Each thread can create it's unique memif socket. The path name
can be equal across threads so that the app only uses one
UNIX socket. In case of listener socket, listener fd
can be obtained and set using APIs.
This change allows:
- No lookup on file descriptor events
- improves interrupt handling
- Loopback support (connect two interfaces in one app)
- usefull for debugging and testing
- Improves code readability by providing control channel
abstraction for each interface and listener sockets
Type: refactor
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I1b8261042431c0376646ab4c4c831f6e59dd3eed
Jakub Grajciar [Mon, 4 Jan 2021 09:39:30 +0000 (10:39 +0100)]
libmemif: remove per_thread_ namespace
Type: refactor
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ib5a88132ad28860553fc82f5aaaf84e0a1b8e8bf
Jakub Grajciar [Mon, 4 Jan 2021 14:01:54 +0000 (15:01 +0100)]
libmemif: remove old examples
Type: refactor
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I2331f6fb43ca533afb32f7d448adda27b19689ac
Jakub Grajciar [Mon, 4 Jan 2021 09:17:46 +0000 (10:17 +0100)]
libmemif: remove outdated unit tests
Type: refactor
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ie42c03980cf2cc0766308043d7d3ea5301a59b75
Nick Brown [Mon, 27 Sep 2021 11:11:23 +0000 (12:11 +0100)]
build: Stricter git tag version parsing
Only consider git tags that begin with 'v', as these are far more likely
to be vpp version tags, and thus parsed by the version script properly.
This needed when working with git clone to which additional tags may
have been added.
eg tags like:
upstream/21.06_rc0+
20210622
debian/21.06+
20210811-1myvendor2
should be ingored, as they will not be parsed correctly.
Type: make
Change-Id: I7a6d185acd029335abaea5a9dac48839f1397135
Signed-off-by: Nick Brown <nickbroon@gmail.com>
Ray Kinsella [Wed, 22 Sep 2021 10:24:06 +0000 (11:24 +0100)]
classify: Large and nested classifer unit tests
Type: test
Large and nested unit tests to test AVX-512 optimized versions of the classify
hash and match algorithims.
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: Ie423fee5e0fd1cb4bdf3bec8e0230a5f7cfc75fc
Vladislav Grishenko [Sat, 18 Sep 2021 12:32:17 +0000 (17:32 +0500)]
fib: fix crash on exporter tracker remove
Exported entries are tracked only when the prefix found in the export
FIB is really attached, exporter tracker is not set if the export
entry is not valid for export, ex. for special FIB entries - default
route, zeronet, mcast and broadcast prefixes.
When imported entries need to be purged, such unset exporter tracker is
being removed by non-initialized index with absent delegate entries,
causing corresponding assert and crash.
Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: Ib24a2e7853a03a960577872480213e1e8097da5a
Nathan Skrzypczak [Fri, 28 May 2021 11:44:24 +0000 (13:44 +0200)]
virtio: Still init unused txq
Type: fix
For some virtio backends, packets don't seem to flow
if all the queues that have been requested are not
initialized
Change-Id: I41765d668497ff954e6d69d36836590947fd93b1
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Aloys Augustin [Wed, 15 Sep 2021 14:06:04 +0000 (16:06 +0200)]
gso: do not gro on small packets
This has two benefits: fix an issue where small packets can be
padded to 64 bytes by the ethernet layer, and we included these bytes
in the tcp stream; and also if we receive a small packet, it signals
that this tcp stream is likely more latency-sensitive than throughput-
sensitive, and skipping gro buffering should be beneficial.
Type: fix
Change-Id: I165b97673d8cdce95ebf0a66c362ae9f9e6f3f34
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Mohsin Kazmi [Wed, 22 Sep 2021 20:03:28 +0000 (20:03 +0000)]
tap: move the api msg_id_base to tap_main_t
Type: fix
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ia4065550a7ad1109e3a2592ef2c21b5e23fa85b5
Nathan Skrzypczak [Fri, 7 May 2021 17:39:07 +0000 (19:39 +0200)]
gomemif: Add mode support
Type: feature
Change-Id: I0bc51288bc63a0583b98314e4e2a62383b0d6e43
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Florin Coras [Wed, 15 Sep 2021 16:02:08 +0000 (09:02 -0700)]
misc: api move continued
Move control ping and change dependencies from vpe.api_types to
memclnt.api_types
Type: refactor
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I9f8bc442e28738c48d64d1f6794082c8c4f5725b
Aloys Augustin [Sun, 26 Sep 2021 16:26:15 +0000 (18:26 +0200)]
ip: fix ip table allocation randomness
This prevents going through the same sequence every time the api is
called.
Type: fix
Change-Id: I3ca3587ab5d1c060e2913ca88501b8dbcdd9c196
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Florin Coras [Wed, 15 Sep 2021 01:54:45 +0000 (18:54 -0700)]
misc: move part of vpe apis to vlibmemory
VPE apis are actually vlib apis. This moves those that are not tightly
coupled with vapi to vlib_api
Type: refactor
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I456a64ce49a0cdeff4a0931c6ea513cb639f683e
Signed-off-by: Ole Troan <ot@cisco.com>
Matthew Smith [Fri, 24 Sep 2021 20:27:36 +0000 (15:27 -0500)]
ip: set error number on failed intf addr
Type: fix
A subinterface that does not have exact match enabled cannot have
an IP address configured on it. When this is validated in the functions
which add an interface IP address for IPv4 and IPv6, a clib_error_t * is
returned but api_errno is not set. The API handler uses the value of
vnet_main.api_errno to set the return value in it's reply. Since it was
not set, the API reports the operation succeeded.
Set vnet_main.api_errno if vnet_sw_interface_supports_addressing() returns
a non-null value when adding/deleting an interface IP address.
Change-Id: I257a30d21788986102a2a719235e714ff16a24e8
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Florin Coras [Thu, 23 Sep 2021 22:08:05 +0000 (15:08 -0700)]
vcl: grab wrk create lock sooner
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0faeef20c57486564122e39f01f31c8c45f38014
Damjan Marion [Wed, 22 Sep 2021 13:50:35 +0000 (15:50 +0200)]
classify: use AVX-512 to find entry
Type: improvement
Change-Id: I10f4084907ad714aded86e0b7a1a4d1c5fa1f140
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 22 Sep 2021 13:28:29 +0000 (15:28 +0200)]
classify: use AVX-512 to calculate hash on x86
Type:improvement
Change-Id: I9f9f16eabf64203db11cd4338948d76ca5e0ef12
Signed-off-by: Damjan Marion <damarion@cisco.com>
Andrew Yourtchenko [Mon, 20 Sep 2021 12:59:07 +0000 (14:59 +0200)]
misc: Initial 22.02-rc0 commit
- Add 22.02 Release Notes placeholder
- Add test framework link
Type:docs
Change-Id: I0128df2be71057add64a5843603a5539e8d340c7
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Aloys Augustin [Wed, 22 Sep 2021 15:17:28 +0000 (17:17 +0200)]
wireguard: fix wg-output-tun feature configuration
The removed code caused the feature to be wrongly removed on the wg
interface.
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Change-Id: I998e01ec231527128eaeae78bcc7576ac00e5b12
Florin Coras [Wed, 22 Sep 2021 23:34:49 +0000 (16:34 -0700)]
svm: remove unused fifo functions
Type: refactor
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4525bc669d1c42c41dbc398cf239a093b6853298
Ray Kinsella [Tue, 7 Sep 2021 12:45:08 +0000 (13:45 +0100)]
stats: revert stat_validate_counter_vector3 non-static
This reverts commit
c30157811e4c8e870d2680b08ecd3a38dff2d53b.
Type: refactor
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: Id011c8e5acb1613e09fd339ce614159c0acd651a
Mohsin Kazmi [Wed, 22 Sep 2021 20:22:05 +0000 (20:22 +0000)]
tap: remove cxq_vring from tap/tun
Type: fix
virtio_if_t is shared data struct between tap, tun and virtio pci.
cxq_vring is virtio pci specific element. It shouldn't be set or
accessed in tap driver.
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I8b34570f61b38d8b9d79d5b0669bda0f89ebc28c
Mohsin Kazmi [Wed, 22 Sep 2021 18:56:05 +0000 (18:56 +0000)]
virtio: fix the type of argument in virtio_show()
Type: fix
virtio have three different interfaces (tap, tun and native virtio).
virtio_show() is used by CLI commands to show information about these
interfaces. It uses interface type to print interface specific information.
virtio_show() should use proper type for virtio interfaces (TAP, TUN, VIRTIO).
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I2043dc2cfe2e2f6c7c9348b8494aa4a27cab31f3
Artem Glazychev [Wed, 15 Sep 2021 12:35:51 +0000 (19:35 +0700)]
ping: set fib_index for lookup_node
lookup node uses this field later to set fib_index for buffer
Type: fix
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: I993cf80296e1713b4f13fc6ccdf49ebeaf295467
Neale Ranns [Wed, 22 Sep 2021 10:49:43 +0000 (10:49 +0000)]
interface: allow an interface's index to be given in 'sh int'
Type: improvement
e.g.:
DBGvpp# sh int 3
Name Idx State MTU (L3/IP4/IP6/MPLS) Counter Count
loop2 3 down 9000/0/0/0
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ie296167ab2b1b9576b46f6d4d9fb9546aef3a0da
Fan Zhang [Wed, 22 Sep 2021 08:50:22 +0000 (09:50 +0100)]
misc: update MAINTAINERS file
Type: improvement
Add myself as maintainer for crypto related components.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: Ib43bd30b69c52c6370e3dda9ad9ed9a04374d817
Mohsin Kazmi [Tue, 21 Sep 2021 11:05:15 +0000 (11:05 +0000)]
hash: fix the initialization warning error on gcc-10
Type: fix
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ic7d99154def71cd06e8faa64180912e5b844424e
Aloys Augustin [Thu, 16 Sep 2021 18:53:14 +0000 (20:53 +0200)]
ip: add ip_table_allocate to api
Set tableID = ~0 for auto selection unused ID
https://jira.fd.io/browse/VPP-1993
Type: improvement
Change-Id: I4eec2cc1d18fc025196cb6ac4c9a4b374388eb56
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Damjan Marion [Mon, 20 Sep 2021 15:51:31 +0000 (17:51 +0200)]
classify: improve vnet_classify_hash
Type: improvement
Change-Id: I8b129b71f91b12ab2d8b05fe3891a7ab8926f072
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Mon, 20 Sep 2021 15:36:49 +0000 (17:36 +0200)]
classify: simplify vnet_classify_find_entry_inline
Type: improvement
Change-Id: I3de4450b95f6fa76705923d983cf93c21b02a635
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Tue, 21 Sep 2021 09:38:04 +0000 (11:38 +0200)]
vppinfra: make default hugepage size configurable
i.e.
memory {
default-hugepage-size 1G
}
Type: improvement
Change-Id: I822afb51712ae92f4e4992b8ffa33dcb15ccaef1
Signed-off-by: Damjan Marion <damarion@cisco.com>
Mohammed Hawari [Tue, 21 Sep 2021 15:44:26 +0000 (17:44 +0200)]
interface: fix poll vector realloc
Change-Id: I60815b5827b4406228fd6b490f4ac1f874bac974
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: fix
Andrew Yourtchenko [Wed, 26 May 2021 17:27:50 +0000 (17:27 +0000)]
pnat: fix the version of the PNAT plugin from the hardcoded 0.0.1
Type: fix
Change-Id: I35db6763f3c5bd73169a222a4a93a917e8f468e6
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Arthur de Kerhor [Mon, 20 Sep 2021 12:47:47 +0000 (14:47 +0200)]
vapi: compile vpp-api folder before the plugins
Allows to use vapi symbols in a plugin.
Type: feature
Change-Id: Ic4534f266964127af54651b7d19c3b611b277860
Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
Nathan Skrzypczak [Thu, 5 Aug 2021 08:22:52 +0000 (10:22 +0200)]
session: implement app_ns deletion
Type: feature
Change-Id: If0edbb21a0283d66c648a9e190d238c8cfa56353
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Damjan Marion [Mon, 20 Sep 2021 15:12:03 +0000 (17:12 +0200)]
classify: improve find entry performance
Type: improvement
Change-Id: I5245fc3f35b7a70833916db2ebf33f7c87398915
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Mon, 20 Sep 2021 11:39:37 +0000 (13:39 +0200)]
classify: avoid dependent read of classify mask
Type: improvement
Change-Id: I176f08c74eb58a78f7fbdb48fd4592e6ddf74d34
Signed-off-by: Damjan Marion <damarion@cisco.com>
Nathan Skrzypczak [Fri, 17 Sep 2021 09:53:25 +0000 (11:53 +0200)]
session: use table_format in sh app ns
Type: refactor
Change-Id: I99162d80280e0f45344671b18b1ea96db90d4282
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Nathan Skrzypczak [Fri, 17 Sep 2021 12:32:03 +0000 (14:32 +0200)]
vppinfra: format table improvements
This adds a way to define default fg, bg colors
and alignement for cell tables.
It also allows removing the table title by not
setting it.
It also removes the trailing newline, for usage
inside a format("%U", format_table, ...)
Type: improvement
Change-Id: I27d7a04c4a919b34d0170b04e24a56831f581ea1
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Mohsin Kazmi [Wed, 30 Jun 2021 18:26:25 +0000 (18:26 +0000)]
hash: add support for hashing infra
Type: feature
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I3652ae275385d9b1eb1b11f418e3a7e5fef2f556
Nick Brown [Wed, 15 Sep 2021 13:25:40 +0000 (14:25 +0100)]
build: use GNUInstallDirs install destinations
So as to be compliant with distribution layouts, as recommend by:
https://cmake.org/cmake/help/latest/command/install.html#installing-files
Type: make
Change-Id: Ic46ace4f26aab1aa4902cbd013c40a92c480680d
Signed-off-by: Nick Brown <nickbroon@gmail.com>
Benoît Ganne [Fri, 17 Sep 2021 15:48:12 +0000 (17:48 +0200)]
dpdk: enable ENA tx offload
Type: improvement
Change-Id: Ic7c2ac4237ecd192def7c3530ae5f788c62cf9ad
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Nathan Skrzypczak [Fri, 17 Sep 2021 09:51:46 +0000 (11:51 +0200)]
vppinfra: move format_table from perfmon
This code seems really usefull for reuse in
other plugins, for pretty table formatting
Type: feature
Change-Id: Ib5784a0dfc81b7d5a5d1f5ccdd02072e460a50fb
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Damjan Marion [Fri, 27 Aug 2021 15:41:41 +0000 (17:41 +0200)]
misc: put devtools plugins into separate component/package
Type: make
Change-Id: I2958e9eddadee6434766ecd3cdb3b9cea742ed64
Signed-off-by: Damjan Marion <damarion@cisco.com>
Mohammed Hawari [Wed, 8 Sep 2021 15:54:43 +0000 (17:54 +0200)]
ebuild: cleanup of DPDK options in external.mk
With the move to meson, most DPDK options in external.mk are not used
anymore
Type: improvement
Change-Id: I603ccd30c9e52bdc89a69aa4bece2394b3eed1fe
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Steven Luong [Tue, 14 Sep 2021 14:07:17 +0000 (07:07 -0700)]
memif: avoid double pool_put on a clib_file
When memif CP processes the socket connection error, it may go through
the following code paths which may eventually cause double pool_put on a
clib_file
memif_master_conn_fd_error:633 -> memif_disconnect ->
memif_socket_close -> memif_file_del_by_index ->
clib_file_del_by_index -> clib_file_del -> pool_put
After memif_master_conn_fd_error:633, the code continues on
memif_maser_conn_fd_error:651 -> memif_file_del -> clib_file_del ->
pool_put
The fix is to skip calling memif_file_del in
memif_master_conn_fd_error:651 if uf->file_descriptor == ~0 to catch
problem from all possible paths in memif_master_conn_fd_error
Type: fix
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I0960998db1ff358a8ddd4a5e22188a244eccd270
Florin Coras [Fri, 17 Sep 2021 03:50:12 +0000 (20:50 -0700)]
dpdk: fix checksum offload
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I89fb738903ee74ffcb7c77a041391f0388df6991
Benoît Ganne [Thu, 9 Sep 2021 14:27:37 +0000 (16:27 +0200)]
avf: fix RSS hash key
Toeplitz hash key must respect certain properties, it cannot be purely
random. Use the default one from i40e.
Type: fix
Change-Id: Ic8e67a0426de8adfecc1fcdaa99879e13ae38cc9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Nathan Skrzypczak [Wed, 28 Jul 2021 17:35:08 +0000 (19:35 +0200)]
session: Add sock_name option to add_ns
This adds a new API call to add session namespaces
It now takes a netns and a sock_name.
(1) If no netns is passed, sock_name will be used as
socket path. Defaulting to /run/vpp/app_ns_sockets/${ns_id}
(2) If a netns is passed, the sock_name has to be
abstract (i.e. start with '@'). It will default to
`@vpp/session/${ns_id}` and will be created in the provided
netns.
Type: feature
Change-Id: I90e9a8e5ecca2cabe7c05335663e33c8506dc9e7
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Mohsin Kazmi [Thu, 17 Jun 2021 17:29:27 +0000 (17:29 +0000)]
vxlan: improve to use the hardware offload
Type: improvement
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ic0fa4f83048a280a7d1b04198c0f903798562d2d
Mohsin Kazmi [Thu, 17 Jun 2021 17:20:02 +0000 (17:20 +0000)]
dpdk: add support for outer udp and ipv4 checksums
Type: improvement
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I10141033030342881298d70742fa5bdea402b4c9
Mohsin Kazmi [Wed, 15 Sep 2021 13:57:29 +0000 (15:57 +0200)]
dpdk: fix the outer ipv4 checksum
Type: fix
Change-Id: Ibc476b807ba0310f0cc926b0e386831ef0cbcc25
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Mohsin Kazmi [Wed, 7 Apr 2021 17:50:35 +0000 (19:50 +0200)]
ip6-nd: add ip6-nd proxy
Type: feature
Change-Id: I91f72f5802db195d1a15424d67c1b6e518168f9f
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Damjan Marion [Wed, 15 Sep 2021 13:08:28 +0000 (15:08 +0200)]
vlib: add option to plugin registration to prefer deep binding
Type: improvement
Change-Id: I9ce7e1ee7e7afe8e9befe36ae8c59291beaaaf36
Signed-off-by: Damjan Marion <damarion@cisco.com>
Duncan Eastoe [Wed, 8 Sep 2021 18:11:33 +0000 (19:11 +0100)]
tap: set device name on creation via TUNSETIFF
Type: fix
Currently when a new TAP/TUN device is created from tap_create_if()
via the TUNSETIFF ioctl(), a name is allocated by the kernel (eg.
tap0). If the caller supplied a name this is subsequently set via
netlink, after the device has been created.
Now we request the kernel to create the new device with the caller's
requested name in the first instance, thus avoiding the need to
rename the device, and therefore avoiding a window where the device
exists with a different name.
This can be beneficial, for example, when writing systemd-udevd link
files [1]. Having the TAP/TUN devices created with the requested name
ensures they can be correctly matched by the OriginalName option.
Writing link files might be necessary, for example, to avoid VPP and
systemd-udevd racing to set the MAC address on a newly created TAP
interface. systemd-udevd can be configured to not manipulate the MAC
addresses of matched interfaces.
These changes also resolve an issue where the created device would not
be renamed if the caller requested it be moved to a different network
namespace, since vnet_netlink_set_link_name() was not called in that
case.
[1] https://www.freedesktop.org/software/systemd/man/systemd.link.html
Signed-off-by: Duncan Eastoe <duncan@graphiant.com>
Change-Id: I3d657632856d03979d6b914225c3c841c379e0a1
Pierre Pfister [Fri, 10 Sep 2021 14:38:03 +0000 (16:38 +0200)]
vlib: add graceful termination with status
This commit allows a non-VPP thread to request VPP to gracefully
shutdown and return a specific process status value.
Type: improvement
Change-Id: I9bf52b789e7ee28eb272630eaea495fd94349f79
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Mohammed Hawari [Wed, 8 Sep 2021 13:52:15 +0000 (15:52 +0200)]
misc: volunteer as extra maintainer for DPDK
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Change-Id: I97fa566612641f78c2e9850a251cfe9f2d7cfde1
Type: docs
Nathan Skrzypczak [Mon, 16 Aug 2021 14:13:40 +0000 (16:13 +0200)]
interface: fix init fib_index_by_sw_if_index
Type: fix
The init of fib_index_by_sw_if_index wasn't
setting default value to 0. Which we now
need for setting interfaces unnumbered
Change-Id: Ie5be9b5e5373ef055557a871ad4d1c45fbfc1dee
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Tianyu Li [Wed, 8 Sep 2021 05:52:55 +0000 (13:52 +0800)]
snort: fix epoll_wait unsigned return value
When epoll_wait return -1, access array epoll_events[i] out of bound
and lead to segmentation fault.
1. Change return value to signed return value
2. Skip non fatal error e.g. EINTR
Type: fix
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I4ece118999402ec6054baf0efb52419151655def
Florin Coras [Thu, 9 Sep 2021 19:04:17 +0000 (12:04 -0700)]
tcp session: initialize sw_if_index at connect time
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id0e67a9ce9c5d8bca2cd7a30493f03a02a46dc46
Tianyu Li [Thu, 26 Aug 2021 01:47:31 +0000 (09:47 +0800)]
dpdk: fix prefetch assert on Arm
CLIB_PREFETCH (cop[1], CLIB_CACHE_LINE_BYTES * 3, STORE);
Note on 64 bytes cache line size arm machines,
CLIB_CACHE_LINE_BYTES 128
CLIB_CACHE_PREFETCH_BYTES 6
above CLIB_PREFETCH () macro will be expand to
ASSERT ((size) <= 4 * CLIB_CACHE_PREFETCH_BYTES);
it will hit assert due to size (i.e. 3 * 128) > 4 * 64
Solution:
Change to CLIB_PREFETCH (cop[1], sizeof(*cop[1]), STORE);
Type: fix
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Reviewed-by: Lijian Zhang <lijian.zhang@arm.com>
Change-Id: Id0981fd5bd2b25ff71db4197b25578d0b7a9803e
Nathan Skrzypczak [Mon, 16 Aug 2021 17:14:48 +0000 (19:14 +0200)]
ip: show ip table CLI
Type: feature
Thought this might be useful when using
many VRF to get the list of allocated
VRFs and corresponding names
Change-Id: If9d2c6612d4215e7576315d66d1eb130fcecfa13
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Nick Brown [Tue, 7 Sep 2021 17:24:42 +0000 (18:24 +0100)]
build: verbose dpdk build requiring meson 0.55
allow verbose dpdk build to be enabled. Useful for tools, like debian
blhc, that want to inspect build logs.
The '--verbose' option to 'meson compile' requires at least version
0.55.
Type: make
Change-Id: I54e91298f632e2b91247680d9295701b05353abe
Signed-off-by: Nick Brown <nickbroon@gmail.com>
Neale Ranns [Fri, 13 Aug 2021 08:10:59 +0000 (08:10 +0000)]
ip-neighbor: Handle local MAC address change for incomplete adjacencies
Type: fix
When the local MAC address of an interface changes the rewrite strings
of all adjacency types need to be updated - this patch fixes the missing
case of incomplete adjacencies.
I moved the update of all adj types into the adj module, since if the
complete adjs were done by the ip-neighbour module and incomplete ones
by adj module, that would mean two walks of the adj DB, as it is not
possible to walk only a specific type.
UT is updated to include the missing case.
Signed-off-by: Neale Ranns <neale@graphiant.com>
Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Change-Id: I36af94976c645bdd0d4d3bc0093b24d7d077e9d7
liuyacan [Fri, 10 Sep 2021 07:14:05 +0000 (15:14 +0800)]
vcl: avoid duplicated events in epoll lt
1. Filter event ACCEPTED for lt (same as event RX)
2. Do lt check before vppcom_epoll_wait_xxx to avoid
delivering duplicated events.
Type: fix
Signed-off-by: liuyacan <liuyacan@corp.netease.com>
Change-Id: Ib41c880ceb5072d49e11ab42e31e54398703c0b5
Florin Coras [Fri, 10 Sep 2021 18:37:12 +0000 (11:37 -0700)]
vcl: fix free segments assert
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I837820fd1759cab55f42c54950e991a215234737
Benoît Ganne [Wed, 8 Sep 2021 14:26:52 +0000 (16:26 +0200)]
vlib: fix vlib_buffer_enqueue_to_next() overflow
vlib_buffer_enqueue_to_next() requires to allow overflow of up to 63
elements of 'buffer' and 'nexts' array.
- add helper to compute the minimum size
- fix occurences in session and async crypto
Type: fix
Change-Id: If8d7eebc5bf9beba71ba194aec0f79b8eb6d5843
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Andrew Yourtchenko [Thu, 9 Sep 2021 19:12:33 +0000 (21:12 +0200)]
nat: Revert "nat: nat44-ed add session timing out indicator in api"
This reverts commit
f059a3452c285ec57a75c7b1ede5052244be4e5d, which broke the build.
https://s3-logs.fd.io/logs/production/vex-yul-rot-jenkins-1/vpp-merge-master-debian10-x86_64/1344/console.log.gz
Change-Id: I16fece8128fa9973495c587d105a8db57738e8f2
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Florin Coras [Thu, 9 Sep 2021 15:37:59 +0000 (08:37 -0700)]
srtp: fix header len assert
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie7b04b11987caadde0942483f171a318ce852228
Alexander Chernavin [Mon, 30 Aug 2021 08:55:27 +0000 (08:55 +0000)]
nat: nat44-ed add session timing out indicator in api
Type: improvement
Currently, NAT44-ED users sessions details are returned for both active
and timed out NAT sessions. It may confuse users that expect to see only
active sessions in the response and make them think that timeouts for
NAT sessions do not work.
With this change, introduce an indicator of timing out for NAT sessions
returned in NAT44-ED user session details.
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: Ib81ed90369d4b495117538f521e5112e289cf7e6
Ray Kinsella [Tue, 7 Sep 2021 12:44:23 +0000 (13:44 +0100)]
stats: revert enable/disable segments polls
This reverts commit
034bd1067eddb700c6d2bc67974056fe00012310.
Type: refactor
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: Icce6052d6cf9616f7eac3185b4c9aace234aa59f
Benoît Ganne [Thu, 9 Sep 2021 10:00:00 +0000 (12:00 +0200)]
session: fix non-NULL terminated string
vlib_unix_recursive_mkdir () expects a NULL-terminated C-string.
Type: fix
Change-Id: I412b48443d0792307d611c466747c0aa5e423417
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Klement Sekera [Wed, 8 Sep 2021 13:15:59 +0000 (15:15 +0200)]
flowprobe: simplify test logic
Type: refactor
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I9a3923ec1ff1371e870bc57ade4035de07bfbbcb
Benoît Ganne [Thu, 9 Sep 2021 09:56:58 +0000 (11:56 +0200)]
linux-cp: fix non-NULL terminated string
lip->lip_host_name is a non-NULL terminated vector.
Type: fix
Change-Id: Ic154ad7f57f0b507204e55f78995cc0e89132e57
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Pim van Pelt [Thu, 12 Aug 2021 19:35:06 +0000 (21:35 +0200)]
linux-cp: Complete interface creation logic
Linux Control Plane interface creation logic is currently only able to
create untagged interfaces, and dot1q VLAN sub-interfaces. This change
makes it possible to create dot1ad VLAN sub-ints, and Q-in-AD as well
as Q-in-Q sub-interfaces as well.
It makes the plugin a bit more robust by catching a few common errors,
such as creating an lcp on a sub-interface without its parent having
one, and creating an lcp on a sub-interface that is not exact-match.
This change has a bunch of smaller improvemnets as well. I documented
my work in this post:
https://ipng.ch/s/articles/2021/08/12/vpp-1.html
It shows that after the change is merged, all VPP interface types now
create and operate cleanly as LCP interfaces as well.
Type: improvement
Signed-off-by: Pim van Pelt <pim@ipng.nl>
Change-Id: I322669f7316d44c227090b83d6a574fb9c00e76a
Pim van Pelt [Thu, 26 Aug 2021 13:49:17 +0000 (15:49 +0200)]
linux-cp: fix crash on failed vlib_buffer_copy
Type: fix
Signed-off-by: Pim van Pelt <pim@ipng.nl>
Change-Id: I390282ecc63600728cf11413510c0169178e305c
Matthew Smith [Wed, 25 Aug 2021 22:09:34 +0000 (17:09 -0500)]
vrrp: fix source address on advertisements
Type: fix
Advertisements are dropped by anti spoofing check in some situations.
When a VR has "accept mode" enabled, we must add the virtual IP addresses
to the interface when the VR transitions to master state. When this
happens, fib_sas4_get() starts selecting the newly added virtual IP
address as the source address for packets sent on the interface, so
advertisements are sent with that source address.
When the virtual IP address is being used as a NAT pool address on a peer
in the backup state, the peer sees the address as a local address and
drops incoming advertisements with that source address.
RFC 5798 section 5.1.1.1 says advertisements should use the primary
IPv4 address of the interface they are being sent on as the source
IP address. Since the virtual IP address is only temporarily added
while the VR is in the master state, the virtual IP address should
probably not be considered the primary address of the interface. The
definition of Primary IP Address in section 1.6 says that selecting
the first address is a valid selection algorithm. Do that instead of
calling fib_sas4_get().
Change-Id: Id92f0e3237c7fd491dd8d695bb27307d494f8573
Signed-off-by: Matthew Smith <mgsmith@netgate.com>