9390 Commits

Author SHA1 Message Date
Florin Coras
8ccea00339 session: fix non-blocking msg enqueue to vpp mq
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7228a01d38e61cc00358419b2512ca0da4f76ff5
2020-09-02 14:28:19 +00:00
Yulong Pei
2e84d66554 ipsec: add ipsec set async mode api
Type: improvement

Signed-off-by: Yulong Pei <yulong.pei@intel.com>
Change-Id: I841f4407ed8c1a448e5102059fc79ae1f7d461de
2020-09-02 13:09:10 +00:00
Benoît Ganne
7d4a997ea1 misc: fix pcap [rx|tx|drop] filename stem overflow
Type: fix

Change-Id: I2b6b7b6f28cbf7accf883743e390b0031dd13bbb
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-09-02 13:02:02 +00:00
Mohsin Kazmi
a1a2246eab tap: add the static assert for api flags
Type: improvement

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ia1276d00dded36ee28b4b2e93b4cc7c1df6b1eef
2020-09-02 12:00:31 +00:00
Mohsin Kazmi
518251bc8a virtio: add virtio 1.1 api flags
Type: feature

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I95d7fc1cc8db5199570c66535f45e867a7cae676
2020-09-02 11:50:00 +00:00
jiangxiaoming
9f1dbd20b3 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
2020-09-02 10:02:50 +00:00
Mohsin Kazmi
50bd165599 tap: add virtio 1.1 API flag
Type: feature

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I3e00deb94943c545d1649865b2efdf7d51b90f4d
2020-09-02 08:48:58 +00:00
Artem Glazychev
1b6ed022e7 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>
2020-09-01 19:12:22 +00:00
Mohsin Kazmi
0a507d7cd5 virtio: fix the bar starting index
Type: fix

Change-Id: Ia28161b583ea26ab820a494332a79b64add7004d
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-09-01 18:18:48 +02:00
Mohsin Kazmi
c79d735362 virtio: fix the NULL deference
Type: fix

Change-Id: I8d55c2bfdd3c4607044370ebabf40cbac78b4996
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-09-01 17:47:36 +02:00
Mohsin Kazmi
c96e64b617 virtio: fix the error return
Type: fix

Change-Id: I12b08333f3f69aaa882e8801f4f69bca2d7bd558
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-09-01 17:47:29 +02:00
Aloys Augustin
b6e211ad3b misc: fix uninitialized use warnings with gcc-{8,9}
Change-Id: I4930c3c2a8025ec9ceb17e994137be67d88d455f
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2020-09-01 15:22:32 +00:00
Ole Troan
6006ca8571 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>
2020-09-01 15:10:09 +00:00
Artem Glazychev
61f49aa38e crypto: add chacha20-poly1305 algo
Type: feature

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: I3697cf7fab7abb7c3d2f61ef326c9116bc1eed66
2020-09-01 14:07:39 +02:00
Benoît Ganne
6e334e3e77 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>
2020-09-01 12:03:27 +00:00
jiangxiaoming
1d104c5ecd dpdk: fix mac address length was wrong
Type: fix

Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Change-Id: I87c6f423ea8fdd9fb764693055eb1509f994d6f1
2020-09-01 12:01:56 +00:00
Benoît Ganne
faec38f3e1 fib: detect wrong adj neighbour bugs
Type: improvement

Change-Id: Ie063ee0a0c59a9ad632200ce2b23703bc0d936e6
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-09-01 11:43:13 +00:00
Benoît Ganne
4069f41c6e mpls: fix adjacencies walk in case of restack
Adjacencies are only defined for IPv4 and IPv6.

Type: fix
Fixes: 20aec3db441074ee5a861a40d6e02fad2f3dcb37

Change-Id: I19b2b7f6958da49f41c6eabc9f248840769acbbb
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-09-01 11:42:37 +00:00
Nathan Skrzypczak
7be474635d vppinfra: Fix bihash coverity warning
Type: fix

Hitting a code not reachable when setting
BIHASH_KVP_AT_BUCKET_LEVEL = 1

Change-Id: I24d539df67ae7650a3b1969f5709a6f7366d786b
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2020-09-01 11:19:34 +00:00
Nathan Skrzypczak
369e4e56e2 cnat: Fix typo in ts handling
Type: fix

Change-Id: I5287f6326726780c09e515eede0992bafb413bb2
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2020-09-01 11:18:23 +00:00
Damjan Marion
9a79a1ab93 ip: improve ip4_header_checksum_is_valid
It is cheaper to include checksum field in calculation and simply
compare result with zero.

Type: improvement

Change-Id: I6f77632c0a4d2f2c632d044d3a5d2fcf2b5bac62
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-01 06:56:26 +00:00
Klement Sekera
edc816355a nat: fix type in api message
Translation memory size is internally a uword, but in api it was u32,
resulting in the returned value being 0 all the time.

Fix the "incorrect" API reply to return a u32 capped to 0xffffffff if
the u64 is larger than that, introduce the message with
the correct type, deprecate the message with the incorrect type.

Also, while we are updating the message definition,
add the max translations / max users per worker thread
into the new message.

Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I92e38a6a2bcb70fc8d1b129bbe416bf7f9e54280
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-08-31 21:52:42 +00:00
Vladimir Isaev
b59095f830 vlib: extend telnet protocol guard
There is a number of TERMs with big length, such as
'screen.konsole-256color' (23). These TERMs can not
be processed properly by vpp because maximum telnet
byte stream supported is 24 and we need 6 more service
bytes to send TTYPE.

So I extended maximum depth guard to 32.

Type: fix
Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: I9ca506996a97e9567d06483c5f020d6cc394329c
2020-08-31 20:43:34 +00:00
Damjan Marion
90d05bc7fb vppinfra: convert A_extend_to_B to B_from_A format of vector inlines
Make it shorter and same format when converting to biggor or smaller
types.

Type: refactor

Change-Id: I443d67e18ae65d779b4d9a0dce5406f7d9f0e4ac
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-08-31 18:46:21 +00:00
Ray Kinsella
f9c8fe4128 vpp_config: update node variants to skx and icl
Node variant names have changed to skx and icl.

Type: fix

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I5be832aa59e4e440df53869077d801c011e3defa
2020-08-31 18:17:20 +00:00
Jieqiang Wang
c8833b2191 ip: fix compiling error with gcc-10
Building VPP using gcc-10 fails because of the array bounds check
error for function ip4_header_checksum(), with option field in IPv4
header exceeding the ip4_header_t bound. Fix this error by turning
off the array bounds check option for function ip4_header_checksum().

Change-Id: I68cc241ae9e403d35ac2e320549506dc6565a0b6
Type: fix
Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
2020-08-31 18:15:51 +00:00
Benoît Ganne
4a76d6f6da af_xdp: AF_XDP input plugin
Type: feature

Change-Id: I85aa4ad6b68c1aa0e51938002dc691a4b11c545c
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-08-31 17:16:56 +00:00
Mohammed Hawari
bfed7c047d rdma: bugfix in the descriptor refill logic. In case of a partial allocation, the remainder modulo 8 must be returned to the pool so that the number of kept buffers is a multiple of 8.
Type: fix
Change-Id: Ifd97b03ea220300e7e6fe81a8ff4a25060fea6c1
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2020-08-31 17:16:38 +00:00
jiangxiaoming
dfb30d9d30 session: format app_ns_name with %v rather than %s
Type: fix

Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Change-Id: Ie29dec803aa4ee02755190b09573c23f9b5f0ada
2020-08-31 16:35:49 +00:00
Chenmin Sun
34bfa50b61 flow: code refactor
This is the code refactor for vnet/flow infra and the dpdk_plugin flow
implementation. The main works of the refactor are:
1. Added two base flow type: VNET_FLOW_TYPE_IP4 and VNET_FLOW_TYPE_IP6
   as the base the flow type
2. All the other flows are derived from the base flow types
3. Removed some flow types that are not currently supported by
   the hardware, and VPP won't leverage them either:
   IP4_GTPU_IP4, IP4_GTPU_IP6, IP6_GTPC, IP6_GTPU,
   IP6_GTPU_IP4, IP6_GTPU_IP6
4. Re-implemented the vnet/flow cli as well as the dpdk_plugin
   implementation
5. refine cli prompt
6. refine display info in command "show flow entry"

Type: refactor

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: Ica5e61c5881adc73b28335fd83e36ec1cb420c96
2020-08-31 12:14:03 +00:00
Neale Ranns
29f3c7d2ec cnat: Destination based NAT
Type: feature

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I64a99a4fbc674212944247793fd5c1fb701408cb
2020-08-31 09:23:32 +00:00
Mohsin Kazmi
133c91c1c0 virtio: fix the coverity warning
Type: fix

Change-Id: I6c6d66ad8aa158be8d2b9d111de7d46473b9dc02
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-08-31 09:05:02 +00:00
Dave Barach
2b79341dca vppinfra: add clib_mem_destroy_mspace(void *ms)
Also clib_mem_destroy() to destroy the current mspace.

Handy when an application wants to make a memory allocation arena
disappear.

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I020db902fbe2473545506fecbc230c2b048992f8
2020-08-28 15:31:07 +00:00
Neale Ranns
e6df80de41 ipsec: Deprecate old interface API
Type: feature

Change-Id: Ib5d7b7e4735a5dec6c3ed74068206a86782588ca
Signed-off-by: Neale Ranns <nranns@cisco.com>
2020-08-27 15:55:28 +00:00
Florin Coras
bcdc50d900 session: limit max number of ct sessions per dispatch
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia67662a5b988b3b5351cea21d6d92fb3a86629b5
2020-08-27 10:35:48 +00:00
Nitin Saxena
e2f5236dc5 vppinfra: Multiarch support for OCTEONTX2 SoC
Type: feature

- Added multiarch support for Marvell OCTEONTX2
- Corrected Marvell THUNDERX2 spelling

Signed-off-by: Nitin Saxena <nsaxena@marvell.com>
Change-Id: I42d3654aeda89759a2db9d695592ee3227b26c2b
2020-08-27 09:57:02 +00:00
Vladimir Ratnikov
ed04407829 dpdk: fix blacklists
When we have both format blacklisted devices like:
blacklist 1234:5678
blacklist 1234:56:78.0

unformat with fmt=%x:%x matches for both strings
 and the rest 78.0 substring is kept in input
 and it can't be parsed for init args

This patch checks first if device format matches PCI address and
 just then if it matches Vendor and Product

Type: fix
Change-Id: If111762c0e0a424b052e4f6dc0f67731bf89dc2a
Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
2020-08-27 08:25:56 +00:00
Andrew Yourtchenko
a3b7c554c6 tests: "force solo" testcase support
Some of the tests are time-sensitive, and at present require a non-trivial
modification in order to run at high concurrency.

Without these modifications, they intermittently fail, and require
the test retries.

Rather than setting them to the extended tests and forgetting
about them, put them into a "solo" set, which gets run in a
single-threaded mode after the rest of the tests are done.

Mark a few of the tests that showed errors during TEST_JOBS=48
as forced-solo.

Also, give a better diagnostic if the testcase misses a docstring
needed to represent it in the diagnostic outputs.

Type: fix

Change-Id: I33fe62eb17edc1885bd2c3523892051d52da6546
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-08-27 08:03:38 +00:00
Dave Barach
d135487aff vppinfra: elog multi-track g2 test pattern
Type: test

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ia4504629cb5e87067a337d16f43e044399b87cac
2020-08-26 21:57:09 +00:00
Damjan Marion
3373a55f91 dpdk: bump to DPDK 20.08
Type: improvement

Change-Id: Id864c80ac0c9e6f3514a99e516fed82a998effff
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-08-26 11:42:33 +00:00
hanlin
f8e1363c4f vcl: fix duplicated key of session_index_to_vlsh_table in multiple
threads vcl workers scenario

Type: fix

In multiple threads vcl workers scenario, multiple vcl workes can create
sessions with same index. Because only one vls worker created, key of
session_index_to_vlsh_table is duplicated.

Signed-off-by: hanlin <hanlin_wang@163.com>
Change-Id: I7e1f5bc471adc5378194452aef85e611f5d0df1d
2020-08-26 01:04:50 +00:00
Benoît Ganne
cd631b5ba0 rdma: bump rdma-core version to v31.0
Type: improvement

Change-Id: If02deabea1fe47bbe82c53182e24a97cff68f8ec
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-08-25 20:34:51 +00:00
Florin Coras
a5ea8211b1 vcl: cleanup non-blocking connect
Make sure session is in non-closed state after non-blocking connect to
ensure cleanup is performed, if needed.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic1533b9864828f875c840dfdfeed08bf32d10651
2020-08-25 13:39:29 +00:00
Chenmin Sun
d0236f725d flow: add vnet/flow formal API
This patch adds the API for vnet/flow infra.
Currently this API supports the below flow types:
    VNET_FLOW_TYPE_IP4_N_TUPLE
    VNET_FLOW_TYPE_IP6_N_TUPLE
    VNET_FLOW_TYPE_IP4_N_TUPLE_TAGGED
    VNET_FLOW_TYPE_IP6_N_TUPLE_TAGGED
    VNET_FLOW_TYPE_IP4_L2TPV3OIP
    VNET_FLOW_TYPE_IP4_IPSEC_ESP
    VNET_FLOW_TYPE_IP4_IPSEC_AH
    VNET_FLOW_TYPE_IP4_GTPU

All the above flows are tested with Intel E810/X710 NIC

Type: feature

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: Icb8ae20cab9bdad6b120dddc3bd4fb1d85634f3f
2020-08-25 12:13:43 +00:00
Matthew Smith
4fa3aad33f ip-neighbor: skip probe for disabled interfaces
Type: fix

In ip6_neighbor_probe(), if the interface is not enabled for ip6,
return NULL and skip trying to build a packet.

If the interface is not enabled, its mcast adjacency will be set to
~0 and a seg fault will ensue.

Change-Id: I825c9f40a0d5b2a77f788ac8dbd618138706383d
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2020-08-25 07:45:40 +00:00
Ole Troan
bad679291a api: register endian handlers for reply messages
Endian handlers was not registered for reply messages.
Causing endian-neutral handlers to crash.

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Id14173300ee1ab2601e92d58c70d2fa260814b69
2020-08-25 07:35:49 +00:00
Steven Luong
3f54d96dac bonding: enhance binary api handling
- check input sw_if_index to make sure it is sane. Coverity actually
complains about it.
- return rv. Some of the APIs handlers were not passing back the rv.

Type: improvement

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I8378ea948af561ba2bd9b02fb10bf4f9df2a2cd2
2020-08-24 10:44:31 +00:00
Steven Luong
067ef751d3 vmxnet3: enhance debug CLI error handling
- Display the interface name upon successfully creating the interface.
- Don't go silent when error occurs. Be explicit about it.

Type: improvement

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ie4fdaf323f8b3833ad4a7af3872290141204aba8
2020-08-24 10:43:52 +00:00
jiangxiaoming
34a72c61ea hsa: set connected mode for udp server
Type: fix

Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Change-Id: I32a28a944fcee11657c4dd0ba34ad6d73de89263
2020-08-22 11:29:54 +00:00
Dave Barach
b08fe6617b vppinfra: add format_one_elog_event
To avoid ridiculous pointer gymnastics in golang

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ic5a641c18281970e2b9bc3013a54cfc3ae92e372
2020-08-21 14:21:55 +00:00