vpp.git
2 years agomisc: move part of vpe apis to vlibmemory 28/33728/20
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>
2 years agoip: set error number on failed intf addr 20/33820/1
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>
2 years agovcl: grab wrk create lock sooner 11/33811/3
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

2 years agoclassify: use AVX-512 to find entry 92/33792/3
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>
2 years agoclassify: use AVX-512 to calculate hash on x86 68/33768/4
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>
2 years agomisc: Initial 22.02-rc0 commit 62/33762/2 v22.02-rc0
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>
2 years agowireguard: fix wg-output-tun feature configuration 93/33793/2
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

2 years agosvm: remove unused fifo functions 99/33799/2
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

2 years agostats: revert stat_validate_counter_vector3 non-static 81/33681/6
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

2 years agotap: remove cxq_vring from tap/tun 98/33798/1
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

2 years agovirtio: fix the type of argument in virtio_show() 96/33796/3
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

2 years agoping: set fib_index for lookup_node 29/33729/2
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

2 years agointerface: allow an interface's index to be given in 'sh int' 84/33784/2
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

2 years agomisc: update MAINTAINERS file 83/33783/2
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

2 years agohash: fix the initialization warning error on gcc-10 70/33770/2
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

2 years agoip: add ip_table_allocate to api 75/33675/6
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>
2 years agoclassify: improve vnet_classify_hash 65/33765/6
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>
2 years agoclassify: simplify vnet_classify_find_entry_inline 64/33764/5
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>
2 years agovppinfra: make default hugepage size configurable 66/33766/2
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>
2 years agointerface: fix poll vector realloc 75/33775/3
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

2 years agopnat: fix the version of the PNAT plugin from the hardcoded 0.0.1 58/32458/6
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>
2 years agovapi: compile vpp-api folder before the plugins 61/33761/2
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>
2 years agosession: implement app_ns deletion 79/33379/9
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>
2 years agoclassify: improve find entry performance 63/33763/1
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>
2 years agoclassify: avoid dependent read of classify mask 54/33754/5
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>
2 years agosession: use table_format in sh app ns 48/33748/2
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>
2 years agovppinfra: format table improvements 47/33747/4
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>
2 years agohash: add support for hashing infra 40/32940/28
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

2 years agobuild: use GNUInstallDirs install destinations 31/33731/2
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>
2 years agodpdk: enable ENA tx offload 50/33750/3
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>
2 years agovppinfra: move format_table from perfmon 46/33746/2
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>
2 years agomisc: put devtools plugins into separate component/package 14/33614/2
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>
2 years agoebuild: cleanup of DPDK options in external.mk 94/33694/3
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>
2 years agomemif: avoid double pool_put on a clib_file 25/33725/4
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

2 years agodpdk: fix checksum offload 38/33738/1
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

2 years agoavf: fix RSS hash key 05/33705/2
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>
2 years agosession: Add sock_name option to add_ns 01/33301/8
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>
2 years agovxlan: improve to use the hardware offload 72/32772/6
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

2 years agodpdk: add support for outer udp and ipv4 checksums 71/32771/5
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

2 years agodpdk: fix the outer ipv4 checksum 63/32763/3
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>
2 years agoip6-nd: add ip6-nd proxy 21/31921/11
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>
2 years agovlib: add option to plugin registration to prefer deep binding 30/33730/1
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>
2 years agotap: set device name on creation via TUNSETIFF 96/33696/3
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

2 years agovlib: add graceful termination with status 19/33719/4
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>
2 years agomisc: volunteer as extra maintainer for DPDK 92/33692/3
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

2 years agointerface: fix init fib_index_by_sw_if_index 01/33501/6
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>
2 years agosnort: fix epoll_wait unsigned return value 87/33687/4
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

2 years agotcp session: initialize sw_if_index at connect time 10/33710/4
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

2 years agodpdk: fix prefetch assert on Arm 98/33598/5
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

2 years agoip: show ip table CLI 04/33504/4
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>
2 years agobuild: verbose dpdk build requiring meson 0.55 85/33685/6
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>
2 years agoip-neighbor: Handle local MAC address change for incomplete adjacencies 88/33488/2
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

2 years agovcl: avoid duplicated events in epoll lt 12/33712/2
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

2 years agovcl: fix free segments assert 17/33717/1
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

2 years agovlib: fix vlib_buffer_enqueue_to_next() overflow 93/33693/3
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>
2 years agonat: Revert "nat: nat44-ed add session timing out indicator in api" 11/33711/2
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>
2 years agosrtp: fix header len assert 06/33706/3
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

2 years agonat: nat44-ed add session timing out indicator in api 18/33618/4
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

2 years agostats: revert enable/disable segments polls 80/33680/5
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

2 years agosession: fix non-NULL terminated string 01/33701/2
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>
2 years agoflowprobe: simplify test logic 91/33691/6
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

2 years agolinux-cp: fix non-NULL terminated string 99/33699/2
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>
2 years agolinux-cp: Complete interface creation logic 81/33481/23
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

2 years agolinux-cp: fix crash on failed vlib_buffer_copy 06/33606/7
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

2 years agovrrp: fix source address on advertisements 25/33625/2
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>
2 years agointerface: add custom interface name support 55/33255/4
Steven Luong [Mon, 26 Jul 2021 20:38:05 +0000 (13:38 -0700)]
interface: add custom interface name support

add CLI "set interface name <current-int-name> <new-int-name>
and the corresponding binary API to allow custom interface name
setting for any interface.

Type: feature

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I2b39da59879fd4526bcb5aa5854b6bd21e72ea73

2 years agoperfmon: sort 'show perfmon bundle' output 08/33508/3
Zachary Leaf [Tue, 17 Aug 2021 09:12:01 +0000 (04:12 -0500)]
perfmon: sort 'show perfmon bundle' output

This patch sorts 'show perfmon bundle' output in alphabetical order.

Type: improvement
Signed-off-by: Zachary Leaf <zachary.leaf@arm.com>
Change-Id: I26b379b5d6766b9f87f9a3a5013ea92b207fb5d4

2 years agointerface: fix coverity issue 86/33686/3
Mohammed Hawari [Wed, 8 Sep 2021 09:30:21 +0000 (11:30 +0200)]
interface: fix coverity issue

Change-Id: I5bb1ab3a57097bf03e7de5541cc8496655bc728f
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: fix
Fixes: 5b22339973feaa3eba48ead1e9fb428b1816c0cc

2 years agoperfmon: add membw-bound bundle 88/33688/4
Ray Kinsella [Wed, 9 Jun 2021 10:35:26 +0000 (11:35 +0100)]
perfmon: add membw-bound bundle

Added memory bandwidth boundedness bundle, closely related to cache-hierarchy.
This bundle works on ICX only, due to an ICX specific counter.

Type: improvement

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: Id385bd5f4e645ac020774e311c623afb64b79b1e

2 years agoperfmon: adding support for papi TMAM 82/33682/4
Ray Kinsella [Tue, 7 Sep 2021 15:26:58 +0000 (16:26 +0100)]
perfmon: adding support for papi TMAM

Adding support for Linux papi TMAM on Intel Snowridge. Adds the ability to
indicate that a bundle should be thread or node bundle type based on available
cpu features (rdpmc support).

Type: feature

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: Ib871b2644fdb2410fbb580e0d21c3a8e2be13aba

2 years agonat: remove unusued parameters and use correct parameter types 46/32946/8
Klement Sekera [Tue, 29 Jun 2021 10:58:34 +0000 (12:58 +0200)]
nat: remove unusued parameters and use correct parameter types

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I4f7b3d5354a7658d7271c28444f2f4641f05b28b

2 years agotests: fix DEBUG=attach multiple worker config 66/32966/5
Klement Sekera [Thu, 1 Jul 2021 12:55:46 +0000 (14:55 +0200)]
tests: fix DEBUG=attach multiple worker config

Type: fix
Change-Id: Ie7920c0c699904de0f68ddb749725887b569f295
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2 years agodpdk: fix coverity 83/33683/1
Mohammed Hawari [Wed, 8 Sep 2021 08:39:14 +0000 (10:39 +0200)]
dpdk: fix coverity

Coverity does not seem happy about exotic control
flows in switch/case statements

Change-Id: Ie006190058f811aacf85125ebc58330d9c53510f
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: fix
Fixes: 0b42ac565b970c186a9ad734f980b440f56fb25b

2 years agodevices: restore regular af-packet tx path 69/33669/2
Mohammed Hawari [Mon, 6 Sep 2021 09:48:17 +0000 (11:48 +0200)]
devices: restore regular af-packet tx path

This change restores the af_packet tx path prior
in use prior to Change
Idf0bdd88990254a614962c2f7bc3e0292ccfd61a but
fixes the stalling issue by ensuring that the next
tx frame pointer is only incremented when a new tx
frame is used. This change also enables the
af_packet PACKET_QDISC_BYPASS option, for better
performance.

Change-Id: I65dde648ed66d21654847a900ceda5a8980ae6ec
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2 years agodpdk: lro support 87/32287/13
Mohammed Hawari [Wed, 12 May 2021 10:31:01 +0000 (12:31 +0200)]
dpdk: lro support

Change-Id: Ifa09dcdfd567ac3c2afab4bd3bd468260f766e1d
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: improvement

2 years agointerface: full poll vector on adaptive mode 32/32232/8
Maxime Peim [Thu, 6 May 2021 10:17:25 +0000 (12:17 +0200)]
interface: full poll vector on adaptive mode

When an input supports adaptive mode and enters
in polling, some rx queues may be missing from
the node's rx_poll_vector. To solve the issue,
a full poll vector is being computed in
vnet_hw_if_update_runtime_data, and returned
by vnet_hw_if_get_rxq_poll_vector when the
node is polling in adaptive mode.

Type: fix
Signed-off-by: Maxime Peim <mpeim@cisco.com>
Change-Id: I249bcb20ae0dd28afb0a5ca32993092bafd2f6b1

2 years agosr: fixing typo in srv6 End.AS Proxy documentation 67/33667/1
Ahmed Abdelsalam [Fri, 3 Sep 2021 16:48:04 +0000 (16:48 +0000)]
sr: fixing typo in srv6 End.AS Proxy documentation

Type: docs

Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
Change-Id: I0cbc1b21f156425e067e9ce90769a62983ca5d01

2 years agonat: NAT44 ED improvements and fixes 31/33431/5
Filip Varga [Mon, 9 Aug 2021 12:45:12 +0000 (14:45 +0200)]
nat: NAT44 ED improvements and fixes

Fixed FIB entry per interface, pool and
static mapping registrations in NAT control plane.
Improved FIB configuration handling in NAT -
added functions to generalize handling of FIB & NAT,
cleaned up interface callback functions. Changed "is_"
macros to inline functions for easier debugging.

Type: improvement

Change-Id: I68a17761a975dd819139ae94e52a8a85d3f27ffc
Signed-off-by: Filip Varga <fivarga@cisco.com>
2 years agoudp: fill rmt info if session is connection less 42/33542/4
liuyacan [Fri, 20 Aug 2021 02:25:43 +0000 (10:25 +0800)]
udp: fill rmt info if session is connection less

The app may send packet to different remote via sendto() with
same socket (without calling connect()). In such scenario, remote
address need to be filled in.

Type: fix

Signed-off-by: liuyacan <liuyacan@corp.netease.com>
Change-Id: I49deb308668c05442f237e97acc9bfa239782482

2 years agovcl: ignore rx events for sessions in epoll lt list 29/33629/2
Florin Coras [Tue, 31 Aug 2021 20:29:41 +0000 (13:29 -0700)]
vcl: ignore rx events for sessions in epoll lt list

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I75f935cda00c335d0aefe02bff6fa8505dd931a8

2 years agoclassify: improve "show classify table" output 31/33631/2
Dave Barach [Wed, 1 Sep 2021 13:02:13 +0000 (09:02 -0400)]
classify: improve "show classify table" output

Print header for each table.

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I54ca04d6000a98afb4ad3d2f24caae3349548f23

2 years agovcl: switch part of the tests to sock api 83/33483/7
Florin Coras [Thu, 12 Aug 2021 15:38:02 +0000 (08:38 -0700)]
vcl: switch part of the tests to sock api

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I427af3be604783d36080c284ed32fb1df525bf54

2 years agovlib: fixed the issue of vpp crash caused by interface up/down 44/33244/4
fangtong [Sat, 24 Jul 2021 06:55:02 +0000 (14:55 +0800)]
vlib: fixed the issue of vpp crash caused by interface up/down

When the interface status changes, the api of vnet_hw_interface_set_flags_helper calls the event processing function (vlib_process_signal_event_helper) for event processing. When the opinter data_vec is NULL, the _ven_len operation of an illegal address will cause vpp crash.

Type:fix

Signed-off-by: fangtong <fangtong2007@163.com>
Change-Id: I7106b2aed7a1fc17f74bf6cb513912af97584f45

2 years agovmxnet3: set RX interrupt pending only when needed 15/32515/6
Steven Luong [Tue, 1 Jun 2021 21:09:28 +0000 (14:09 -0700)]
vmxnet3: set RX interrupt pending only when needed

When an RX thread handles more than one RX queue and has a mix of
queues in interrupt mode and polling mode, the RX input routine is
naturally in polling mode. In that case, there is no need to set RX
interrupt pending when descriptor is available in the queue for
interrupt mode.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Iedbe57941eca3152c0e8ab9096cc81f315e0a915

2 years agovat2: coverity errors in print_template 28/33628/2
Ole Troan [Tue, 31 Aug 2021 12:21:03 +0000 (14:21 +0200)]
vat2: coverity errors in print_template

Dereferencing null pointer fix.
Add checking of return values for all calls in print_template()

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I00073b29ab2e76d5d06af9bd3f5ae2846de4d46d

2 years agostats: check epoch in python vpp_stats ls 27/33627/3
Ole Troan [Tue, 31 Aug 2021 08:47:45 +0000 (10:47 +0200)]
stats: check epoch in python vpp_stats ls

The VPP Stats Python binding was missing checking epoch.
Resulting it would not pick up changes in the directory.

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I3226d71c77be2e80e24b5cd48fc9820833f7d30e
Signed-off-by: Ole Troan <ot@cisco.com>
2 years agomisc: fix build error in handoffdemo 26/33626/3
Sivaprasad Tummala [Tue, 31 Aug 2021 06:53:23 +0000 (12:23 +0530)]
misc: fix build error in handoffdemo

fix to pass right arguments to vlib_buffer_enqueue_to_thread

Type: fix

Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com>
Change-Id: I2521ac8d33135843263e8f99318988ec78effbaa

2 years agoflow: add esp spi rss type 00/33500/2
Piotr Bronowski [Fri, 2 Jul 2021 09:20:03 +0000 (09:20 +0000)]
flow: add esp spi rss type

Type: feature

This patch adds IPsec ESP SPI as RSS key for better IPsec
inbound processing scaling. With this feature enabled,
The NIC will use the packets' SPI index as the RSS key
to distribute them to different queues.

The dpdk-input is also updated to support this feature.

Sample CLI command to enable Ipsec ESP SPI as RSS key:

test flow add src-ip any dst-ip any rss types esp
test flow enable eth0 index 0

Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I8b7d01cfc065e9099fad33042ce76898e16ddbf0

2 years agodpdk: bump to 21.08 80/33480/2
Fan Zhang [Thu, 12 Aug 2021 16:23:01 +0000 (17:23 +0100)]
dpdk: bump to 21.08

Type: feature

This patch bumps dpdk version from 21.05 to 21.08

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: I8f655dae1489c11e7fb2ff86f8a91b597383bd99

2 years agostats: enable/disable segments polls 73/32473/11
Ray Kinsella [Wed, 26 May 2021 14:41:59 +0000 (15:41 +0100)]
stats: enable/disable segments polls

Add an enable/disable field to stats segments poll. The is used by the
perfmon plugin to only poll for stats on an active bundle.

Type: improvement

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I6404a7db50d8e922afea5da8ec15fdabe3d97157

2 years agostats: stat_validate_counter_vector3 non-static 72/32472/11
Ray Kinsella [Thu, 27 May 2021 14:59:39 +0000 (15:59 +0100)]
stats: stat_validate_counter_vector3 non-static

Make stat_validate_counter_vector3 usable outside of stats segement.  Is
used by the perfmon plugin to allocate a 2-dimension array of values.

Type: improvement

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: If4be2e14ba718c20bf939d162e580880eab1a6cb

2 years agosession: fix prefetch out of struct bound on Arm 99/33599/2
Tianyu Li [Thu, 26 Aug 2021 02:03:43 +0000 (10:03 +0800)]
session: fix prefetch out of struct bound on Arm

CLIB_PREFETCH (s->tx_fifo, 2 * CLIB_CACHE_LINE_BYTES, LOAD);
sizeof(svm_fifo_t) is 128 bytes

Note on 64B cacheline size Arm machine,
CLIB_CACHE_LINE_BYTES 128
CLIB_CACHE_PREFETCH_BYTES 6

above CLIB_PREFETCH () macro will be expand to
__builtin_prefetch(s->tx_fifo)
__builtin_prefetch(s->tx_fifo + 64)
__builtin_prefetch(s->tx_fifo + 128) << prefetch out of range
__builtin_prefetch(s->tx_fifo + 192) << the same here

Solution:
Change to CLIB_PREFETCH (s->tx_fifo, sizeof (*(s->tx_fifo)), LOAD);

Type: fix
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Reviewed-by: Lijian Zhang <lijian.zhang@arm.com>
Change-Id: I745cbce3dbe5afcab53c39189d18392f569df5aa

2 years agovcl: fix vlsh conversion error 17/33617/2
liuyacan [Mon, 30 Aug 2021 05:24:53 +0000 (13:24 +0800)]
vcl: fix vlsh conversion error

vlsh may not belong to the current vcl worker.

Type: fix

Signed-off-by: liuyacan <liuyacan@corp.netease.com>
Change-Id: I75f962313e538fcd2b1cc6dffca53997648ca43e

2 years agosession: close app wrk socket on delete 84/33484/4
Florin Coras [Fri, 13 Aug 2021 01:12:09 +0000 (18:12 -0700)]
session: close app wrk socket on delete

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I54fa6e8f12bb52988888e7019a88d6891017944c

2 years agotls: use default OpenSSL built-in DH parameters 14/33514/2
Ofer Heifetz [Sun, 25 Jul 2021 16:37:46 +0000 (19:37 +0300)]
tls: use default OpenSSL built-in DH parameters

Type: improvement

Motivation for this addition is to add support for cipher suites
that use Diffie-Hellman Ephemeral (DHE) for key exchange.

Using ephemeral DH key exchange yields forward secrecy as the
connection can only be decrypted when the DH key is known.
Configure OpenSSL to use the default built-in DH parameters for the
SSL_CTX object.

Change-Id: I31aadad047a6394ddf8bfa08471c239e0d1cd63c
Signed-off-by: Ofer Heifetz <oferh@marvell.com>
2 years agotcp: Allow accepting session to send custom packet 96/33496/2
liuyacan [Mon, 16 Aug 2021 02:51:13 +0000 (10:51 +0800)]
tcp: Allow accepting session to send custom packet

Tcp may want to send acks in established, but the app
has not called accept() yet.

Type: improvement

Signed-off-by: liuyacan <liuyacan@corp.netease.com>
Change-Id: I43b8cd386e533ca95c8ec260a0a1f695ea140358

2 years agovppinfra: add compress functions for u64, u16 and u8 15/33615/4
Mohsin Kazmi [Fri, 27 Aug 2021 16:57:16 +0000 (18:57 +0200)]
vppinfra: add compress functions for u64, u16 and u8

Type: improvement

Change-Id: I2640148b8959f9a8303520ba2815fe02f1e47928
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2 years agovlib: vpp banner is outputted to non-interactive vppctl session 62/33562/5
Steven Luong [Sat, 21 Aug 2021 02:14:16 +0000 (19:14 -0700)]
vlib: vpp banner is outputted to non-interactive vppctl session

Running a batch file which contains many vppctl commands, occasionally,
VPP may spit out the banner for some of the commands. This happens
when VPP erroneously views the vppctl session as interactive.

A simple way to recreate the problem is to run a batch script as followed
while [ 1 ]
do
     vppctl create loopback interface
     vppctl delete loopback interface intfc loop0
done

We have two processes which may display the banner,
unix_cli_new_session_process and unix_cli_process. Normally,
unix_cli_process parses the input tokens and displays the banner after
it negotiates the terminal type with the vppctl app.
unix_cli_new_session_process only displays the banner just in case the
client fails to negotiate terminal type. It runs on a timer and expires
in 1 second to display the banner if by then the terminal type is still
not yet negotiated.

The problem is when the session is killed or exitted, VPP does not remove
the element that was enqueued for cli_new_session_process. The index
for the connection (cf) is recycled. The timer for the queue element
continues to run. When the timer expires for the queue element, it
finds the wrong new session due to index recycling. If the new
session has not had negotiated the terminal type, the banner is printed
erroneously to the new session from cli_new_session_process.

The fix is to clean up the queue element to stop cli_new_session_process
from processing the wrong connection when the session is killed.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ife2f1b1c95661e442f0fc6b73505e330e6641fc1

2 years agosnort: fix incorrect data length for snort inspection 63/33563/2
Sivaprasad Tummala [Sun, 22 Aug 2021 09:39:35 +0000 (15:09 +0530)]
snort: fix incorrect data length for snort inspection

set the right data length to decode the packet properly.

Type: fix

Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com>
Change-Id: I6a35fa54851496d0a958f1a64a547b7f08bb4c19

2 years agobufmon: add buffer monitoring plugin 95/31595/7
Benoît Ganne [Tue, 9 Mar 2021 14:37:49 +0000 (15:37 +0100)]
bufmon: add buffer monitoring plugin

This plugin allow to keep track of buffer usage in VPP graph nodes. The
main use is to detect buffer leakages.

Type: feature

Change-Id: Iadcf4ab98207fab6e2fa375060879bc2a25b711e
Signed-off-by: Benoît Ganne <bganne@cisco.com>