Ole Troan [Tue, 15 Sep 2020 09:37:16 +0000 (11:37 +0200)]
api: clean up use of deprecated flag
The syntax of the deprecated flag has evolved.
Clean up usage to be "option deprecated;".
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: If2b639f275eb8db58b36c457f9245fe35a4d8cb1
Andrew Yourtchenko [Fri, 11 Sep 2020 17:40:52 +0000 (17:40 +0000)]
vppapigen: crcchecker: report deprecated messages
Report if the messages were marked as deprecated,
but not yet deleted.
Useful for building the release notes and comparing
between the releases.
Also, put the dict_compare() call into the report(),
since latter always consumes the output of the former.
Change-Id: Iceab3e94ff66da931a4669b612026bd162dd5d1a
Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
jan_cavojsky [Fri, 11 Sep 2020 08:45:17 +0000 (10:45 +0200)]
flowprobe: add show commands for params and list of interfaces for recording
Type: feature
Ticket: VPP-1861
Signed-off-by: jan_cavojsky <Jan.Cavojsky@pantheon.tech>
Change-Id: Iaeff13b19a712257223a4e77893cfd9398c18327
Dave Barach [Mon, 14 Sep 2020 14:21:11 +0000 (10:21 -0400)]
docs: improve plugin developer's guide
Topics added: disabling lightly-used, experimental, or test plugins
by default. Discourage folks from creating bihash tables, processes
etc. from VLIB_INIT_FUNCTIONs.
Type: docs
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I1235d64971e9ed50f992b75f96b77c934168276a
Simon Zhang [Tue, 15 Sep 2020 15:40:28 +0000 (23:40 +0800)]
tcp: make max gso packet size configurable
Type: improvement
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Change-Id: I14de90f07d825c5c99023996a88173ee855e9a6f
Onong Tayeng [Tue, 15 Sep 2020 08:25:29 +0000 (13:55 +0530)]
lisp: fix lisp|one_eid_table_dump's local|remote options in vat
The local|remote options to vat's lisp|one_eid_table_dump api command
does not print the eid details instead it produces the following error
messages:
Filter error, unknown filter: 1
Filter error, unknown filter: 2
Type: fix
Signed-off-by: Onong Tayeng <otayeng@cisco.com>
Change-Id: I000c290b400dbf39bd883d57115923167092c9bd
Neale Ranns [Tue, 15 Sep 2020 07:13:46 +0000 (07:13 +0000)]
crypto: Crypto SW Scheduler Coverity Warnings
Type: fix
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I7f98d0c7847ecc40b90b78e5ae83f320575be310
Damjan Marion [Tue, 15 Sep 2020 09:05:23 +0000 (11:05 +0200)]
crypto-native: fix issues detected by coiverity
Type: fix
Change-Id: Id61aa407eeeb4d44cf47ed39283a0c79ed3abbee
Signed-off-by: Damjan Marion <damarion@cisco.com>
Yichen Wang [Wed, 1 Jul 2020 06:14:23 +0000 (23:14 -0700)]
build: fix the the build on centos/rhel 8
1. Remove uncessary runtime dependency;
2. Add missing build dependency;
3. Fix runtime dependency for api-python3 RPM;
Type: make
Change-Id: I2700f1a15112effba8d1527aca6467158f81f486
Signed-off-by: Yichen Wang <yicwang@cisco.com>
Damjan Marion [Mon, 14 Sep 2020 10:18:44 +0000 (12:18 +0200)]
l2: allocate l2fib only when needed
Currently l2 fib allocates 512MB hash table unconditionally on startup.
This patch postpones table creation up to the point where first
interface is put into l2 mode or mac entry is added.
In addition it reduces default table size to 128MB and increases number
of buckets 4 times. This default setting should be enough to keep 1M mac
entries.
Also, new startup.conf section is added which allows user to change memory
and bucket size. .i.e:
l2fib {
table-size 512M
num-buckets 524288
}
Type: improvement
Change-Id: I2a29209aa3545181f0087544c97a54d8157b6ec5
Signed-off-by: Damjan Marion <damarion@cisco.com>
Florin Coras [Mon, 14 Sep 2020 17:29:29 +0000 (10:29 -0700)]
session: del app worker on socket detach
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic904abedcd270c95e782159170d457bc396424a0
Neale Ranns [Mon, 14 Sep 2020 13:28:42 +0000 (13:28 +0000)]
wireguard: coverity fixes
Type: fix
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ib1eabbc87a573c660ac251602d631f167928259b
Florin Coras [Wed, 9 Sep 2020 05:43:47 +0000 (22:43 -0700)]
vcl: add support for app socket api
To enable add "app-socket-api /path/to/socket" to vcl.conf. On vpp side, add
use-app-socket-api to session stanza in startup.conf
VPP allocates a socket per application namespace which it places in the
app_ns_sockets subfolder of the run folder (default /var/run/vpp). The
socket used implicitly selects the app namespace for the vcl app.
Type: feature
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ifc14b93dcbf6ef9bed1852d46cd069f4855b92ef
Florin Coras [Tue, 8 Sep 2020 23:47:57 +0000 (16:47 -0700)]
vcl: cleanup bapi and wrk registration
Type: refactor
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0391db5c3ad038265cb8ebf9de02925653e35959
Florin Coras [Thu, 3 Sep 2020 02:10:28 +0000 (19:10 -0700)]
session: add unix socket api for app attachment
This is an af_unix socket alternative to the binary api. To enable it,
add use-app-socket-api under session stanza in startup.conf. When the
socket api is enabled, attachments through the binary api are disabled.
The socket api only works with memfd fifo segments, i.e., shm segments
are not supported.
Type: feature
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I55ffcee201d004846daeeec85c700c7e7a578d43
Florin Coras [Thu, 10 Sep 2020 19:27:14 +0000 (12:27 -0700)]
vcl: always fill buffer or drain rx fifo
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibbe438aa6f2fe6d9f55c56ca6d3aec1a29b32cad
Neale Ranns [Mon, 14 Sep 2020 08:29:05 +0000 (08:29 +0000)]
wireguard: increase FIB source priority
Type: fix
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Icc1c458474d357c7d9b3b4df1897500de0c314a1
Ole Troan [Mon, 14 Sep 2020 10:21:13 +0000 (12:21 +0200)]
nat: delay datastructure allocation until configured
The dslite plugin would on plugin load initialize large bihash datastructures.
Postpone until configured.
Type: improvement
Change-Id: Ie790ab8c5fc39fac18153acd54dcd051805e763a
Signed-off-by: Ole Troan <ot@cisco.com>
Damjan Marion [Fri, 11 Sep 2020 20:13:46 +0000 (22:13 +0200)]
vppinfra: add clib_log2_page_sz and format/unformat functions
Type: improvement
Change-Id: Ie44dbf9396cfed19dba153810b7bd76ce5377cd4
Signed-off-by: Damjan Marion <damarion@cisco.com>
Filip Tehlar [Thu, 10 Sep 2020 03:37:37 +0000 (03:37 +0000)]
ikev2: fix copy-paste error when freeing memory
Type: fix
Change-Id: If44c807d188b3e88d819f4132d73e6a34402a525
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Neale Ranns [Thu, 10 Sep 2020 08:49:10 +0000 (08:49 +0000)]
wireguard: Fix for tunnel encap
Type: fix
add UT for sneding handshale init and transport packets
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Iab1ed8864c666d5a0ae0b2364a9ca4de3c8770dc
Onong Tayeng [Fri, 11 Sep 2020 11:52:07 +0000 (17:22 +0530)]
lisp: fix spelling mistake in option name
In the vat help msg for one_add_del_l2_arp_entry the IP address option
is misspelled as "ip4 <ip4>" when it should have been "ip <ip4>".
Type: fix
Signed-off-by: Onong Tayeng <otayeng@cisco.com>
Change-Id: Id4058a3ddfdb78b840d7e5a3c330e67b393f5d3b
Andrew Yourtchenko [Fri, 11 Sep 2020 15:54:43 +0000 (15:54 +0000)]
misc: edit the MAINTAINERS entries for crypto plugins for common style
Change-Id: Ic40bf11210cf1c36420578281f5a42668bad9801
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Nathan Skrzypczak [Fri, 11 Sep 2020 07:47:41 +0000 (09:47 +0200)]
quic: Clean quic_crypto_setup_cipher
Type: fix
Change-Id: I4c19636c2be8a577c6cba272708cb04bcc24785b
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Onong Tayeng [Fri, 11 Sep 2020 10:08:20 +0000 (15:38 +0530)]
lisp: fix help msg of show eid-table command
The lisp|one show eid-table command's help msg does not display the
available options. This patch fixes that.
show lisp eid-table [local|remote|eid <eid>]
show one eid-table [local|remote|eid <eid>]
Type: fix
Signed-off-by: Onong Tayeng <otayeng@cisco.com>
Change-Id: Id39148db2ff291a7fe859830c1488b69ccd15c05
Chenmin Sun [Fri, 11 Sep 2020 14:32:51 +0000 (22:32 +0800)]
dpdk: fix coverity defect #214232, #182930
Type: fix
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: Ie328834159687cdb4314c37d36697f2fb9081fbd
Damjan Marion [Fri, 11 Sep 2020 12:11:11 +0000 (14:11 +0200)]
avf: add assert to ensure that adminq is used only from avf process
Type: improvement
Change-Id: Ib64c9b8207776986656e5a26c13a221edc6cc950
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Fri, 11 Sep 2020 12:10:35 +0000 (14:10 +0200)]
avf: change promisc mode from the avf process node
Avoid situations where promisc mode is chaged while avf process
is suspended in the middle of adminq operation.
Type: fix
Change-Id: Ia1fc6551e83218b5938630ad3a15d4f3f0ceceff
Signed-off-by: Damjan Marion <damarion@cisco.com>
Vladimir Isaev [Thu, 27 Aug 2020 10:34:50 +0000 (13:34 +0300)]
nat: Fix next feature for ED with multiple workers
Multiple (> 1) workers leads to handoff node being enabled.
This node pops next feature index to nat.arc_next to make sure
that packet will be pushed to the next feature in the arc.
But node nat44-ed-in2out-output also pops next feature and changes
arc_next. So actual next feature will be skipped in that case.
It leads to all nat44-ed-in2out packets being dropped if we have
multiple workers (handoff node enabled).
To resolve this a new node was added (nat-pre-in2out-output) to fill
arc_next in single worker case and multiple worker case is already
handled by handoff node.
Type: fix
Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: I9dfba68f00164d2d5ab867224871811bef4411ed
Damjan Marion [Wed, 9 Sep 2020 15:40:02 +0000 (17:40 +0200)]
avf: fix race between avf and cli/api process
device pool my grow during suspemd which will cause crash in avf process
after it exits from suspend.
Type: fix
Change-Id: I51fec90088c909cfbaaca6c245272a28c0827ca0
Signed-off-by: Damjan Marion <damarion@cisco.com>
Benoît Ganne [Thu, 10 Sep 2020 12:12:06 +0000 (14:12 +0200)]
vlib: fix call to vlib_get_node_by_name
Type: fix
Change-Id: I1b4f52e186165b04db5bd5f11058dc77b647bc94
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Filip Varga [Tue, 8 Sep 2020 14:22:44 +0000 (16:22 +0200)]
nat: endian mismatch
Type: fix
Change-Id: Icf6ce0ddb5fe9d078503e9d9ff7e7b26423f53f8
Signed-off-by: Filip Varga <fivarga@cisco.com>
Benoît Ganne [Wed, 9 Sep 2020 10:50:07 +0000 (12:50 +0200)]
build: fix build for Debian 9 and Debian 10
Type: fix
Change-Id: Ic07d0ae313b32e420ba93693cb75960a86f752a9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Damjan Marion [Thu, 20 Aug 2020 15:28:20 +0000 (17:28 +0200)]
avf: fix race between avf process node and avf_delete_if(...)
It may happen that process node is suspended while it waits for response
from adminq and during that time CLI or API process can call
avf_delete_if. When avf process node resumes, it may happen that device
is not there anymeore.
This patch delegates interface deletion to process node, so CLI/API
process just sends signal instead of deleting device instance itself.
Type: fix
Change-Id: I7f12e12df3071650f6e60ad7eb5af23b7acfe335
Signed-off-by: Damjan Marion <damarion@cisco.com>
Matthew Smith [Thu, 10 Sep 2020 15:09:01 +0000 (10:09 -0500)]
l2: fix null deref in l2_to_bvi()
Type: fix
Static analysis identified a possible null pointer dereference. It
was introduced by a recent patch which expanded the DMAC comparison
on inbound packets on a BVI interface to include any secondary MAC
addresses which were added to an interface.
Check if the pointer is null before dereferencing.
Change-Id: Ic2afe2b062eda32977e05bf3f98d82c1fe64620c
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Benoît Ganne [Thu, 10 Sep 2020 11:54:49 +0000 (13:54 +0200)]
ikev2: fix memory leaks
- make sure everything is freed on cleanup
- reuse already allocated vectors where possible
Type: fix
Change-Id: Ibd8da1edb37126522dc2d525596521d32dceb73a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Aloys Augustin [Thu, 10 Sep 2020 15:28:18 +0000 (15:28 +0000)]
quic: fix coverity warning
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Change-Id: Ic51ba3450b3d0722ebff4280127f526b5a9934b1
Martin Millnert [Thu, 10 Sep 2020 23:02:26 +0000 (01:02 +0200)]
misc: selinux fixes (packet_socket r/w)
vpp-20.05 on up-to-date Centos 7.8 host with enforcing SELinux fails to
create a host-interface due to two missing SELinux-permissions:
vpp_t self:packet_socket { read write }
This simple patch adds these two permissions. Tested successfully on
local installation.
The steps to reproduce:
$ ip link add vpeer-host type veth peer name vpeer-vpp
vpp# create host-interface name vpeer-vpp
create host-interface: Permission denied (errno 13)
[...]
$ semodule -i vpp-packet-socket.pp
vpp# create host-interface name vpeer-vpp
host-vpeer-vpp
Type: fix
Ticket: VPP-1931
Change-Id: I2b3d92b27b9a9f26aa1c85af2946b15e83e27944
Signed-off-by: Martin Millnert <martin@millnert.se>
Onong Tayeng [Thu, 10 Sep 2020 15:46:55 +0000 (21:16 +0530)]
lisp: fix vat crash with one_add_del_local_eid api
VAT crashes when the one_add_del_local_eid api is invoked with mac
address as eid.
Type: fix
Signed-off-by: Onong Tayeng <otayeng@cisco.com>
Change-Id: I29e246f6cad4b350fec52d54e94dbed586d488c4
Artem Glazychev [Thu, 10 Sep 2020 06:13:29 +0000 (13:13 +0700)]
wireguard: fix handshake procedure
Type: fix
Change-Id: I96e8c5c9c792b1d9aefd39ce3e240d220827b7d1
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Onong Tayeng [Fri, 4 Sep 2020 11:46:23 +0000 (17:16 +0530)]
lisp: fix crash with arp and packet trace on
With packet trace on, VPP crashes when an arp packet arrives. This patch
fixes the crash and also ensures that the packet trace displays the eid
info.
Type: fix
Signed-off-by: Onong Tayeng <otayeng@cisco.com>
Change-Id: Iaad09a5e2b33e931ab9bd7bc3d4573b5ed5e4bfd
Mohammed Hawari [Thu, 10 Sep 2020 13:10:45 +0000 (15:10 +0200)]
af_xdp: documents incompatibility with 1GB hugepages and high buffers-per-numa.
Type: docs
Change-Id: If8602d4b73cc1f04e42d19b8df60a05f67aa90c9
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Damjan Marion [Wed, 9 Sep 2020 16:55:16 +0000 (18:55 +0200)]
vlib: support interrupt re-arm from node
Type: improvement
Change-Id: I13517bff4129497644e0efc3495d0ee7897fe5a7
Signed-off-by: Damjan Marion <damarion@cisco.com>
Nathan Skrzypczak [Fri, 4 Sep 2020 16:31:23 +0000 (18:31 +0200)]
docs: Improve new plugin doc & add govpp API doc
Type: docs
Change-Id: I5f20ac0232c5cdc3cf64015185b0d0fc5c4a3100
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Nathan Skrzypczak [Tue, 8 Sep 2020 16:09:59 +0000 (18:09 +0200)]
docs: Update and improve indent install
Type: docs
Change-Id: I1a37450261e0bcedf90685243b14027f3cf23704
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Matthew Smith [Mon, 31 Aug 2020 19:55:17 +0000 (14:55 -0500)]
l2: check secondary macs on BVI interface
Type: fix
VRRP cannot be used on a BVI interface currently because packets sent
to the virtual mac address of the VR fail the destination mac check in
l2_to_bvi().
Apparently people want to use VRRP on BVI interfaces, so update the
check in l2_to_bvi() so that it will check any secondary mac addresses
which have been added to the ethernet interface if the destination mac
address does not match the primary mac address for the interface.
An equivalent check is already done in ethernet_input_inline() for L3
interfaces which are in promiscuous mode.
Change-Id: I7c5bf624dafda8744fea236c704e8e17e5f53b35
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Nathan Skrzypczak [Wed, 9 Sep 2020 15:57:12 +0000 (17:57 +0200)]
docs: Fix create memif cli
Type: docs
Change-Id: I91a954abf77335e1ddcbd1468633d9d7980bbac2
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Benoît Ganne [Wed, 9 Sep 2020 08:00:34 +0000 (10:00 +0200)]
svm: fix non-null-terminated string
Type: fix
Change-Id: Ia9cd71ce12584cd8ef90bfe357cf762dd7653f71
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Andrew Yourtchenko [Mon, 7 Sep 2020 18:04:16 +0000 (18:04 +0000)]
misc: Merge 20.05.1, 19.08.3 RELEASE.md sections
also, remove a duplicate 17.01.1 section and wrong page tag for 20.09
Change-Id: Ia2cc77faa75cccab38972ad46517762cb7456466
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Artem Glazychev [Mon, 31 Aug 2020 10:12:30 +0000 (17:12 +0700)]
wireguard: initial implementation of wireguard protocol
Type: feature
The main information about plugin you can see in README.md
vpp# wireguard ?
wireguard create wireguard create listen-port <port> private-key <key> src <IP> [generate-key]
wireguard delete wireguard delete <interface>
wireguard peer add wireguard peer add <wg_int> public-key <pub_key_other>endpoint <ip4_dst> allowed-ip <prefix>dst-port [port_dst] persistent-keepalive [keepalive_interval]
wireguard peer remove wireguard peer remove <index>
Change-Id: I85eb0bfc033ccfb2045696398d8a108b1c64b8d9
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Jim Thompson <jim@netgate.com>
Signed-off-by: Neale Ranns <nranns@cisco.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
Fan Zhang [Thu, 3 Sep 2020 16:10:57 +0000 (17:10 +0100)]
crypto: change cryptodev with new cryptodev API
Type: feature
This patch updateds cryptodev engine uses new DPDK Cryptodev
API planned to be upstreamed in DPDK 20.11.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Piotr Bronowski <piotrX.bronowski@intel.com>
Change-Id: I8dd1a8ac643f1e952deb787e466b76ea7aa5f420
Chenmin Sun [Mon, 6 Jul 2020 00:20:39 +0000 (08:20 +0800)]
interface: support configuring RSS steering queues
This patch adds the RSS steering queues set interface, and it's
implementation in DPDK device:
/* Interface to set rss queues of the interface */
typedef clib_error_t *(vnet_interface_rss_queues_set_t)
(struct vnet_main_t * vnm, struct vnet_hw_interface_t * hi,
clib_bitmap_t *bitmap);
This patch also introduces a command line to set the RSS queues:
set interface rss queues <interface> <list <queue-list>>
To display the rss queues, use "show hardware-interfaces"
Below is the example to configure rss queues for interface Gig0:
vpp# set interface rss queues Gig0 list 0,2,4-7
vpp# show hardware-interfaces brief
Name Idx Link Hardware
VirtualFunctionEthernet18/1/0 1 down VirtualFunctionEthernet18/1/0
Link speed: unknown
RSS queues: 0 2 4 5 6 7
local0 0 down local0
Link speed: unknown
vpp#
Users can also configure the rss queues on a dpdk interface in
startup.conf:
dpdk {
dev 0000:18:01.0 {
rss-queues 0,2,5-7
}
}
Type: feature
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I1835595a1c54016a84eabee9fd62ce137935385d
Rajesh Goel [Thu, 3 Sep 2020 13:08:03 +0000 (18:38 +0530)]
stats: Fix stat_segment to set timeout directly
Type: fix
Signed-off-by: Rajesh Goel <rajegoel@cisco.com>
Change-Id: Ib37802f4270fe894a31e871c7fbb12b5a1cdf058
Ryujiro Shibuya [Wed, 9 Sep 2020 04:14:11 +0000 (04:14 +0000)]
tcp: fix the tcp unittest to work
Type: fix
Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com>
Change-Id: If5a8313262da828616db8b1d9ef831d42b11d952
Christian Hopps [Tue, 14 Jul 2020 12:39:30 +0000 (08:39 -0400)]
dpdk-ipsec: don't leak buffers on crypto alloc failure
Type: fix
Signed-off-by: Christian Hopps <chopps@labn.net>
Change-Id: I4dee2ea723631e1bd95b33a74b9431d984565aef
Christian Hopps [Sat, 22 Aug 2020 14:44:33 +0000 (14:44 +0000)]
dpdk: fix extended stat strings
- These were displaying blank, apparently dpdk extended stat strings
must be within the heap so they are identified as vectors by
format_c_identifier even though they are not.
Type: fix
Change-Id: I2b153b100203b9856ce3af6d5ecb2daae410fb5b
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Sun, 23 Aug 2020 13:37:34 +0000 (13:37 +0000)]
dpdk: fix interface counters to never go backward
Was seeing imissed counter become negative. Reuse the RX_ERROR code for all
three error counters to avoid the problem.
Type: fix
Change-Id: I99a69c8816326682745785ecd30e18a131ac2969
Signed-off-by: Christian Hopps <chopps@labn.net>
Florin Coras [Fri, 4 Sep 2020 15:57:27 +0000 (08:57 -0700)]
svm session: document unsupported fifo deq combinations
Type: fix
- Document that ooo dequeues with ooo lookups cannot be done in
combination with in order dequeues.
- Added assert to capture this scenario and de-initialized rbtrees for
cut-through tx fifo
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic40d020b3f0391fcf022ea3c906b86121744144f
Christian Hopps [Sun, 3 Nov 2019 12:02:15 +0000 (07:02 -0500)]
ipsec: fix padding/alignment for native IPsec encryption
Not all ESP crypto algorithms require padding/alignment to be the same
as AES block/IV size. CCM, CTR and GCM all have no padding/alignment
requirements, and the RFCs indicate that no padding (beyond ESPs 4 octet
alignment requirement) should be used unless TFC (traffic flow
confidentiality) has been requested.
CTR: https://tools.ietf.org/html/rfc3686#section-3.2
GCM: https://tools.ietf.org/html/rfc4106#section-3.2
CCM: https://tools.ietf.org/html/rfc4309#section-3.2
- VPP is incorrectly using the IV/AES block size to pad CTR and GCM.
These modes do not require padding (beyond ESPs 4 octet requirement), as
a result packets will have unnecessary padding, which will waste
bandwidth at least and possibly fail certain network configurations that
have finely tuned MTU configurations at worst.
Fix this as well as changing the field names from ".*block_size" to
".*block_align" to better represent their actual (and only) use. Rename
"block_sz" in esp_encrypt to "esp_align" and set it correctly as well.
test: ipsec: Add unit-test to test for RFC correct padding/alignment
test: patch scapy to not incorrectly pad ccm, ctr, gcm modes as well
- Scapy is also incorrectly using the AES block size of 16 to pad CCM,
CTR, and GCM cipher modes. A bug report has been opened with the
and acknowledged with the upstream scapy project as well:
https://github.com/secdev/scapy/issues/2322
Ticket: VPP-1928
Type: fix
Signed-off-by: Christian Hopps <chopps@labn.net>
Change-Id: Iaa4d6a325a2e99fdcb2c375a3395bcfe7947770e
Christian E. Hopps [Fri, 27 Sep 2019 18:05:09 +0000 (14:05 -0400)]
marvell: add cli options to configure rxq and txq sizes
Add the ability to configure the pp2 rx and tx queue sizes in the CLI.
Type: improvement
Signed-off-by: Christian E. Hopps <chopps@chopps.org>
Change-Id: I6a824f92e22fa47fec3d84525cc2d82524ddf639
Nathan Skrzypczak [Thu, 3 Sep 2020 09:37:56 +0000 (11:37 +0200)]
vlib: vlib_get_node_by_name fails via API
Type: fix
Calling vlib_get_node_by_name via the VPE api
doesn't work due to hash weirdness. Haven't
gotten around the real cause of this. But this
fixes it.
Change-Id: I89f95dba2bcd9573b8f1f435e063e9dd57f9ca93
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Nathan Skrzypczak [Fri, 4 Sep 2020 14:27:20 +0000 (16:27 +0200)]
docs: Improve & link cnat doc
Type: docs
Change-Id: Ib985ed6a644ae3f4c330bf6a27dc69c49a489a2f
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Dave Barach [Fri, 4 Sep 2020 20:32:24 +0000 (16:32 -0400)]
cnat: fix cnat_set_snat() debug CLI
Otherwise, the debug CLI command is unusable in a script because it
will eat (and complain about) subsequent lines in the script. Missing
this guitar lick, etc:
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
return 0;
Type: fix
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Id328e6f1cc4d2e1672c3946db3865ab5a1a3af8d
MathiasRaoul [Tue, 1 Sep 2020 14:30:02 +0000 (14:30 +0000)]
cnat: fix snat ip v6 tests
Type: fix
Change-Id: I9e102e0028274cc084e59c106d1cd4be174b1205
Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
Mohsin Kazmi [Mon, 31 Aug 2020 15:17:16 +0000 (17:17 +0200)]
virtio: remove kernel virtio header dependencies
Type: refactor
tap, virtio and vhost use virtio/vhost header files from linux
kernel. Different features are supported on different kernel
versions, making it difficult to use those in VPP. This patch
removes virtio/vhost based header dependencies to local header
files.
Change-Id: I064a8adb5cd9753c986b6f224bb075200b3856af
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Matthew Smith [Wed, 2 Sep 2020 21:42:55 +0000 (16:42 -0500)]
vrrp: improve RFC compliance for ARP/ND
Type: fix
The ARP/ND feature nodes reply to requests for a VR virtual IP address
when a VR is in the master state. If the VR is in the backup state, the
request is passed to the next node on the feature arc.
This can cause an incorrect response to be sent. If some other feature
(e.g. NAT) causes a virtual IP address to be configured as a "local"
address on the system, a later node on the feature arc may respond to
an ARP/ND request with the real MAC address of the interface.
RFC 5798 says that a router must respond to ARP/ND requests for VR
virtual IP addresses with the VR virtual MAC address. And it says a
router must not respond to ARP/ND requests for VR virtual IP addresses
when the VR is in the backup state. Ensure that ARP/ND requests for
VR virtual IP addresses are dropped when in the backup state rather
than allowing them to continue on the feature arc where another node
may end up responding.
In order to do this, enable/disable the feature nodes when leaving
or entering the init state instead of the master state.
Change-Id: I416f83e125cbf91deb90c3b6eb00ba3207de24ad
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Damjan Marion [Fri, 4 Sep 2020 10:34:58 +0000 (12:34 +0200)]
buffers: improve cache occupancy
Adjust buffer allocation so it always have odd number of cache lines.
That should result in better distribution of cachelines among cache sets.
Type: improvement
Change-Id: I0d39d4cf01cff36ad6f70a700730823a96448c22
Signed-off-by: Damjan Marion <damarion@cisco.com>
Christian Hopps [Mon, 13 Jul 2020 10:49:56 +0000 (06:49 -0400)]
dpdk-ipsec: use init function instead of one-time process
Use VLIB_MAIN_LOOP_ENTER_FUNCTION to do post init initialization for
dpdk crypto rather than create a one-time process to do the same.
Type: fix
Signed-off-by: Christian Hopps <chopps@labn.net>
Change-Id: I06e480b028c8e1fc1b0024a66b2338eb21a797ca
Nathan Skrzypczak [Thu, 3 Sep 2020 10:45:20 +0000 (12:45 +0200)]
vpp: Fix node APIs
Type: fix
Change-Id: Ic6e2b7e05b50945a8e2222019c2942a6ee52e465
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Christian Hopps [Tue, 14 Jul 2020 13:41:43 +0000 (09:41 -0400)]
dpdk-ipsec: fix show output
Fix the shown crypto inflight counts which were reversed. Also improve a
couple error descriptions to tell them apart when viewed.
Type: fix
Signed-off-by: Christian Hopps <chopps@labn.net>
Change-Id: I6d4054c64aa842658cfcde8969c7aa48f6d21207
Christian Hopps [Tue, 25 Aug 2020 16:40:40 +0000 (12:40 -0400)]
ipsec: fix trace of GRE_teb packets
The issue is not easily hit. When GRE_teb packets are received the post
crypto processing adjusts the l2.l2_len value in the vnet_buffer opaque
data. This is overwriting the ipsec opaque data. Later the trace code
fetches the sa_index from the ipsec opaque data. It's just an accident
that this currently works, if the ipsec data is changed so that the
sa_index moves around it will be overwritten by the l2_len modification.
Indeed, this was found b/c local development changes had moved the
sa_index so it was over-lapping with the l2_len memory space, and the UT
failed.
Type: fix
Change-Id: Iaecfa750cf0b36653fd9e75b4d799f323a14d932
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Fri, 17 Jul 2020 13:53:18 +0000 (09:53 -0400)]
ipsec: cli: add missing flags for SA add
Add missing cli options for setting IPsec SA flags, inbound,
use-anti-replay, and use-esn.
Type: fix
Change-Id: Ia7a91b4b0a12be9e4dd0e684be3e04d8ccafb9d4
Signed-off-by: Christian Hopps <chopps@labn.net>
Zhiyong Yang [Wed, 8 Jul 2020 20:28:36 +0000 (20:28 +0000)]
ip: enhance vtep4_check of tunnel by vector way
This patch aims to improve decap performance by reducing expensive
hash_get callings as less as possible using AVX512 on XEON.
e.g. vxlan, vxlan_gpe, geneve, gtpu.
For the existing code, if vtep4 of the current packet match the last
vtep4_key_t well, expensive hash computation can be avoided and the
code returns directly.
This patch improves tunnel decap multiple flows case greatly by
leveraging 512bit vector register on XEON accommodating 8 vtep4_keys.
It enhances the possiblity of avoiding unnecessary hash computing
once hash key of the current packet hits any one of 8 in the 512bit
cache.
The oldest element in vtep4_cache_t is updated in round-robin order.
vlib_get_buffers is also leveraged in the meanwhile.
Type: improvement
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Signed-off-by: Junfeng Wang <drenfong.wang@intel.com>
Change-Id: I313103202bd76f2dd638cd942554721b37ddad60
Christian Hopps [Wed, 2 Sep 2020 14:33:25 +0000 (10:33 -0400)]
api: fix ipsec custom_dump function
The protocol value was changed to 50 and 51 (rather than 0 and 1), but
the custom_dump function wasn't updated to reflect this. Also the is_add
value wasn't being shown. Fix both these issues.
Type: fix
Change-Id: I429b4616d6c7937f73308b644154370fab32eaae
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Mon, 13 Jan 2020 00:44:08 +0000 (00:44 +0000)]
misc: l2tp: cli: fix overly generic CLI commands
"clear counters" is not appropriate for a protocol to own. Change
to "clear l2tp counters" (and "test l2tp counter").
Type: fix
Signed-off-by: Christian Hopps <chopps@labn.net>
Change-Id: I3faac3907c4697c1c95df34ac7d31e48063869a8
Christian Hopps [Fri, 24 Apr 2020 08:39:59 +0000 (04:39 -0400)]
vlib: exit 0 (nocore) on SIGHUP
Scenarios where SIGHUP is sent would include the user closing an xterm
while in interactive/nodaemon mode, or similarly when running vpp in the
same mode during testing (e.g., using ssh to run VPP on a DUT). VPP
should exit in these cases; however, generating a core is unwanted.
Type: fix
Signed-off-by: Christian Hopps <chopps@labn.net>
Change-Id: Ibccfe5e676547e913c8a205ff16ab56d9abb1c82
Nathan Skrzypczak [Mon, 31 Aug 2020 13:33:57 +0000 (15:33 +0200)]
crypto: Add async crypto APIs
Type: feature
This adds api calls for the following CLIs:
* set sw_scheuduler worker <N> crypto on|off
* set crypto async dispatch polling|interrupt
* set crypto handler
* set crypto async handler
Change-Id: Ic701d149c440e42ea4575da42b9f69e4c8759602
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
PiotrX Kleski [Wed, 8 Jul 2020 12:36:34 +0000 (14:36 +0200)]
crypto: SW scheduler async crypto engine
Type: feature
This patch adds new sw_scheduler async crypto engine.
The engine transforms async frames info sync crypto ops and
delegates them to active sync engines. With the patch it
is possible to increase the single worker crypto throughput
by offloading the crypto workload to multiple workers.
By default all workers in the system will attend the crypto
workload processing. However a worker's available cycles
are limited. To avail more cycles to one worker to process
other workload (e.g. the worker core that handles the RX/TX
and IPSec stack processing), a useful cli command is added
to remove itself (or add it back later) from the heavy
crypto workload but only let other workers to process the
crypto. The command is:
- set sw_scheduler worker <idx> crypto <on|off>
It also adds new interrupt mode to async crypto dispatch node.
This mode signals the node when new frames are enqueued
as opposed to polling mode that continuously calls dispatch node.
New cli commands:
- set crypto async dispatch [polling|interrupt]
- show crypto async status (displays mode and nodes' states)
Signed-off-by: PiotrX Kleski <piotrx.kleski@intel.com>
Signed-off-by: DariuszX Kazimierski <dariuszx.kazimierski@intel.com>
Reviewed-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: I332655f347bb9e3bc9c64166e86e393e911bdb39
Florin Coras [Thu, 3 Sep 2020 03:52:58 +0000 (20:52 -0700)]
vcl: handle svm fifo write failure
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4b132cad8ff906ef24846cc43935ccfd6aa7b4ec
Florin Coras [Wed, 2 Sep 2020 17:51:10 +0000 (10:51 -0700)]
tcp: fix connection refused error
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I436741e061f11685980a71fb3989befc7af1e081
Filip Varga [Sun, 30 Aug 2020 19:19:55 +0000 (21:19 +0200)]
nat: twice-nat static mapping pool address
Let twice-nat static mapping pick specific
address from the twice-nat pool.
Type: improvement
Change-Id: Iadaa036af2fa3b0e6e9a68ff6e68b4bbe1650eb1
Signed-off-by: Filip Varga <fivarga@cisco.com>
Neale Ranns [Tue, 26 May 2020 13:12:17 +0000 (13:12 +0000)]
fib: IPv6 lookup data structure MP safe when prefixes change
Type: fix
adding routes should be MP safe. When new prefixes with differrent
prefix lengths are added, adjust the sorted list in an MP safe way.
Change-Id: Ib73a3c84d01eb86d17f8e79ea2bd2505dd9afb3d
Signed-off-by: Neale Ranns <nranns@cisco.com>
yedg [Sat, 29 Aug 2020 06:12:20 +0000 (14:12 +0800)]
fib: fix ADJ_NBR_ITF_OK param error
Type: fix
Signed-off-by: yedonggang <yedg@wangsu.com>
Change-Id: I3bf67070ed01df40626f3b90f2762158b6c3ce05
Steven Luong [Thu, 30 Jul 2020 14:31:40 +0000 (07:31 -0700)]
bonding: add bond_create2 API to include gso option
gso option is available for the debug CLI version of bond create.
This patch is to create a new API to have the corresponding option in
the binary API. The old binary API bond_create is marked deprecated.
Type: improvement
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Id9501b8e6d267ae09e2b411957f181343da459c0
Florin Coras [Tue, 1 Sep 2020 22:25:50 +0000 (15:25 -0700)]
session: fix non-blocking msg enqueue to vpp mq
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7228a01d38e61cc00358419b2512ca0da4f76ff5
Yulong Pei [Fri, 14 Aug 2020 10:21:08 +0000 (18:21 +0800)]
ipsec: add ipsec set async mode api
Type: improvement
Signed-off-by: Yulong Pei <yulong.pei@intel.com>
Change-Id: I841f4407ed8c1a448e5102059fc79ae1f7d461de
Benoît Ganne [Fri, 17 Jul 2020 09:49:56 +0000 (11:49 +0200)]
misc: fix pcap [rx|tx|drop] filename stem overflow
Type: fix
Change-Id: I2b6b7b6f28cbf7accf883743e390b0031dd13bbb
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Mohsin Kazmi [Wed, 2 Sep 2020 11:59:37 +0000 (11:59 +0000)]
tap: add the static assert for api flags
Type: improvement
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ia1276d00dded36ee28b4b2e93b4cc7c1df6b1eef
Mohsin Kazmi [Tue, 1 Sep 2020 17:17:44 +0000 (17:17 +0000)]
virtio: add virtio 1.1 api flags
Type: feature
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I95d7fc1cc8db5199570c66535f45e867a7cae676
jiangxiaoming [Thu, 27 Aug 2020 08:00:16 +0000 (16:00 +0800)]
build: Fix 'make build VPP_EXTRA_CMAKE_ARGS=-DVPP_ENABLE_SANITIZE_ADDR=ON' error on Centos 7
Type: fix
Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Change-Id: Ic47f5e8627923c951333c70004850b53ed4cab06
Mohsin Kazmi [Wed, 26 Aug 2020 09:07:48 +0000 (11:07 +0200)]
tap: add virtio 1.1 API flag
Type: feature
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I3e00deb94943c545d1649865b2efdf7d51b90f4d
Artem Glazychev [Mon, 31 Aug 2020 08:42:40 +0000 (15:42 +0700)]
crypto-openssl: add chacha20-poly1305 to crypto-openssl
Type: feature
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: Iec28fb11b6edff1bee23117f56aa3a3e5729541a
Signed-off-by: Damjan Marion <damarion@cisco.com>
Mohsin Kazmi [Tue, 1 Sep 2020 16:18:48 +0000 (18:18 +0200)]
virtio: fix the bar starting index
Type: fix
Change-Id: Ia28161b583ea26ab820a494332a79b64add7004d
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Mohsin Kazmi [Tue, 1 Sep 2020 15:45:56 +0000 (17:45 +0200)]
virtio: fix the NULL deference
Type: fix
Change-Id: I8d55c2bfdd3c4607044370ebabf40cbac78b4996
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Mohsin Kazmi [Tue, 1 Sep 2020 15:12:50 +0000 (17:12 +0200)]
virtio: fix the error return
Type: fix
Change-Id: I12b08333f3f69aaa882e8801f4f69bca2d7bd558
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Aloys Augustin [Tue, 1 Sep 2020 13:59:46 +0000 (15:59 +0200)]
misc: fix uninitialized use warnings with gcc-{8,9}
Change-Id: I4930c3c2a8025ec9ceb17e994137be67d88d455f
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Ole Troan [Mon, 31 Aug 2020 11:54:47 +0000 (13:54 +0200)]
vppapigen: supports backwards compatible marking of enums
enum bar_enum {
BAR1 = 0,
BAR2,
BAR3 [backwards_compatible],
BAR4 = 9 [backwards_compatible],
};
This allows adding backwards compatible (as guaranteed by the developer) enums.
The enums marked backwards compatible are not considered in the CRC calculation.
Type: improvement
Change-Id: I6fc0c21b19e1a02cff7f5d279a0f3a32d2f8b630
Signed-off-by: Ole Troan <ot@cisco.com>
Artem Glazychev [Mon, 31 Aug 2020 08:37:39 +0000 (15:37 +0700)]
crypto: add chacha20-poly1305 algo
Type: feature
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: I3697cf7fab7abb7c3d2f61ef326c9116bc1eed66
Benoît Ganne [Mon, 31 Aug 2020 16:59:34 +0000 (18:59 +0200)]
ip: fix ip zero checksum verification
In one's complement, there are two representations of zero: the all
zero and the all one bit values, often referred to as +0 and -0. See
RFC 1624 section 3 for more details.
This used to be taken care of in ip4_header_checksum(), but it is no
longer the case. The check ip->checksum == ip4_header_checksum (ip) is
no longer correct in the -0 case.
Always use ip4_header_checksum_is_valid() instead (which behaves
correctly since
9a79a1ab931c3b5a7ae07d6f0fcfef7c4368a2c4).
Type: fix
Fixes:
e5f0050c7a5d411f96af6401797529d58825e2af
Change-Id: Iacc6b60645a834287b085aecb9e3fdb4554cf0cf
Signed-off-by: Benoît Ganne <bganne@cisco.com>
jiangxiaoming [Fri, 28 Aug 2020 01:28:09 +0000 (09:28 +0800)]
dpdk: fix mac address length was wrong
Type: fix
Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Change-Id: I87c6f423ea8fdd9fb764693055eb1509f994d6f1