Commit Graph

6552 Commits

Author SHA1 Message Date
3a343d42d7 reassembly: prevent long chain attack
limit max # of fragments to 3 per packet by default
add API option to configure the limit at runtime

Change-Id: Ie4b9507bf5c6095b9a5925972b37fe0032f4f9e8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-05-20 12:13:11 +00:00
b388e1a506 bonding: clean up redundant code
1. remove unnecessary cast for void * pointer.
2. remove the unused input parameter.

Change-Id: Ic0324364fc0c772200d30fb18a0ba959ed4f7ea4
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2019-05-20 11:32:31 +00:00
a474894a4a consolidate all mutux opertion
replace all pthread_mutex_lock/unlock to be svm_queue_lock/unlock
So there all operation is based on defined mutux, and it can help us
to debug or replace mutux locking method

Change-Id: I9aeeb03bbbbf3d7a824c06a535e5d6a6b463b42c
Signed-off-by: Ping Yu <ping.yu@intel.com>
2019-05-20 09:28:10 +00:00
09267f705f api: export ip_types.api for out-of-tree plugins
Out-of-tree plugins can refer to IP types in their API. The .api and
associated headers must be exported.

Change-Id: I75004343b040defd9eebac6a8a95c2ecf3c8079a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-05-18 19:01:51 +00:00
35465dc0be emacs-lisp: add missing '\' in template
Fixes the generated setup_message_id_table(...)
implementation. Without a level of quoting in the emacs lisp skeleton,
the underscore macro used to generate calls to
vl_msg_api_add_msg_name_crc produces "fooCRC" instead of "foo_CRC".
That confuses the Python language binding.

Punctuation saves lives: "Let's eat Grandma" vs. "Let's eat, Grandma."
Or some such.

Change-Id: Ibecc20337092199d6757165ac96b70c830511bb3
Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-18 14:53:23 -04:00
8fdde3c22f Add a debug-CLI leak-checker
leak-check { <any-debug-cli-command-and-args> }

Hint: "set term history off" or you'll have to sort through a bunch of
bogus leaks related to the debug cli history mechanism.

Cleaned up a set of reported leaks in the "show interface" command. At
some point, we thought about making a per-thread vlib_mains vector,
but we never did that. Several interface-related CLI's maintained
local static cache vectors. Not a bad idea, but not useful as things
shook out. Removed the static vectors.

Change-Id: I756bf2721a0d91993ecfded34c79da406f30a548
Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-17 21:06:13 +00:00
ce5c2ce518 Trivial typo. punt_node.c
Change-Id: I1455cb507f6ecffbb053b0e3e2de833dd40fa5f5
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-17 21:04:24 +00:00
b7658201d9 Tests: Refactor. Remove copies of enums.
Use the enums provided from the api definitions instead.

Change-Id: I43b7591df920c984e439efc4b3ec3c4121c539d8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-17 21:03:29 +00:00
0d144c78d7 make test: Add QUIC serial transfer test
Change-Id: I7ed68dd199daa31269d45d67e0a4fa632e1a08d1
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-05-17 20:43:23 +00:00
9673e3e628 Tests: Raise exception if API cli_inband command fails.
* Configure tests to raise exception if cli_inband fails.
* Fix failing tests.
* Add filename detail to pcap.stat clib_error_return for debugging.

Note: this change identifies spurious issues with packet-generator such as:
  CliFailedCommandError: packet-generator capture: pcap file
  '/tmp/vpp-unittest-Test6RD-v09RPA/pg0_out.pcap' does not exist.

These issues resolve themselves on remaining test passes.

Change-Id: Iecbd09daee954d892306d11baff3864a43c5b603
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-17 20:42:10 +00:00
3bfeff7a98 docs: Fix Versions and Titles
Change-Id: I131e33a570bff8b22c767585d03e2eb281dd7184
Signed-off-by: jdenisco <jdenisco@cisco.com>
2019-05-17 20:31:10 +00:00
18874913fb Fix punctuation fails in 2x plugins
More to the point: fix the Python API binding for the plugins.

The http_static and ct6 plugin setup_message_id_table calls didn't
have "_"'s between message names and CRCs. I would have expected this
to originate in the emacs skeleton, but the skeleton is correct.

Punctuation saves lives: "Let's eat Grandma..." != "Let's eat,
Grandma..." More or less.

Change-Id: Icd87813308701d203cf6f147b2bb90d39d51ddeb
Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-17 14:49:00 -04:00
f5b1ed7dea Load vat plugins late in the init sequence
After the related data-plane plugins have initialized their message IDs.

Change-Id: I4202a9e46ef6cdb12a5186be0f2370e2f9ccbb78
Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-17 18:30:29 +00:00
1fbc3d4f5b 19.01.2 Release Notes
Change-Id: Ia68372d397504ede789e40e9f7e1b939d09bc81a
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-05-17 16:49:00 +00:00
0a715cd03f UDP-Local: fix unregistered ports
- if the port is unregistered then write ~0 into the sparse vec, this allows the DP to send packets to ICMP
- remove the v6 arcs from the v4 node and vice-versa (since they're never taken)
- i have tests for this in a pending change for the punt socket

Change-Id: Icbd97de2c2fc38490c16afc2e0b414d8436593c4
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-05-17 16:10:43 +00:00
5022c6ce34 Fix 'terminal history off' crasher
- 'set terminal history off' or '... limit 0' has an incorrect
  terminal condition and tries to vec_delete one-too-many times
  causing a crash.
- Changing >= to > fixes this.
- In any case, a single vec_delete is more efficient, so do that
  instead.

Change-Id: Ia0db63b6c5c7891d75b302e793b4e4985dd86ebb
Signed-off-by: Chris Luke <chrisy@flirble.org>
2019-05-17 10:28:34 -04:00
d8a34a57b1 dpdk-ipsec: fix encrypt/decrypt single queue
When the same worker thread processes packet for encrypt and decrypt,
ie. single worker with bi-directional traffic, given that the queue is
shared results in packets to be decrypted being dropped as the encrypt
always happens first for each main loop.

With this change, each crypto device queue is logically split into two
queues, each half the real size, avoiding the described problem.

Change-Id: Ifd3f15e316c92fbd6ca05802456b10a7f73f85da
Signed-off-by: Sergio Gonzalez Monroy <sgmonroy@gmail.com>
2019-05-17 12:43:49 +00:00
fe52dea08f gbp: Add unit tests for contracts
Change-Id: Ib6615739b1db44b7788f462196cd477b6e23d67e
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-05-17 09:47:25 +00:00
4271c97191 tests: refactor. Replace literal constant w/ named constant.
* change literal packet count vlaues from 65 to a named constant of 67.
  (This value was recommended to exercise single, dual, and quad loops)

Change-Id: Ieb1738dddacb8b6ea7fa25883032ac01a98399e1
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-16 20:32:41 -04:00
ba65ca496a Add transport_opts to connect_sock bapi
Needed by QUIC to distinguish Q/Ssessions

Change-Id: Idcc9e46f86f54a7d06ce6d870edec1766e95c82d
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-05-16 19:08:51 +00:00
8a6e1b190c docs: Update sphinx, requirements, support markdown tables
Change-Id: Ie7c546f5720b10fe5423397204e1ab5c22d7a2ba
Signed-off-by: jdenisco <jdenisco@cisco.com>
2019-05-16 17:42:13 +00:00
8fa01c17aa DOC ONLY: document VLIB_INIT_FUNCTION scheme
Change-Id: I15c4256621da6c8d47b1a7c41755ee6587996757
Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-16 16:59:19 +00:00
f8d50682cd init / exit function ordering
The vlib init function subsystem now supports a mix of procedural and
formally-specified ordering constraints. We should eliminate procedural
knowledge wherever possible.

The following schemes are *roughly* equivalent:

static clib_error_t *init_runs_first (vlib_main_t *vm)
{
   clib_error_t *error;

   ... do some stuff...

   if ((error = vlib_call_init_function (init_runs_next)))
     return error;
   ...
}
VLIB_INIT_FUNCTION (init_runs_first);

and

static clib_error_t *init_runs_first (vlib_main_t *vm)
{
   ... do some stuff...
}
VLIB_INIT_FUNCTION (init_runs_first) =
{
    .runs_before = VLIB_INITS("init_runs_next"),
};

The first form will [most likely] call "init_runs_next" on the
spot. The second form means that "init_runs_first" runs before
"init_runs_next," possibly much earlier in the sequence.

Please DO NOT construct sets of init functions where A before B
actually means A *right before* B. It's not necessary - simply combine
A and B - and it leads to hugely annoying debugging exercises when
trying to switch from ad-hoc procedural ordering constraints to formal
ordering constraints.

Change-Id: I5e4353503bf43b4acb11a45fb33c79a5ade8426c
Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-16 16:11:23 +00:00
c1f93067ed Add default value for API Nat flags
Change-Id: I4f1b83ae1c746b8f67f2d12a02081702b9553b44
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
2019-05-16 13:20:52 +00:00
cefb5ad3d4 Add QUIC human readable error logs
Change-Id: I01cf5074b5a8b0018de5c3f59c9266d350c22f37
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-05-15 16:14:05 +00:00
275a177f71 IPSEC: remove CLI check for unsupported IPv6-AH - it is supported
Change-Id: I72ec95d4a3009a55b0f1fa7e45f9c53f31ef5fc1
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-05-15 06:59:04 -07:00
f4592fb626 Fix stats documentation with default socket name
Change-Id: Ibcb726c229cc12705764f771c15110852b420c49
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2019-05-15 07:17:38 +00:00
19542299d3 vpp_papi: remove dependency on environment var. VPP_API_DIR.
Change-Id: I9e3af8674e8aae27079fd03f6286f165d777814f
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-15 06:56:53 +00:00
93248789fb Remove unused function nat44_ha_resync() and error IN_PROGRESS.
The unused function nat44_ha_resync() was the only function that
used the error message VNET_API_ERROR_IN_PROGRESS.  The error
was the only error code that was positive, and didn't really
play well with the other error codes.

Change-Id: I7d03c2ee915094b635f6efdca7427f71e4d19f2b
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2019-05-15 06:47:12 +00:00
38404db183 tests: test_pipe.py. Fix missing import.
* Fix missing import (does not impact 'make test', fixes issue
  running under 'make test-shell')

Change-Id: I634378a8809df5c5b9671555932e797d04a2abbb
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-14 19:54:56 +00:00
ba123e152b QUIC multi thread update
* Add support for multiple threads
* Replace quicly buffers with fifos
* Fix cleanup of sessions
* Update quicly release version

Change-Id: I551f936bbec05a15703f043ee85c8e1ba0ab9723
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-05-14 19:52:29 +00:00
f9d4ab4272 svm: improve fifo segment prealloc support
- track fifo segment free and chunk freelist memory
- improve fifo alloc. If there are enough chunks to satisfy a fifo
  allocation request but not enough free memory, allocate a multi-chunk
  fifo
- add apis to preallocate chunks and fifo headers
- more tests

Change-Id: If18dba7ab856272c9f565d36ac36365139793e0b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-05-14 18:40:20 +00:00
0224514c28 IPSEC coverity fixes
Change-Id: I753fbce091c0ba1004690be5ddeb04f463cf95a3
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-05-14 17:51:19 +00:00
3fb65bea2b IPSEC: remove unecessary pass by reference of sequence number
Change-Id: Id406eb8c69a89c57305d8f138e8e6730037aa799
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-05-14 17:51:10 +00:00
a4ef82efee VPP-1649: fix coverity warning in api_format.c
Change-Id: Idc22377ca705a45300faaf8acbc3cae5f10e1c92
Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-14 17:50:49 +00:00
2180baccc1 Preallocate mhash key_tmps vector
Fix os_get_nthreads() so that it starts returning the correct answer
as early as possible.

Change-Id: Id5292262f2c3f521b07ffbe6a9f6748dcc4dcb7d
Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-14 17:50:35 +00:00
5e8e8dcd71 IPsec: increment tunnel intf tx counters
Recent changes removed the function that was incrementing the
tx counters. Increment them in the esp_encrypt functions.

Change-Id: I446333a23ccf66e34893adb2aa49af562cf35507
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2019-05-14 15:56:44 +00:00
49c1bc845d Build packages for generic Arm architecture
The current aarch64 version of VPP package distro in cloud repository
 (https://packagecloud.io/fdio/master/ubuntu), is built on a ThunderX server,
using some arch-specific options, for example, 128Byte cache line size,
 T=arm64-thunderx-linuxapp-gcc, RTE_MACHINE=thunderx

The patch is trying to build package distro with aarch64 generic features,
for both binary type targets, e.g., build/build-release, and package type
targets, e.g., pkg-deb/pkg-rpm, with the generic options, e.g.,
128Byte cache line size, T=arm64-armv8a-linuxapp-gcc, RTE_MACHINE=armv8a

If end users want to build arch specific optimized image,
TARGET_PLATFORM variable could be used, as below example,

$ make build-release/pkg-deb TARGET_PLATFORM=thunderx

Change-Id: If78bca8709fe83db6a95e8c26346f206bf5ea71d
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Sirshak Das <Sirshak.Das@arm.com>
Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
2019-05-14 15:32:11 +00:00
a77521290a rdma: update MAINTAINERS and add doc
Change-Id: Ida681d299fd57eba66338444b99d2476bdb3c695
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-05-14 14:13:49 +00:00
80b5e4f69e tests: fix TestMPLSPIC tests in test_mpls.py.
* Corrected stray ARP/ND packets in captures interfering with test results.
* Added tests to match counts of recv'd pkts against sent.
* Changes the number of packets to 67 for exercising single,
  dual, and quad-loops.

Change-Id: I9147b8578988607ea4444741d10854e4d8683191
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-14 13:54:24 +00:00
f6c7aec95f Coverity: Fix CID-198494 & CID-198388
Change-Id: I5fa4a3fa512b732fc444e908729582a109db538c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-05-14 06:10:27 +00:00
161638f14b Unregister UDPC port only when owned
Needed in QUIC, when cleaning up accepted UDP sessions

Change-Id: Ifcb32687175562bed4ca69bdc519cedd4dc3c2bc
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-05-14 02:02:43 +00:00
07c0a9d068 make test: vcl fix OSError exception handling
Change-Id: I4bf7da6752d85e384a8e8f3110964c4b142edcb5
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-05-14 01:09:48 +00:00
3bffd4be22 make test: Add QUIC external echo transfer test
- Add namespace configuration to echo_client
- Add external echo transfer testcase
- Refactor quic test class to reduce unnecessary method args
- Increase default fifo size to 64 and data transfer to 10 mbytes
- Remove sleep() between starting internal server & client apps

Change-Id: Ia9de46a314d58e7809f005f6a5211760e63789bf
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-05-14 01:09:32 +00:00
419e15f0c1 Fix typo
Change-Id: Ibc69195244bcc1e8e82c488fcd50b1eb2fcf81c0
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2019-05-13 22:31:08 +00:00
e6eefb6e3c Trivial Typo's in bier comments/docs.
Change-Id: I3b3e868277d5caf6b1341814003a3bc5726c2df9
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-13 22:30:28 +00:00
5bfb504d21 vnet: remove macro definitions
These two macro definitions should be removed as enum
vnet_interface_helper_flags_t has defined them.

Change-Id: I31bd0ea75639d2f9a53f396ac3cf42f9fc5fbdbe
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2019-05-13 12:41:19 +00:00
6b7e2332fb Fix VPP-1528 get the same IP address from DHCP server for two VPP DHCP clients
Change-Id: I18dfe51000758f44b991d2dd065c9aa2bc5863d5
Signed-off-by: jackiechen1985 <xiaobo.chen@tieto.com>
2019-05-13 12:38:41 +00:00
c1a02fcd92 remove dead code in rewrite.c
Change-Id: Ib34ca76fcc5e85cb3cc646ffc7be208b8e757cba
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-05-13 03:30:03 -07:00
72d8758fdc cli: Add return value in cli_inband
Even when a CLI command called through the cli_inband API failed
the API would return 0 (SUCCESS). This patch fixes that,
but since most CLI handlers return error->code == 0,
in most failure cases it will return -1 (UNSPECIFIED ERROR).

Type: fix

Change-Id: Ic83f3b23e8e8954bb8aa211301baba24e8c20ef6
Signed-off-by: Ole Troan <ot@cisco.com>
2019-05-10 21:50:34 +00:00