vpp.git
3 years agoaf_xdp: add option to claim all available rx queues 49/28849/2
Benoît Ganne [Tue, 15 Sep 2020 13:25:43 +0000 (15:25 +0200)]
af_xdp: add option to claim all available rx queues

Type: feature

Change-Id: I97176c2c90ea664a68078b3a7b7d44eb237a7f13
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agoipsec: remove pending node 28/29528/3
Fan Zhang [Mon, 19 Oct 2020 12:08:34 +0000 (13:08 +0100)]
ipsec: remove pending node

This patch removes esp-encrypt-pending and esp-decrypt-pending
graph nodes from ipsec data-path.

Type: improvement

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

3 years agovrrp: asynchronous events on VR state change 15/29315/3
Matthew Smith [Thu, 8 Oct 2020 16:11:27 +0000 (11:11 -0500)]
vrrp: asynchronous events on VR state change

Type: feature

Add API message for an API client to subscribe/unsubscribe to receive
an event when a VRRP VR changes state. Add code to build and send the
events.

Change-Id: Ie92cadd4850d4352c1aaa79c4b0a7daa0f3b04e7
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agordma: implement striding rq for multiseg rx 75/29575/3
Mohammed Hawari [Wed, 21 Oct 2020 12:48:38 +0000 (14:48 +0200)]
rdma: implement striding rq for multiseg rx

This change leverages the striding RQ feature of
ConnectX-5 adapters to support chained buffers on
the RX path. In Striding RQ mode, WQE are SG lists
of data segments, each mapped to a vlib_buffer.
When a packet is received, it can consume one or
multiple data segments belonging to the WQE,
without wasting the whole WQE.

Change-Id: I74eba5b2c2c66538e75e046335058ba011cb27fd
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
3 years agordma: add RSS support for IPv6 and TCP 85/29485/2
Benoît Ganne [Fri, 16 Oct 2020 15:12:41 +0000 (17:12 +0200)]
rdma: add RSS support for IPv6 and TCP

Type: feature

Change-Id: I8b0d918e6f13325954b29bf34e4ef224c1315c51
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agobuild: add compile_commands.json cleanup script 14/29614/3
Damjan Marion [Fri, 23 Oct 2020 15:20:32 +0000 (17:20 +0200)]
build: add compile_commands.json cleanup script

Type: make
Change-Id: I8d6a5018bddf029e106df3cb8b8eded4fa28067d
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agocnat: coverity fix 13/29613/2
Nathan Skrzypczak [Fri, 23 Oct 2020 15:03:14 +0000 (17:03 +0200)]
cnat: coverity fix

Type: fix

Change-Id: Ie1153a0e0f1e9770bf3e0de9291131db91724b2e
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agolb: Loadbalancer plugin, correctly rewrite checksum in L3DSR, non-TCP cases 73/28673/6
Hiroki Narukawa [Fri, 4 Sep 2020 06:41:40 +0000 (15:41 +0900)]
lb: Loadbalancer plugin, correctly rewrite checksum in L3DSR, non-TCP cases

Current loadbalancer seems to rewrite the 17th and 18th octet of L4 header regardless of which kind of L4 protocol is used in case of L3DSR.

In case UDP, it rewrites 9th and 10th octet of payload (because UDP header is 8 octets long). If UDP payload is less than 8 octets, UDP checksum becomes invalid.

In other protocols similar problems is likely to occue.

This patch checks which L4 protocol is used, and rewrite packet regarding the L4 protocol.

Signed-off-by: Hiroki Narukawa <nhirokinet@nhiroki.net>
Change-Id: I84390ff58a33f05efac0421856beea89014adc72
Type: fix

3 years agovmxnet3: add sw_if_index filter to vmxnet3 interface dump 85/29585/3
Steven Luong [Wed, 21 Oct 2020 23:55:49 +0000 (16:55 -0700)]
vmxnet3: add sw_if_index filter to vmxnet3 interface dump

Introduce a replacement API for vmxnet3_dump which supports interface
filter.

Type: improvement

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

3 years agovlib: log: fix non-null terminated strings 89/29589/3
jiangxiaoming [Thu, 22 Oct 2020 02:08:36 +0000 (10:08 +0800)]
vlib: log: fix non-null terminated strings

Type: fix
Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Change-Id: Id61966048875ca56a416caa520125c8c2366bf7b

3 years agotcp: remove snd_una_max 16/29616/3
Florin Coras [Fri, 23 Oct 2020 17:45:48 +0000 (10:45 -0700)]
tcp: remove snd_una_max

Type: improvement

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

3 years agotcp: remove force retransmit timer update 00/29600/7
Florin Coras [Thu, 22 Oct 2020 18:22:22 +0000 (11:22 -0700)]
tcp: remove force retransmit timer update

Also simplify condition for detecting unintended timer pops.

Type: improvement

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

3 years agobuild: fix typo in dpdk-20.08 patch #0003 08/29508/1
Dave Wallace [Fri, 23 Oct 2020 13:35:12 +0000 (09:35 -0400)]
build: fix typo in dpdk-20.08 patch #0003

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: Id0b3264e723f1df161a606e4dbdcd70c36d448a4
(cherry picked from commit ee3ea114961610476bac544a979fdee8278d2b9e)

3 years agotcp: remove delack time config 03/29603/2
Florin Coras [Thu, 22 Oct 2020 22:49:05 +0000 (15:49 -0700)]
tcp: remove delack time config

Type: refactor

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

3 years agonat: nat44 enable/disable dynamic config 63/29463/5
Filip Varga [Wed, 30 Sep 2020 20:24:47 +0000 (22:24 +0200)]
nat: nat44 enable/disable dynamic config

This patch changes initialization and configuration of NAT
plugin. Instead of allocating data structures at vpp plugin
initialization phase allocation and configuration happens
after calling enable API or CLI call. This reduces base VPP
memory footprint and also enables dynamic reconfiguration
of the NAT plugin.

Type: improvement
Change-Id: I42c069ee19a0311d043ac1f3f230d87bc8d2680f
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agovppinfra: add bihash_8/24_16 to headers list 87/29587/2
jiangxiaoming [Thu, 22 Oct 2020 01:08:04 +0000 (09:08 +0800)]
vppinfra: add bihash_8/24_16 to headers list

Type: improvement
Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Change-Id: Ic67977995dbcba97240009373a4b9e9b57c63706

3 years agovirtio: checksum error reported for ip6 traffic with GSO enable 99/29399/2
Steven Luong [Mon, 12 Oct 2020 17:43:28 +0000 (10:43 -0700)]
virtio: checksum error reported for ip6 traffic with GSO enable

When GSO is enabled, vhost clears the checksum field prior to transmitting
the packet. Some newer kernel version does not like that and complains
about checksum error. This was seen with ip6 traffic.

Type: fix

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

3 years agosvm: support large memfd segments 01/29601/3
Florin Coras [Thu, 22 Oct 2020 18:59:55 +0000 (11:59 -0700)]
svm: support large memfd segments

Type: fix

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

3 years agotcp: no send space in timer recovery 91/29591/3
Florin Coras [Thu, 22 Oct 2020 06:24:53 +0000 (23:24 -0700)]
tcp: no send space in timer recovery

Type: fix

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

3 years agovppinfra: missing __clib_export va_unformat 95/29595/2
Juraj Linkeš [Thu, 22 Oct 2020 11:29:28 +0000 (13:29 +0200)]
vppinfra: missing __clib_export va_unformat

Fix an issue observed on aarch64 systems when running with dpdk plugin:
dpdk_plugin.so: undefined symbol: va_unformat

Type: fix
Fixes: dae1c7ed38e9f7a86e66f3674de62778cc981331

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Change-Id: I22b7ee842dc606f96effdeb7aa4e161496986aed

3 years agopci: set PCI memory enable before mapping PCI BAR 77/29577/5
Mohammed Hawari [Wed, 21 Oct 2020 14:41:30 +0000 (16:41 +0200)]
pci: set PCI memory enable before mapping PCI BAR

This change mitigates software faults issued by some versions of the
linux kernel vfio-pci driver when VF PCI BARs are used without setting
the memory enable bit in the PCI configuration. This problem is
mentionned in https://lkml.org/lkml/2020/6/25/628

Change-Id: Idc177be4a5adb6ee467b4dd8f055f133ff267fe1
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
3 years agobuild: add -E to sudo invocation in top-level Makefile 82/29582/3
Damjan Marion [Wed, 21 Oct 2020 21:55:08 +0000 (23:55 +0200)]
build: add -E to sudo invocation in top-level Makefile

Type: make
Change-Id: I447c6082bfe4aa549e6a7ebc156b657419fc608c
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agotap: fix the api for use of vec_len 78/29578/2
Mohsin Kazmi [Wed, 21 Oct 2020 16:32:59 +0000 (18:32 +0200)]
tap: fix the api for use of vec_len

Type: fix

Fixes: 03b76a20c569b8275beb8783691300a7d66b54a4

Change-Id: Ife788974cb7b2c35f40a017dd195dc2f7ee797b4
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agotcp: updating time constans as timer tick changed 90/29590/3
Ryujiro Shibuya [Thu, 22 Oct 2020 05:26:32 +0000 (05:26 +0000)]
tcp: updating time constans as timer tick changed

Type: fix
Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com>
Change-Id: Ibe305b96f04ffdc95ddb07d144dc00119ae69a07

3 years agovlib: per-class logging configuration in startup.conf 80/29580/3
Damjan Marion [Wed, 21 Oct 2020 17:43:36 +0000 (19:43 +0200)]
vlib: per-class logging configuration in startup.conf

logging {
  class avf {
    rate-limit 200
    level debug
    syslog-level debug
  }

  class dpdk/cryptodev {
    rate-limit 200
    level disabled
    syslog-level disabled
  }
}

Type: improvement
Change-Id: Iebe49b3ed4dfbfd589e80fcd2f9a63a8fe66b83b
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agostats: missing dimension in stat_set_simple_counter 69/29569/3
Ole Troan [Wed, 21 Oct 2020 09:55:28 +0000 (11:55 +0200)]
stats: missing dimension in stat_set_simple_counter

A simple counter is a two dimensional array by threads and
counter index. 28017 introduced an error missing the first
dimension.

If a vector is updated at the same time as a client reads,
an invalid pointer my result. This will be caught by the
optimistic locking after copying out the data, but if
following a pointer outside of the stat segment then
the stat client would crash. Add suitable boundary checks
for access to stat memory segment.

Fixes: 7d29e320fb2855a1ddb7a6af09078b8ed636de01
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I94f124ec71d98218c4eda5d124ac5594743d93d6

3 years agovppinfra: missing __clib_export 79/29579/2
Nathan Skrzypczak [Wed, 21 Oct 2020 17:30:48 +0000 (19:30 +0200)]
vppinfra: missing __clib_export

Type: fix

Change-Id: I2dbd435d04a09f632286e5d669edc5fafd384f94
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agovlib: print logs to stderr if interactive or nosyslog set 71/29571/5
Damjan Marion [Wed, 21 Oct 2020 10:43:40 +0000 (12:43 +0200)]
vlib: print logs to stderr if interactive or nosyslog set

If VPP is started in interactive mode, instead of sending logs to syslog
server we print them directly to stderr.
Output is colorized, but that can be turned off with unix { nocolor }

Type: improvement
Change-Id: I9a0f0803e4cba2849a6efa0b6a86b9614ed33ced
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agobuild: fix broken debian dependencies on ubuntu-18.04 & debian-9 34/29534/5
Dave Wallace [Mon, 19 Oct 2020 18:57:55 +0000 (14:57 -0400)]
build: fix broken debian dependencies on ubuntu-18.04 & debian-9

- Installation vpp-plugin-core from packagecloud.io/master
  & packagecloud.io/2009 breaks due to invalid dependencies
  on newer versions of libmbedtls & libmbedcrypto

Type: fix
Fixes: 641467406

Change-Id: If736dabcc4a91a04b46515620dd87662b7b14260
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
3 years agoikev2: support sending requests from responder 47/29547/3
Filip Tehlar [Sat, 10 Oct 2020 04:39:11 +0000 (04:39 +0000)]
ikev2: support sending requests from responder

Type: improvement
Ticket: VPP-1894

Change-Id: I5a24a48416bca2ffbd346cdaa813fb25801e6c9b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agoipsec: support for multipoint on ipsec interfaces 27/29527/2
Neale Ranns [Mon, 19 Oct 2020 09:59:41 +0000 (09:59 +0000)]
ipsec: support for multipoint on ipsec interfaces

Type: feature

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Iae9fe35cfbce4c675fa25e0800c0f4629a83e012

3 years agoip: convert u32 entry_flags to vl_api_mfib_entry_flags_t on mroute API 42/29542/3
Neale Ranns [Tue, 20 Oct 2020 07:20:17 +0000 (07:20 +0000)]
ip: convert u32 entry_flags to vl_api_mfib_entry_flags_t on mroute API

Type: fix

This is not an API change, it's the same values, just a different named
type.
also use VppEnum values in tests

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I3a18b529514f3cc9467ae4e8ac3e88d067fc776b

3 years agoikev2: fix setting responder/initiator addresses 91/29391/3
Filip Tehlar [Wed, 7 Oct 2020 23:52:37 +0000 (23:52 +0000)]
ikev2: fix setting responder/initiator addresses

Type: fix

Change-Id: Ic406aa914d92e802a5fb0f27c2ffa1b98db012b0
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agoikev2: prevent crash after no IP address 27/28527/12
Filip Tehlar [Wed, 7 Oct 2020 19:17:00 +0000 (19:17 +0000)]
ikev2: prevent crash after no IP address

Type: fix
Ticket: VPP-1900

This fixes a crash when initiating IKE connection using interface
without any IP address.
It also ensures that the IKE connection is automatically retried once the
interface obtains an address.

Signed-off-by: jan_cavojsky <Jan.Cavojsky@pantheon.tech>
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ia1919c349e64b3a0a4198365e075e177e3ba3de5

3 years agocnat: allow max_u16 translation backends 40/29440/5
Nathan Skrzypczak [Tue, 13 Oct 2020 15:26:47 +0000 (17:26 +0200)]
cnat: allow max_u16 translation backends

Type: fix

Allow for 65536 backends for a translation.
- use u32 instead of u8
- filter out back_walk with more than
FIB_PATH_LIST_POPULAR backends
- we're still limited by u16 lb_n_buckets
in src/vnet/dpo/load_balance.h

Change-Id: Ib37b958e59b25ef5ef9f92b82008d626860faddd
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agovirtio: run process to send interrupts to input nodes 89/29389/4
Mohsin Kazmi [Mon, 12 Oct 2020 11:01:24 +0000 (13:01 +0200)]
virtio: run process to send interrupts to input nodes

Type: improvement

virtio interfaces support packet coalescing and buffering which
depends on timer expiry to flush the stored packets periodically.

virtio input node checks timer expiry and schedules tx queue
accordingly. In poll mode, timer expiry is handled naturally,
as input node runs periodically. In interrupt mode, virtio
input node depends on the interrupts send from backend.
Stored packets could starve, if there would not be interrupts
to input node.

This patch implements a process node which periodically
sends interrupt to virtio input node given coalescing or buffering
feature is enabled on an interface.

Change-Id: Ic38f749f74b001073d4d0579dca149d0a4cea039
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agoipsec: Add to the SA info directly in the bihash 30/29530/4
Neale Ranns [Mon, 19 Oct 2020 13:23:33 +0000 (13:23 +0000)]
ipsec: Add to the SA info directly in the bihash

Type: improvement

this save the cache miss on the protect structure.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I867d5e49df5edfd6b368f17a34747f32840080e4

3 years agovcl: wait for sendto to connect if needed 62/29562/2
Florin Coras [Wed, 21 Oct 2020 01:44:41 +0000 (18:44 -0700)]
vcl: wait for sendto to connect if needed

Type: fix

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

3 years agomisc: fix tracedump graph api initialization overflow 70/29570/2
Benoît Ganne [Wed, 21 Oct 2020 10:18:58 +0000 (12:18 +0200)]
misc: fix tracedump graph api initialization overflow

vppapigen does not create config entries for services stream messages.
It is not needed anyway as the api handler does not rely on VPPAPI
macros.

Type: fix

Change-Id: Iba188b0fc6388c478d7e4d0c7ee2c05ed672e23f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agoaf_xdp: fix NUMA node parsing 22/29522/3
Benoît Ganne [Mon, 19 Oct 2020 07:49:09 +0000 (09:49 +0200)]
af_xdp: fix NUMA node parsing

Non-NUMA systems might report -1 as NUMA node.

Type: fix

Change-Id: I092c817ea670009d6f530cc70ad13d45e15fd363
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agostn: remove dependency on tcp and udp headers 59/29559/3
Florin Coras [Tue, 20 Oct 2020 20:40:17 +0000 (13:40 -0700)]
stn: remove dependency on tcp and udp headers

Type: improvement

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

3 years agogso: remove dependency on tcp proto implementation 60/29560/3
Florin Coras [Tue, 20 Oct 2020 20:45:51 +0000 (13:45 -0700)]
gso: remove dependency on tcp proto implementation

Type: improvement

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

3 years agosvm: fix ASAN annotations for external chunks 52/29552/2
Benoît Ganne [Tue, 20 Oct 2020 12:31:55 +0000 (14:31 +0200)]
svm: fix ASAN annotations for external chunks

Chunks can be allocated from another process. We need to manually
mark them as accessible for ASAN.

Type: fix

Change-Id: Ifbeef3346e9cee2c1231f80cbcf7f9673b5b54be
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agovppinfra: fix ASAN annotation 66/29566/2
Benoît Ganne [Wed, 21 Oct 2020 08:02:18 +0000 (10:02 +0200)]
vppinfra: fix ASAN annotation

Type: fix

Change-Id: I90b537eba7f56dbb1928f0ab5f157218affb43f5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agosvm: fix fifo unit test 67/29567/2
Benoît Ganne [Wed, 21 Oct 2020 09:13:24 +0000 (11:13 +0200)]
svm: fix fifo unit test

 - fix fifo initialization overflowing chunk size
 - stick to the default base virtual address to initialize fifo. ASAN
   can be picky about address space

Type: fix

Change-Id: If9a29138d2c207859d72845e928290c808c4a982
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agovirtio: improve input node performance 33/29533/2
Damjan Marion [Mon, 19 Oct 2020 15:15:58 +0000 (17:15 +0200)]
virtio: improve input node performance

 - Avoid feature arc lookup per packet, as all packets belong to the
   same interface

 - don't validate enqueue for l2 packets, as they all have same
   destionation

Type: improvement
Change-Id: I32ddd801f219eab9281736abafdc91a4ff9e0989
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovirtio: move lock and kick to outer function 46/29546/2
Damjan Marion [Tue, 20 Oct 2020 10:11:06 +0000 (12:11 +0200)]
virtio: move lock and kick to outer function

Type: improvement
Change-Id: I4fdcb40142e8cc9f5f1d0035116659543d5d92fe
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agomisc: minimize dependencies on udp.h 61/29561/9
Florin Coras [Tue, 20 Oct 2020 21:59:43 +0000 (14:59 -0700)]
misc: minimize dependencies on udp.h

Type: improvement

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

3 years agotls: enable cert key pair setting for connect 63/29563/2
jiangxiaoming [Wed, 21 Oct 2020 01:54:33 +0000 (09:54 +0800)]
tls: enable cert key pair setting for connect

Type: improvement
Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Change-Id: Ie0e6d48d65b0b8b493e9d49cfdf93c645523659a

3 years agodpdk: Disable VLAN filtering for VLAN sub-interface in i40e driver 11/29411/3
Dimitrios Markou [Mon, 12 Oct 2020 10:44:38 +0000 (12:44 +0200)]
dpdk: Disable VLAN filtering for VLAN sub-interface in i40e driver

When creating a VLAN sub-interface on a Fortville i40e DPDK VF,
the data plane does not work properly.

Enabling vlan filter offload overrides the VLAN strip offload setting to on.
The VLAN strip offload must be disabled for VPP VLAN sub-interfaces to work.

Ticket: https://jira.fd.io/browse/VPP-1933
Type: fix

Signed-off-by: Dimitrios Markou <dimitrios.markou@est.tech>
Change-Id: I02c6980e3b01870b69a9375f281125ad48477827

3 years agovppinfra: export elog_read_file_not_inline() 58/29558/2
Dave Barach [Tue, 20 Oct 2020 19:17:50 +0000 (15:17 -0400)]
vppinfra: export elog_read_file_not_inline()

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

3 years agostats: crash when adding/deleting interfaces 53/29553/2
Ole Troan [Tue, 20 Oct 2020 12:36:13 +0000 (14:36 +0200)]
stats: crash when adding/deleting interfaces

create tap
delete tap tap0
create loopback interface
delete loopback interface intfc loop0
create tap <- here I hit a segmentation fault

Type: fix
Fixes: 148c7b768721231325a349fa82db693190513b53
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: If270cc57610e2ded7422e7030d8c1f9fadd4d233

3 years agovcl: confirm reset on transport cleanup 65/28165/4
Florin Coras [Tue, 4 Aug 2020 01:55:40 +0000 (18:55 -0700)]
vcl: confirm reset on transport cleanup

Type: fix

Change-Id: Ife579f305409bf987639634213008a7d7f35acd7
Signed-off-by: Florin Coras <fcoras@cisco.com>
3 years agovcl: more session struct cleanup 38/29538/5
Florin Coras [Tue, 20 Oct 2020 03:51:36 +0000 (20:51 -0700)]
vcl: more session struct cleanup

Type: improvement

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

3 years agowireguard: reset secret data before freeing it 49/29549/3
Benoît Ganne [Tue, 20 Oct 2020 12:12:20 +0000 (14:12 +0200)]
wireguard: reset secret data before freeing it

Type: fix

Change-Id: I880bdd55ae5da0b9775a3fb548d44512348a7bc6
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agovcl: convert vep variables into flags 37/29537/4
Florin Coras [Tue, 20 Oct 2020 01:36:48 +0000 (18:36 -0700)]
vcl: convert vep variables into flags

Type: improvement

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

3 years agoipsec: Stack the adj from the destination in the SA's TX table 44/29544/1
Neale Ranns [Tue, 20 Oct 2020 08:49:31 +0000 (08:49 +0000)]
ipsec: Stack the adj from the destination in the SA's TX table

Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ib7f39243e051cdf44cc7151d14458a7fab42c6a8

3 years agovcl: cleanup read and write ready 19/29519/8
Florin Coras [Mon, 19 Oct 2020 03:17:49 +0000 (20:17 -0700)]
vcl: cleanup read and write ready

Type: improvement

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

3 years agovppinfra: minor refactor in lock.h 35/29535/2
Dave Barach [Mon, 19 Oct 2020 20:05:07 +0000 (16:05 -0400)]
vppinfra: minor refactor in lock.h

For whatever reason, "typedef struct { ... } *foo_t" gives cgo a
horrible case of indigestion. A minor refactor makes the pain go away.

Type: refactor

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

3 years agoip: Move the IP6 fib into ip6_[m]fib.c 32/29532/2
Neale Ranns [Mon, 19 Oct 2020 14:47:20 +0000 (14:47 +0000)]
ip: Move the IP6 fib into ip6_[m]fib.c

Type: improvement

reduce the compile time by moving the bihash includes out of ip[46].h

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I6b9216e10aff1013071f9238b3e1ebbdd205bd80

3 years agohsa: refactor socket client app 18/29518/3
Florin Coras [Sun, 18 Oct 2020 23:52:48 +0000 (16:52 -0700)]
hsa: refactor socket client app

Type: refactor

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

3 years agohsa: cleanup sock server test 88/29488/9
Florin Coras [Sat, 17 Oct 2020 00:57:36 +0000 (17:57 -0700)]
hsa: cleanup sock server test

Type: refactor

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

3 years agoipsec: Layout and prefetching of SA struct 17/29517/2
Neale Ranns [Fri, 16 Oct 2020 14:03:55 +0000 (14:03 +0000)]
ipsec: Layout and prefetching of SA struct

Type: improvement

- collect all DP used variables onto 1st or 2nd cache line
- prefetch the 2nd cache line
- in encrypt prefetch the likely location of the trailer.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I44d58f8d2d469ff71a4f4a71578e7cc1acaeba43

3 years agovirtio: fix compilation time 16/29516/2
Damjan Marion [Sun, 18 Oct 2020 12:00:43 +0000 (14:00 +0200)]
virtio: fix compilation time

There is no need to inline 3 times virtio_refill_vring()...

Type: fix
Change-Id: Ic26e24fd7911af743fedd0e2282784b715e86c3c
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agogso: add checksum validation in gro 65/29265/3
Mohsin Kazmi [Tue, 6 Oct 2020 09:58:40 +0000 (11:58 +0200)]
gso: add checksum validation in gro

Type: improvement

Change-Id: I0680c1626a46c8afcb7b6e665cc0734b7b37fd18
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agomisc: don't export symbols from plugins 91/29491/7
Damjan Marion [Sat, 17 Oct 2020 11:33:32 +0000 (13:33 +0200)]
misc: don't export symbols from plugins

Type: improvement
Change-Id: I2a176fe2871d2e54b010bffc4f1f7a3616f0c455
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovppinfra: add export symbols 95/29495/2
Dave Barach [Sun, 18 Oct 2020 10:54:31 +0000 (06:54 -0400)]
vppinfra: add export symbols

format_one_elog_event()
vec_len_not_inline()
vec_free_not_inline()

Type: fix

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

3 years agovppinfra: export elog_get_events() 92/29492/2
Dave Barach [Sat, 17 Oct 2020 21:22:47 +0000 (17:22 -0400)]
vppinfra: export elog_get_events()

Type: fix

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

3 years agovppinfra: explicitly export symbols 90/29490/4
Damjan Marion [Sat, 17 Oct 2020 11:32:25 +0000 (13:32 +0200)]
vppinfra: explicitly export symbols

Type: improvement
Change-Id: I57a9f85f7df1fc48656b72592349f4c544302f77
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agomisc: move gmod to extras/ 89/29489/1
Damjan Marion [Sat, 17 Oct 2020 09:53:31 +0000 (11:53 +0200)]
misc: move gmod to extras/

Type: make
Change-Id: I057237ec5cef4dbecf6b6cd5a0adb4b7dfa78337
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agotap: replaces strlen to vec_len 14/29314/2
Mohsin Kazmi [Thu, 8 Oct 2020 15:44:36 +0000 (17:44 +0200)]
tap: replaces strlen to vec_len

Type: fix

Change-Id: I478b6fc54c47f0e77a1470ed29fdd56774671441
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agobuild: backport dpdk usertools support python3 only patch 72/29472/4
Dave Wallace [Thu, 15 Oct 2020 19:53:50 +0000 (15:53 -0400)]
build: backport dpdk usertools support python3 only patch

- On Centos-8, 'make install-ext-deps' fails due to the
  bpr-mangle-shebangs script failing the dpdk usertools
  python scripts containing '#!/usr/bin/env python'.
  Backport usertools section of the DPDK patch which
  fixes this issue:
  http://git.dpdk.org/dpdk/commit/?id=3f6f83626cf4967a99382a6518a614a1bf3d2c20

- Also fix README to reflect name change of dpdk master
  branch to 'main'.

Type: fix

Change-Id: I487b1ff2da786a4a3fd8fb0f859436b0e1885f1b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
3 years agovcl: remove accept state and rename connect to ready 69/29469/3
Florin Coras [Thu, 15 Oct 2020 17:54:47 +0000 (10:54 -0700)]
vcl: remove accept state and rename connect to ready

Type: refactor

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

3 years agomisc: deprecate VOM 83/29483/5
Damjan Marion [Fri, 16 Oct 2020 13:28:47 +0000 (15:28 +0200)]
misc: deprecate VOM

Type: make
Change-Id: Ifb3e52af93d24fcc2f2e6a0c408e16902a2fe553
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoacl: do vlib_buffer_enqueue_to_next in outer function 71/29371/2
Damjan Marion [Fri, 9 Oct 2020 14:43:43 +0000 (16:43 +0200)]
acl: do vlib_buffer_enqueue_to_next in outer function

Improves compilation time and reduces object file size for 1MB

Type: improvement
Change-Id: Ibe4840c0ced22070248d93822ea61afe20aff65c
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoipsec: fix instance, and cli del for new ipsec interface 71/29471/4
Eric Kinzie [Wed, 14 Oct 2020 00:02:11 +0000 (20:02 -0400)]
ipsec: fix instance, and cli del for new ipsec interface

- use user instance number in interface name

Restore the behavior of previous versions where the IPsec tunnel
interface name contained the value of the user-provided instance number.
For example, a command similar to

create ipsec tunnel local-ip . . . instance 5

would result in the creation of interface "ipsec5".

- ipsec: delete tunnel protection when asked

The "ipsec tunnel protect" command will parse a "del" argument but does
not undo the tunnel protection, leaving the SAs hanging around with
reference counts that were incremented by a previous invocation of the
command. Allow the tunnel protection to be deleted and also update the
help text to indicate that deletion is an option.

- test: ipsec: add test for ipsec interface instance

Also cleanup (unconfig) after TestIpsecItf4 NULL algo test.

Type: fix
Fixes: dd4ccf2623b5 ("ipsec: Dedicated IPSec interface type")
Signed-off-by: Eric Kinzie <ekinzie@labn.net>
Signed-off-by: Christian Hopps <chopps@labn.net>
Change-Id: Idb59ceafa0633040344473c9942b6536e3d941ce

3 years agomisc: bump debian compatibility level to 10 76/29476/2
Damjan Marion [Fri, 16 Oct 2020 09:23:48 +0000 (11:23 +0200)]
misc: bump debian compatibility level to 10

Level 9 is deprecated in new ubuntu release.

Type: improvement
Change-Id: I9376b5f7a1aa0860e35475c5d32f3626257d2f01
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agonat: error in input parameter of init_nat_k 83/29383/2
Dengfeng Liu [Mon, 12 Oct 2020 06:45:28 +0000 (02:45 -0400)]
nat: error in input parameter of init_nat_k

Type: fix
Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
Change-Id: I3e7ee771d0cf5b7b1b9fbbc833776d523dfa9f09

3 years agobuild: Add missing debian dependencies 74/29474/2
Chuan Han [Thu, 15 Oct 2020 21:16:49 +0000 (14:16 -0700)]
build: Add missing debian dependencies

Otherwise, vpp install will fail.

Type: improvement

Signed-off-by: Chuan Han <chuan.han.comm@gmail.com>
Change-Id: Ifb4d7b8f6fb7b333b8205ba6b424176f8554cfdc

3 years agovlib: add cgo-friendly plugin registration support 73/29473/1
Dave Barach [Thu, 15 Oct 2020 21:07:03 +0000 (17:07 -0400)]
vlib: add cgo-friendly plugin registration support

Allows us to declare plugin registrations in a non-disgusting way:

var plugin_reg = vpp.PluginRegistration{
        Description: "The CGO plugin",
        Version:     "My Version",
        Overrides:   "sample_plugin.so",
}

It turns out that the specific compiler setup generates (.data section
offset, length) pairs in the .vlib_plugin_r2 section:

Contents of section .vlib_plugin_r2:
 1ba9d0 00000000 00000000 50a81800 00000000  ........P.......
 1ba9e0 0a000000 00000000 00000000 00000000  ................
 1ba9f0 00000000 00000000 00000000 00000000  ................
 1baa00 00000000 00000000 00000000 00000000  ................
 1baa10 00000000 00000000 70a81800 00000000  ........p.......
 1baa20 0e000000 00000000                    ........

Contents of section .data:
 18a800 00a81800 00000000 00000000 00000000  ................
 18a810 00000000 00000000 00000000 00000000  ................
 18a820 00000000 00000000 00000000 00000000  ................
 18a830 00000000 00000000 00000000 00000000  ................
 18a840 00000000 00000000 14000000 00000000  ................
 18a850 4d792056 65727369 6f6e0000 00000000  My Version......
 18a860 00000000 00000000 14000000 00000000  ................
 18a870 54686520 45474f20 706c7567 696e0000  The CGO plugin..
 18a880 00000000 00000000 0c000000 00000000  ................
 <etc>

Unfortunately, it seems impossible to torture clang / gcc into
producing anything like this. This patch fabricates a plausible
vlib_plugin_registration_t from the so-called vlib_plugin_r2_t.

Type: improvement

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

3 years agobuild: forward dependencies to arch-specific libs 37/29437/2
Aloys Augustin [Tue, 13 Oct 2020 13:43:00 +0000 (15:43 +0200)]
build: forward dependencies to arch-specific libs

Without this, if a multiarch source depends on a generated api header
for instance, the build would be racy between the api header generation
and the multiarch object compilation.

Type: improvement
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Change-Id: I08fcd0e5a1c51398ac1a8f37cf6562064b400d4a

3 years agoethernet: fix Ethernet DMAC checks 61/29461/3
Ivan Shvedunov [Thu, 15 Oct 2020 10:19:35 +0000 (13:19 +0300)]
ethernet: fix Ethernet DMAC checks

Type: fix

Due to confusion between ethernet flags and hw interface flags, DMAC
filtering was not happening, most of the time.

Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Change-Id: I95209e1ea0f95f9be0b1a82ec9fcbc80955428d2

3 years agovcl: refactor session state enum 55/29455/6
Florin Coras [Wed, 14 Oct 2020 23:35:58 +0000 (16:35 -0700)]
vcl: refactor session state enum

Only allow one state instead of using flags.

Type: improvement

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

3 years agomisc: 20.09 Release Notes 29/29429/2
Andrew Yourtchenko [Fri, 25 Sep 2020 14:06:34 +0000 (14:06 +0000)]
misc: 20.09 Release Notes

Type: docs
Change-Id: I1b12f1d14a1a68504767c01ceac0eed115fb7ba6
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
(cherry picked from commit 3c5414029bb432e51820e39e86f26fd6b39c6447)

3 years agocrypto: fixed ipsec_mb lib dependencies 67/29367/7
PiotrX Kleski [Mon, 12 Oct 2020 13:33:11 +0000 (15:33 +0200)]
crypto: fixed ipsec_mb lib dependencies

Type: fix

This patch re-enables libIPSec_MB build for the ipsecmb crypto engine
plugin.

Also since DPDK meson build relies on system installed libIPSec_MB.so
that may be inconsistent with VPP compiled one (system installed
version vs VPP locally compiled version for example), this patch also
disables all libIPSec_MB dependant PMDs from DPDK build.

Also ipsec-mb version is incresed to 0.54.

Signed-off-by: PiotrX Kleski <piotrx.kleski@intel.com>
Reviewed-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: I2ff9e7cd0c35cff9fa642895301a26a5350ea94e

3 years agompls: no per-MPLS-tunnel tx node 04/29304/4
Neale Ranns [Thu, 8 Oct 2020 10:06:32 +0000 (10:06 +0000)]
mpls: no per-MPLS-tunnel tx node

Type: improvement

do not add a per-MPLS tunnel tx node. per-tunnl nodes limit the number
of tunnels that can be created to the number o fnodes that can be
created (64k).
improve the tx node.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I6016f05e809c6c64a0b098a101b28c9dd47824b3

3 years agonat: Fix ICMP bypass session creation 77/29277/3
Vladimir Isaev [Wed, 7 Oct 2020 11:55:11 +0000 (14:55 +0300)]
nat: Fix ICMP bypass session creation

After get_icmp_o2i_ed_key() bihash key may include
IP protocol and addresses from inner ICMP packet.

It is OK for session lookup, but we should not create
a session on ICMP error message receiving.

Type: fix

Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: Ic93272ebe90d2288a975265439f9e079eb28936a

3 years agocnat: Fix backend LB 49/29449/2
Nathan Skrzypczak [Wed, 14 Oct 2020 11:26:57 +0000 (13:26 +0200)]
cnat: Fix backend LB

Type: fix

Change-Id: I4ea263270bcc38e505e88d512acacef7439f3823
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agobuild: add missing dnf-plugins-core package on centos-8 82/28982/4
Dave Wallace [Mon, 21 Sep 2020 17:07:29 +0000 (13:07 -0400)]
build: add missing dnf-plugins-core package on centos-8

Type: fix

Change-Id: I1a4d9a7a8089cbf488dcd6f09eec6b4e0d0d72fe
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
3 years agovlib: avoid clipping in show error 41/29441/2
Florin Coras [Tue, 13 Oct 2020 22:10:29 +0000 (15:10 -0700)]
vlib: avoid clipping in show error

Type: improvement

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

3 years agovcl: set STATE_UPDATED state when connect with non-blocking socket! 09/29409/5
fanyf [Tue, 13 Oct 2020 09:07:16 +0000 (17:07 +0800)]
vcl: set STATE_UPDATED state when connect with non-blocking socket!

State set to STATE_UPDATED to ensure the session is not assumed to be open and to also allow the app to close it prior to vpp's connected reply!

Type: fix

Signed-off-by: fanyf <fanyufei521@outlook.com>
Change-Id: I7a6d0914599cb9296d112205dac725ecd11a5d0f

3 years agovcl: app_name format type error 12/29412/2
jiangxiaoming [Tue, 13 Oct 2020 06:23:29 +0000 (14:23 +0800)]
vcl: app_name format type error

Type: fix
Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Change-Id: I9f017ec84320ebc56f557385d73893ecf8f25bcd

3 years agotcp: fix bt acked_sacked on recovery 74/29374/3
Florin Coras [Fri, 9 Oct 2020 19:04:50 +0000 (12:04 -0700)]
tcp: fix bt acked_sacked on recovery

Type: fix

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

3 years agosession: listeners verbose format alignment 38/29438/2
Florin Coras [Tue, 13 Oct 2020 14:40:42 +0000 (07:40 -0700)]
session: listeners verbose format alignment

Type: improvement

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

3 years agosvm: fix coverity warning 05/29405/3
Florin Coras [Tue, 13 Oct 2020 02:08:22 +0000 (19:08 -0700)]
svm: fix coverity warning

Type: fix

Change-Id: I6c6255e66dd4cd0e4174b2a1658a3b8be40f0f7a
Signed-off-by: Florin Coras <fcoras@cisco.com>
3 years agotcp: fix listener trace coverity warning 04/29404/3
Florin Coras [Tue, 13 Oct 2020 02:03:52 +0000 (19:03 -0700)]
tcp: fix listener trace coverity warning

Type: fix

Change-Id: I75c0bd862260e188f625271c3bd545a7ab37af5d
Signed-off-by: Florin Coras <fcoras@cisco.com>
3 years agosession: allow custom config of segment baseva 03/29403/3
Florin Coras [Tue, 13 Oct 2020 01:39:44 +0000 (18:39 -0700)]
session: allow custom config of segment baseva

Type: improvement

Change-Id: If9ea09d652c228004492cf47854a7f6c1f8b3bc2
Signed-off-by: Florin Coras <fcoras@cisco.com>
3 years agostats: counters data model 96/29296/4
Ole Troan [Wed, 7 Oct 2020 16:05:37 +0000 (18:05 +0200)]
stats: counters data model

This adds a new data model for counters.
Specifying the errors severity and unit.
A later patch will update vpp_get_stats to take advantage of this.
Only the map plugin is updates as an example.

New .api language:
A new "counters" keyword to define counter sets.

counters map {
  none {
    severity info;
    type counter64;
    units "packets";
    description "valid MAP packets";
  };
  bad_protocol {
    severity error;
    type counter64;
    units "packets";
    description "bad protocol";
  };
};

Each counter has 4 keywords. severity, which is one of error, info or warn.
A type, which is one of counter64 or gauge64.
units, which is a text field using units from YANG.

paths {
  "/err/ip4-map" "map";
  "/err/ip6-map" "map";
  "/err/ip4-t-map" "map";
  "/err/ip6-t-map" "map";
};

A new paths keyword that maps the counter-set to a path in the stats segment KV store.

Updated VPP CLI to include severity so user can see error counter severity.
DBGvpp# show errors
   Count               Node                    Reason        Severity
        13        ethernet-input              no error         error

Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ib2177543f49d4c3aef4d7fa72476cff2068f7771
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agoikev2: fix initial contact cleanup 52/28452/5
Filip Tehlar [Wed, 23 Sep 2020 11:20:12 +0000 (11:20 +0000)]
ikev2: fix initial contact cleanup

When looking for existing SA connection to clean up search all per
thread data, not only current one.

Type: fix

Change-Id: I59312e08a07ca1f474b6389999e59320c5128e7d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agoikev2: fix coverity warning 63/29263/4
Filip Tehlar [Tue, 6 Oct 2020 08:04:10 +0000 (08:04 +0000)]
ikev2: fix coverity warning

Type: fix

Change-Id: Iee96b3ea3e71ec248c3c3c98d153a08372b5faf0
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>