Commit Graph

10019 Commits

Author SHA1 Message Date
Chenmin Sun
9b8121cdc0 dpdk: dpdk i40e patch cherry-pick
This patch fixes flex payload flow creation failure issue

Type: fix

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I3ac0a168dadd033a668d7bd6f5e78798aedb61a5
2021-01-21 13:32:37 +00:00
Mohammed Hawari
b80b640a62 rdma: adapt to new vnet rxq framework
Change-Id: Id539d36635f0ab9625dc2fc73630be39bead09af
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: improvement
2021-01-21 13:31:40 +00:00
Benoît Ganne
aea54eb912 ip: do not return uninitialized IPv6 ll attributes
Type: fix

Change-Id: If35cf7da0c3d1b92532cc2e45c164d6b5a08592c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-01-21 13:31:15 +00:00
Mohammed Hawari
7559418657 memif: adapt to new rxq framework
Change-Id: Ifa8bccd8a34ec1b14e772ee53757e9083373e3de
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: feature
2021-01-21 13:25:05 +00:00
Benoît Ganne
426a306cc1 af_xdp: update interrupt mode to new infra
Type: improvement

Change-Id: Icb23af5f5e458a555f416cb0a829e84646b25dd9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-01-21 13:22:40 +00:00
Mohammed Hawari
692b52dca6 marvell: adapt pp2 to new rxq framework.
Change-Id: I8759a07a24692b8b418ef8eb2025b61a62d2dda1
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2021-01-21 13:22:27 +00:00
Damjan Marion
941005336e interface: rx queue infra rework, part one
Type: improvement
Change-Id: I4008cadfd5141f921afbdc09a3ebcd1dcf88eb29
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-01-21 13:20:10 +00:00
Ray Kinsella
1e4309538d perfmon: added cache hits and misses
Added basic support for counting cache hits and misses per node.

Type: improvement

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: Ic566611fd3d4246ccaa2117d8f74a569a6862e80
2021-01-21 13:17:47 +00:00
Matthew Smith
38b63a30ca dpdk: terminate device devargs string
Type: fix

When a device is whitelisted with devargs arguments specified, the
string that is generated and added to conf->eal_init_args is not
explicitly terminated with 0. If the formatted string takes up all
of the memory allocated to the vector which stores it and it is
used later as a string in a format() or printf() call, any nonzero
characters stored in memory at the address immediately following the
memory allocated for the vector will be erroneously appended to the
string.

Terminate the string with 0 to ensure that this does not happen.

Change-Id: I20a78d994daad93bf5aecab5c03d705022e882ec
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2021-01-21 13:16:58 +00:00
Dave Wallace
cfa8a89338 build: deprecate debian-9 support
Type: make

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: Ib14ce5561446aefb03c3989cf82ac7c6eb1471bb
2021-01-21 13:16:09 +00:00
Nathan Moos
f15a5791ba dpdk: add support for system libdpdk
Type: improvement

This patch enables dynamically linking the dpdk plugin against a
system-wide packaged version of dpdk.

Change-Id: I2276d125f39986b0e1788c7b52b94485cdbcd855
Signed-off-by: Nathan Moos <nmoos@cisco.com>
2021-01-21 13:11:14 +00:00
Nathan Moos
323418dd1c vppinfra: ensure _GNU_SOURCE is present
Type: fix

When building with musl, _GNU_SOURCE is required to be defined in more
places. This patch defines it in those required places. Additionally,
this patch changes the udphdr field names to the standard names.

Change-Id: I0fec54214ccc8458289176488afb4218761e9d51
Signed-off-by: Nathan Moos <nmoos@cisco.com>
2021-01-21 13:08:57 +00:00
Neale Ranns
1523c96deb ip: Use correct enum type in ip_address_set
Type: refactor

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ice2bc42838e6d5ba579f449c3f8b0feffebeb719
2021-01-21 11:00:14 +00:00
Ahmed Abdelsalam
f2984bbb01 ip: use IPv6 flowlabel in flow hash computation
extends ip6_compute_flow_hash() to include IPv6 flowlabel in flowhash computation

Type: improvement

Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Change-Id: Id1aaa20c9dac729c22b714eea1cdd6e9e4d1f75e
2021-01-21 10:59:46 +00:00
Neale Ranns
03fabbd222 ipsec: Honour IPSec SA table-ID over API
Type: fix

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ib08fe356e4dc710dd60a96736c48b27129f06786
2021-01-21 10:58:39 +00:00
Neale Ranns
45d6d83761 ipsec: Tunnelled packets are locally generated
Type: fix

this means we 1) don't decrement TTL and (for v6) can fragment.

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I0f718da7dcaba834ad495ae9242a9a58c9e7c184
2021-01-21 10:58:22 +00:00
Benoît Ganne
c15539af6f ip: set correct error in ip6-local
Type: fix

Change-Id: Ib23f823e46494f80d9d857ddde88f4939bf2b3d1
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-01-21 09:01:28 +00:00
Matthew Smith
f613a44020 vppinfra: add bihash with 32 byte key
Type: feature

Add header to define bihash_32_8.

Change-Id: Ia8a21a1e76cf0c05b8f8a2d1f5dbc0dc586d7801
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2021-01-21 08:43:18 +00:00
Nathan Moos
1550907d0a fib: fix includes for musl
Type: fix

When building with musl, the type `uint` is not available unless you
include <sys/types.h>.

Signed-off-by: Nathan Moos <nmoos@cisco.com>
Change-Id: I0003b0c373d9fd532b4135c43d78f36d6cd7afa4
2021-01-21 01:36:30 +00:00
Andrew Yourtchenko
4d084079cd tests: do not skip solo-run tests if running within a single job and all remaining tests are solo-run
There was a logic error, which results in not running solo tests
if TEST_JOBS=1, and we have finished running the regular test
and the remaining tests are all solo-run. They all get put into
that pile, but the new runners never start.

Solution: check the pile of solo-run jobs unconditionally.

Thanks to Klement Sekera for spotting the issue.

Type: fix
Change-Id: Iaecacbe4de44050cd8d0ff2d524559df99f2bae4
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-01-20 20:28:48 +00:00
Jerome Tollet
4f411d1191 build: add python files to ctags
Type: improvement

Signed-off-by: Jerome Tollet <jtollet@cisco.com>
Change-Id: Ifb97b3a52d8bf4ecc09dc1e8ff94992fef309a65
2021-01-20 18:38:56 +00:00
Nathan Moos
fce561226f acl: replace glibc internal __bswap_64 with clib
Type: fix

In order to build VPP as a package for an embedded Yocto-based
distribution, this patch replaces the use of the glibc internal
__bswap_64 function with the VPP function clib_net_to_host_u64, which is
provided by vppinfra.

Change-Id: I3ecc8525861dc3441bce2b51aa4c80f9a62d3051
Signed-off-by: Nathan Moos <nmoos@cisco.com>
2021-01-20 18:11:39 +00:00
Ed Warnicke
acaee3d36e memif: fix vpp to go link up immediately on admin up
Type: improvement

Previously, memif would check every 3 seconds to see if an interface
had gone admin up.  Now it does as soon as admin up occurs.

Signed-off-by: Ed Warnicke <hagbard@gmail.com>
Change-Id: I808699cd5980fa162c34ac977f43d00ed6b67115
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2021-01-20 17:59:11 +00:00
Ed Warnicke
a4b0541f64 vxlan: fix SEGV reported in VPP-1962
Type: fix

Replace vnet_register_interface with ethernet_register_interface

Fixes https://jira.fd.io/browse/VPP-1962

Signed-off-by: Ed Warnicke <hagbard@gmail.com>
Change-Id: I5f578fc416605429fe1e2b510ad49eb754451d40
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2021-01-20 17:53:01 +00:00
Nathan Moos
67d7acd059 vppinfra: add option to use libexecinfo
Type: feature

The musl libc does not provide <execinfo.h> or an implementation of the
functions provided. This patch enables the use of libexecinfo as an
alternative, which can be used on systems with musl.

Change-Id: I76b5744ddf731b66e16144025a6fdedf72925260
Signed-off-by: Nathan Moos <nmoos@cisco.com>
2021-01-20 15:23:06 +00:00
Nathan Moos
cf5ba26700 svm: add standard include for __WORDSIZE
Type: fix

In glibc, the __WORDSIZE macro is defined in a header included
indirectly from svm_common.h. In musl, the __WORDSIZE macro is not
indirectly included, so this patch directly includes <sys/user.h> to
ensure the __WORDSIZE macro is available.

Change-Id: If1b1fc97161b7a0b2e82351d4776c81c36a323cb
Signed-off-by: Nathan Moos <nmoos@cisco.com>
2021-01-20 15:21:55 +00:00
Nathan Moos
bfa0398f7a vlib: fix build with musl
Type: fix

When building with musl, some transitive includes from glibc are not
present. This patch adds direct includes for the necessary types, and it
also defines _GNU_SOURCE to ensure that the socket types are complete.

Change-Id: Ic69c307b9515fec764c32906b5bc7f1fb34f2525
Signed-off-by: Nathan Moos <nmoos@cisco.com>
2021-01-20 15:19:36 +00:00
PiotrX Kleski
2e4813fe8f crypto: improve ipsecmb build time
Type: improvement

This change disables building of ipsecmb test and perf targets to
reduce the build time.
IpsecMB test and perf targets are not neeeded and not used by VPP.

Signed-off-by: PiotrX Kleski <piotrx.kleski@intel.com>
Reviewed-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: I7c3449f7f4ce9a2e70ca21a00fd510691dab87d0
2021-01-20 14:49:55 +00:00
Filip Tehlar
fab5e7f399 ikev2: use new counters data model & add more counters
Type: feature
Ticket: VPP-1916

Change-Id: Ibe612d21f748a532d88b73b286dc4a1dd15d7420
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2021-01-20 14:49:12 +00:00
Benoît Ganne
2699fe2ba8 ip: add IPv6 ping test for link-layer address
Type: improvement

Change-Id: I9f60e29462c7cb193a8594b7de06418b40573103
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-01-20 13:53:33 +00:00
Benoît Ganne
58a1915b50 ip: add API to retrieve IPv6 link-layer address
Type: feature

Change-Id: I5739869490155b0b9674b4faf61882d97e66a4ed
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-01-20 13:52:11 +00:00
PiotrX Kleski
b2525922cd crypto: fixed vnet_crypto_is_set_handler()
Type: fix

vnet_crypto_is_set_handler() was checking if op handler is set by
using alg instead of op id.
This fix changes the check to use op ids from crypto_main's alg_data
for provided alg.

Signed-off-by: PiotrX Kleski <piotrx.kleski@intel.com>
Change-Id: I5f0f00a889ddada44d9912af175ebad66677037a
2021-01-20 11:04:46 +00:00
Neale Ranns
2a81d9a4cc build: add the missing leading underscore to FORTIFY_SOURCE
Type: fix

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I36f2d08681f90a3f8ea7598952d1e14c53f0187b
2021-01-20 11:00:11 +00:00
Mohammed Hawari
df849f8ea8 rdma: fix pkg_config file
When building DPDK with rdma linkage, this patch avoids linking against
useless verb providers. It also hard-codes the library directory to lib
to fix CentOS behavior.

Change-Id: I3acd94adf1b7e59e023346b3c254bd4bba6157df
Type: fix
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2021-01-20 09:23:03 +00:00
Neale Ranns
1441a6c541 classify: Layout classify entry to group data-plane accessed fields on
one cache line

Type: refactor

Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Change-Id: I54128ba62f8dcc87c1845b33ed3637112d42a891
2021-01-20 09:22:43 +00:00
Steven Luong
7f1d780f0b classify: crash on classify filter pcap del command
If classify pcap filter was never configured, typing the delete
command causes a crash. The reason is
cm->classify_table_index_by_sw_if_index not yet allocated.

The fix is to add a check before we access the vector.

Type: fix
Fixes: gerrit 28475

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ia33bd91fa82d8ffc4490d4069155980a6e233268
2021-01-19 23:14:42 -08:00
Mohammed Hawari
533ac64330 avf: fix l2_len for csum offload
Use vlib_buffer_t::current_data instead of
vnet_buffer_opaque_t::l2_hdr_offset to compute l2_len for checksum
offload (l2_hdr_offset might be invalid if packet originates from an L3
interface)

Change-Id: I2031ea6fd6a7af4b6e186751e119ebd6161641b5
Type: fix
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2021-01-19 15:17:26 +00:00
Nathan Moos
2c91922ebc build: make rpath optional
Type: feature

This patch begins enabling support for building VPP as a package for a
Yocto-based embedded Linux distribution. Yocto QA complains about
executables and libraries with an rpath configured, as the paths may not
be valid on the target system. Therefore, this patch adds a new CMake
option named `VPP_SET_RPATH`, which is enabled by default but can be
disabled by a Yocto-based build.

Change-Id: I90e9c4ba07138032b0f76cb72a98e58470885d55
Signed-off-by: Nathan Moos <nmoos@cisco.com>
2021-01-18 10:52:34 +00:00
Klement Sekera
4881cb4c6f nat: deal with flows instead of sessions
This change introduces flow concept to endpoint-dependent NAT. Instead
of having a session and a plethora of special cases in code for e.g.
hairpinning, twice-nat and others, figure all this out and store it in
flow logic. Every flow has a match and a rewrite part. This unifies all
the NAT packet processing cases into one - match a flow and rewrite the
packet based on that flow. It also provides a cure for hairpinning
dilemma where one part of the flow is on one worker and another on
a different one. These cases are also sped up by not requiring
destination adress lookup every single time to be able to rewrite source
nat as this is now part of flow rewrite logic.

Type: improvement
Change-Id: Ib60c992e16792ea4d4129bc10202ebb99a73b5be
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-01-18 08:36:26 +00:00
Neale Ranns
4a58e49cfe ipsec: Support MPLS over IPSec[46] interface
Type: feature

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I89dc3815eabfee135cd5b3c910dea5e2e2ef1333
2021-01-18 08:35:52 +00:00
Simon Zhang
20399f8f3a tls: make picotls engine able to initial connection as client
Type: fix

Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Change-Id: Idd14dc11e92e0851c64f83e280b52f12e32ae48d
2021-01-18 02:07:37 +00:00
Ivan Shvedunov
4beb1c6643 tcp: remove bad assert
Don't assume that half-open connections pending removal are always
successful.

Type: fix
Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Change-Id: I955077a4ed2389b9ee38d97e27a7c7761c860a4a
2021-01-16 03:46:36 +03:00
Dave Wallace
35ef865678 build: add missing openssl-devel package for centos-8 vpp-ext-deps
- In a new centos-8 installation, vpp-ext-deps fails on missing
  ssl.h header file after 'make install-deps'.

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I521d817dd1f1e21aff427d98b9832ea7c7b89339
2021-01-15 17:31:47 +00:00
Neale Ranns
8c0474a77e misc: checkstyle ignore .patch files in trailing whitespace check
Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I9226e94e59a35648ad2945ebfdf928dc80ad635c
2021-01-15 15:24:38 +00:00
Miklos Tirpak
e700df8eb4 vlib: fix counter_will_expand prediction
vlib_validate_combined_counter_will_expand() was calling
_vec_resize_will_expand() with wrong arguments, which resulted in false
return value. Apart from the initial call, it never indicated a vector
resize.

The callers relying on this function did not perform a barrier sync
because of the wrong prediction even if the vector got extended by
a subsequent vlib_validate_combined_counter() call.

The fix introduces a new, simplified macro that is easier to call.
vec_resize_will_expand() accepts the same arguments as vec_resize().

Type: fix
Signed-off-by: Miklos Tirpak <miklos.tirpak@gmail.com>
Change-Id: Ib2c2c8afd3e665e0e3d6ae62ff5cfa287acf670f
2021-01-15 09:46:23 +00:00
Dave Wallace
d7b9af4add bash: move jjb sandbox bash functions to ci-management repo
Type: refactor

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I9b4ce818036509c0afcb204664efcc49625179ef
2021-01-14 15:03:07 -05:00
Neale Ranns
dfd3954c04 docs: Update FIB documentation
Type: docs

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I3dfde4520a48c945ca9707accabbe1735c1a8799
2021-01-14 19:55:55 +00:00
Neale Ranns
1b5ca985dc vxlan: Protect against tunnel config where source is not local
Type: fix

If a tunnel's source is not local then post encap VPP will attempt to
receive (via ip4-local) that packet, things go wrong from there.
The fix is when stacking the encap forwarding don't accept a receive
DPO. This approach is taken, rather than rejecting bad tunnels, because
the 'local-ness' of the tunnel's source can change and we can't reject
tunnels that were once correctly configured but are no longer.
the user will quickly discover their mistake as traffic won't pass.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I46198422e321606e8baba003112e978a526b4c2f
2021-01-14 11:43:41 +00:00
Filip Tehlar
887f1aa725 ikev2: remove assert condition
Remove assert condition ensuring that a packet was punted with reason
spi=0. We can't rely on data in punt_reason because it is defind in an
union. This patch adds a new IKE node that handles punted IKE packets
separately.

Type: fix

Change-Id: I2e1b44922e53e049bd8512fa5cb85cee6a2b8aa7
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2021-01-13 16:31:49 +00:00
Ray Kinsella
bf93c6e9bf crypto-openssl: chacha support in openssl version
Fix build errors related to chachapoly when the
system openssl version is < 0x10100000.

Type: fix

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I62283fcc44c952ddd4d6a9f621c18e8be1af8af1
2021-01-12 13:10:21 +00:00