Commit Graph

9363 Commits

Author SHA1 Message Date
35ccd26a5d build: multiple yaml file support
Change the yaml file matching pattern from FEATURE.yaml to
FEATURE*.yaml, so we can document multiple features in one directory.

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ic62f9fb4c73330c698724244cd8b362364fce5f9
2020-06-17 08:06:35 -04:00
212bcfefcc nat: add more trex test scripts
Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ia824d663c86d6a7c9bafe0206e9a93f93884739d
2020-06-17 09:56:12 +00:00
5857daf432 build: cmake cross-compilation fixes
Type: fix
Change-Id: I40337c208375b74b4dc3c35102c5e66a6e4568e8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-06-17 00:46:35 +00:00
ae45d47899 ip-neighbor: fix MLD hash key using stack pointer
Use pointed value (ipv6 address) as hash key instead of pointer value
(pointer to ipv6 address on the stack).

Type: fix

Change-Id: I74a8b6d4bb552b5b344bcb50c8e830700c4ce739
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-06-17 00:44:54 +00:00
1af730d0df misc: fix sonarclound warnings
Type: fix
Ticket: VPP-1888
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I9c2fb926a5e010658088a74051c8c3462ff61734
2020-06-16 17:32:17 +00:00
cea46522e7 vlib: address sanitizer support for stack switch, enable clang
Type: improvement
Change-Id: I81df4b61d1f0b8c1df77c1ee9bebcb491e155b69
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-06-16 16:05:01 +00:00
173484fe3a build: fix address sanitizer default args
Type: fix
Fixes: ec3a3f16e4

Change-Id: Iea3acd93a96b4bfc9f335e37ec04c00e8fa5ff27
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-06-16 15:30:38 +00:00
4330c46abb interface: add minimal vpp pkt trace for error-drop
Provide a minimal trace [ip4/ip6 src/dst address] for dropped pkts
when the user specifies "trace add error-drop XXXX", but does not
trace pkts from the original input node.

This is a wireshark dissector problem. Packets thrown at error-drop
may be well-formed, or not. VPP must not crash, no matter what.

The minimal trace capture and decode could be enhanced. Anyone
interested in doing that must consider all of the corner-cases
involved. This version should be at least somewhat useful.

Note that "pcap trace drop ..." - and the packet generator - seem like
the right tools to use when researching more complex issues.

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I961ca133980ffa2a1e5707879a443b21442ed894
2020-06-16 11:50:17 +00:00
cf9bb22a94 nat: improve outside port selection & perf
Prefer using source port form packet as outside port if possible.

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I5c25f6a42386f38c9a6cc95bd7dda9f090b49817
2020-06-16 09:05:15 +00:00
9ebbb5c416 gtpu: support separate rx-decap and encap-tx teid values
Support separate local and remote TEIDs, with local (or RX) one used
for GTPU tunnel RX/decap and remote (or TX) one used encap/TX.
Updated current gtpu API to support seperate RX/TX TEIDs and added new
gtpu_tunnel_update_tteid API to allow changing TX-TEID of an existing
GTPU tunnel.  The current tunnel field "teid" is used for RX-TEID and
a new field "tteid" is used for TX-TEID.

Type: improvement

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I549d79750a34bb965036da298c0ca894d15c2c20
2020-06-16 07:25:30 +00:00
a0e8d9669e virtio: add vhost sw_if_index filter for sw_interface_vhost_user_dump
The filter sw_if_index was in the API sw_interface_vhost_user_dump. But
it was never implemented in the backend. This patch is to add the backend,
vat, and custom dump support for the filter.

Type: feature

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Iaa41a7e11bfbcbb4c60092375e4b0dcf0950077b
2020-06-16 01:37:56 +00:00
0cf528233a gso: fix the udp checksum in test
Type: fix

Change-Id: I7005e4763e73f3679c40f94bdab26d439cd23188
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-06-16 01:35:05 +00:00
ff13e46215 api: check id is valid for bounce checking
If the id is invalid we cannot check whether we must free the message or
not, free it anyway.

Type: fix

Change-Id: Ie4426f601390d1e5e14c739f670e8c1e6e3aaf1e
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-06-15 19:04:25 +00:00
810ad343de build: remove un-needed script
The move to cmake obviates the need for this build script (and its terminology).

Type: make

Signed-off-by: Simon Chatterjee <code@chatts.net>
Change-Id: Ie17429bfdf5a4b02ce2b70ba3568a7445c162d38
2020-06-15 18:46:38 +00:00
66ec467cda vcl: move helper functions out of header file
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3889fd80b145cf80f76f6054d63247e76bdf20ff
2020-06-15 17:36:36 +00:00
81355d74a4 build: fix the build on centos8
Add missing dependencies and correct the building to support CentOS8

Type: make

Change-Id: Ie15b9b1174fa9b6d5ae02bace36ebc77e17d770c
Signed-off-by: Yichen Wang <yicwang@cisco.com>
2020-06-15 16:12:48 +00:00
47ea4c35fe vxlan: remove judgement with always true
if ((A | B) == false)  it means both A and B are false, so for
the following code

if (PREDICT_FALSE (!good_udp1))
      {
        if ((flags1 & VNET_BUFFER_F_L4_CHECKSUM_COMPUTED) == 0)
          {
              ...
          }
      }
if ((flags1 & VNET_BUFFER_F_L4_CHECKSUM_COMPUTED) == 0) is always
true if the code run it. Remove it.

Type: improvement

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Change-Id: I6bd1e9340c7a00089fc1c9ae49773add832d309e
2020-06-15 16:09:58 +00:00
c16fe46890 buffers: fix non-default sized buffers initialization
Type: fix

Change-Id: I4a93e1d9936414c514cb237a22624986b3ef5b3d
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-06-15 14:52:04 +00:00
b43677fe2d dpdk: cryptodev: fix non-null terminated strings
Type: fix

Change-Id: Ib6f423e24f1a8d8439cd7e8893e4605e10984d48
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-06-15 14:51:09 +00:00
fbd47cf835 ikev2: announce both 'ESN' and 'No ESN'
Type: fix

Change-Id: If73b88b9478b9314df6d9163c3a13724d4253c80
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-06-15 07:01:31 +00:00
1eae8ecb7a vlib: node recyling and node deletion missing triggering graph node sync
When recycling a graph node vnet_register_interface, it is missing an
explicit call to vlib_worker_thread_node_runtime_update(). However,
there is an implicit call to vlib_worker_thread_node_runtime_update()
via vnet_sw_interface_set_flags_helper() if it enables a new feature on
the interface for the first time. But that implicit call is not
guaranteed. For example, if an interface is created, deleted, and
created, then it may skip the implicit call to
vlib_worker_thread_node_runtime_update(). When that happens, the graph
nodes on thread 0 are not sync'ed to the worker threads. So the worker
thread's graph nodes are out of sync momentarily with the main thread's
graph nodes until some other event happens which calls for a sync is
needed. During this window, the worker thread's graph node is
vulnerable and may experience a crash.

When deleting a graph node, we never trigger a sync to the worker
thread. A patch was committed 3 years ago via
https://gerrit.fd.io/r/c/vpp/+/7523 to fix a show run crash. In
hindsight, the approach taken by 7523 is not orthogonal. While at it,
let's fix it right for both issues with a call to
vlib_worker_thread_node_runtime_update() in the appropriate place and
remove 7523.

Type: fix
Ticket: VPPSUPP-86
Fixes: gerrit 7523 / 19e9d954bd

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ic9472bd2d3a212dbfeceb526506ed0400983a142
2020-06-12 19:07:01 +00:00
38b09681a0 virtio: interface type based improvements
Type: improvement

Change-Id: I220ea6ab609e3c1628f5210be441d0d5e825a32c
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-06-12 15:43:32 +00:00
01a2a10715 ip: allocate ip4 mtrie pages in htlb memory
No change in default behavior. To use htlb pages for the ip4 mtrie,
use the "ip" command-line option "mtrie-hugetlb".

Type: improvement

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I5497e426a47200edff2c7e15563ed6a42af12e7f
2020-06-12 12:06:29 +00:00
4cb21c8e5d ikev2: don't add DH group in ESP transform proposals
Type: fix

Anouncing DH group in esp transform proposals will enable PFS which is
not suppored now. This fixes issue during rekey when using strongswan as
responder.

Change-Id: Ib9f586113ae0ab9dc67e6ceadff43f8aac463820
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-06-11 16:50:55 +00:00
cd35ed48d4 nat: properly scale out2in-ed hash on init
Type: fix
Fixes: a1018c166a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I86592f73a60fd146d3764e474f975881e940c244
2020-06-11 10:37:11 +00:00
a1018c166a nat: simplify bihash buckets/mem config
Derive reasonable values from max translations/max users.

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I41a96ab63ab138b4160cd60bd6df24fc73791c86
2020-06-11 08:02:16 +00:00
35418ba491 vapi: memset allocated messages to zero
This avoids using dirty data from shared memory by client.

Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I96eecf655bf344ec29609cedbd8dc891b572e207
2020-06-10 11:11:07 +00:00
ce53363d20 ip: reassembly: LRU algorithm should eliminate the longest unused nodes
Type: fix

Signed-off-by: zhengdelun <xszhengdelun@gmail.com>
Change-Id: I3f6240b4c0798f85960acc55a193a0cbf0c67ea4
2020-06-10 11:09:59 +00:00
d6ba3ca251 nat: optimize prefetching
Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Iea1748e8e39d213fcb3f3b52379bd37a6dd6aa3d
2020-06-10 09:48:47 +00:00
b660a0e5b2 tap: enable gso/csum offload for tun
Type: improvement

Change-Id: I5b9d5ea192776f14a45bf909acc4bef7793521e8
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-06-09 15:18:12 +02:00
dbd5fb3db5 vxlan: fix the inner packet checksum calculation
Type: fix

Change-Id: I1da4ace9f3e548af4b5b3373d695e4214c5df2ff
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-06-09 15:18:03 +02:00
21a1de42b0 misc: add code styling for vxlan encap and vxlan_packet files
Type: style

Change-Id: Id363ccd0e51c61388fb45ef10685929f629cccbd
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-06-09 15:17:58 +02:00
8ddd19bf7b tcp: improve rtt estimation with rate sampling
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I25043da84b2f2b3f37024ecfedac535df3004ea5
2020-06-08 18:44:34 +00:00
0a67b48f1d vlib: stop inlining vlib_add_trace(...)
Packet tracing performance doesn't justify inlining
vlib_add_trace(...) over 500 times.

It makes a 15% text-segment size difference in a representative use-case:

Inline:
$ size .../vnet_skx.dir/ipsec/ipsec_input.c.o
   text    data     bss     dec     hex filename
   6831      80       0    6911    1aff .../vnet_skx.dir/ipsec/ipsec_input.c.o

Not inline:
$ size .../vnet_skx.dir/ipsec/ipsec_input.c.o
   text    data     bss     dec     hex filename
   5776      80       0    5856    16e0 .../vnet_skx.dir/ipsec/ipsec_input.c.o

Retain the original code as vlib_add_trace_inline, instantiate once as
vlib_add_trace.

Type: refactor
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Iaf431dbf00c4aad03663d86f9dd1322e84d03962
2020-06-08 16:03:36 +00:00
6a3195f166 vlib: Coverity fix
Fix a nit warning: we're not likely to create a vlib process with more
than 4gb of stack.

Type: fix
Ticket: VPP-1888

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I8bc7f64287c2802b0c286ce3d04443ac723a9a33
2020-06-08 15:54:56 +00:00
698eb87a8e vxlan: Fixed checksum caclculation offset
VXLAN uses csum_offload for IPv6 packets.

But without gso node we have csum calculated only for inner
packet.
This patch adds support for outer header csum calculation.
Checksum for inner packet should be calculated before
interface-output node (for example in vxlan node).

Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: Ica68429ede4426293769207cd83c791ebe72fe56
2020-06-08 14:17:59 +00:00
e362151804 nat: more long read after short write optimization
Replace whitespread (mis)use of snat_session_key_t by proper function
arguments where applicable and inline functions to calculate hash keys
instead of using structs for that. Make all hash tables use same network
byte order port so that there is no longer a discrepancy between static
mappings using host byte order while in2out/out2in tables using network
byte order.

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I80786d2f947c67824c101a13bb608f1fe1080f34
2020-06-08 13:46:35 +00:00
c1f0d9c105 mactime: print error if feature not enabled
Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I8fbc4baefecf512573126c5085ed7a6e2e360fbe
2020-06-07 09:18:57 -04:00
26d890eb4b fib: fix multiple dpo pool expand cases
Add dpo_pool_barrier_sync/release, use them to clean up
thread-unsafe pool expansion cases.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I09299124a25f8d541e3bb4b75375568990e9b911
2020-06-07 09:11:48 +00:00
c2d2228e92 fib: fix adj pool expand cases
adj_alloc (...) is not thread safe when the adj pool or combined
counter vectors expand.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I55710de6ecc083b7434e11798659cca9250c9131
2020-06-05 07:07:42 -04:00
a5cf6e077d build: add libssl-dev library for ubuntu 20.04
Add the libssl-dev library for ubuntu 20.04 in Makefile.

Type: fix

Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
Change-Id: I4187cb041997e7457734ffdb18bdbec98a051669
2020-06-04 15:35:44 +00:00
8341f76fd1 fib: add barrier sync, pool/vector expand cases
load_balance_alloc_i(...) is not thread safe when the
load_balance_pool or combined counter vectors expand.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I7f295ed77350d1df0434d5ff461eedafe79131de
2020-06-04 14:42:26 +00:00
c39c79c5aa nat: fix coverity warning
Type: fix

Change-Id: I0e87021b11009a955f5839bdb68af897145816c1
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2020-06-04 14:01:06 +00:00
0b3648fd1f ikev2: session cleanup after profile is deleted
Type: fix

Change-Id: I3198461f3dfc13cd3cedf2b8611dc80bb6f959c8
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-06-04 12:10:43 +00:00
dfb19cabe2 dpdk: cleanup, add rx queue struct
Type: improvement
Change-Id: I3defde103ab245404de42d2be7abcb2c43d49a60
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-06-04 12:08:09 +00:00
4496243cc9 nat: fixed input validation
Ticket: VPP-1887
Type: fix

Change-Id: I341ac7b455926a106d736f4de6771aae655db82e
Signed-off-by: Filip Varga <fivarga@cisco.com>
2020-06-04 10:10:51 +00:00
17a8ab6857 nat: add tracing for nat44-hairpinning
Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ife437f959e29d3de88bd7ee77221ada86fb03e80
2020-06-04 08:37:28 +00:00
ce412fd7d6 docs: improve handoff queue writeup
Type: docs
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I4d63a0fbbdb3cc00eac9116f122e5b831d059e33
2020-06-03 20:17:45 +00:00
1033b4997e vlib: improve node interrupt handling
- add ability to pass data together with interrupt
 - avoid locking for local interrupts (same thread)

Type: improvement

Change-Id: I73a2ab2e716bb887a1f02c87788ae83e329f9b40
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-06-03 13:21:57 +00:00
ec62d0a436 nat: refactor mss_clamping to not depend on snat_main_t
Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I1110e425859a4f1f07952c91b50f263cb7323836
2020-06-03 11:48:50 +02:00