6339 Commits

Author SHA1 Message Date
Jon Loeliger
bdd6e6ac4e MAP: Crush Coverity Complaint
Change-Id: I965229f5bf8fcde9176357536a23ba8056542919
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2019-03-22 08:28:02 +00:00
Dave Barach
d1e17d00bb Ignore SIGTERM during the vpp boot sequence
Call setjmp and mark the setjmp context valid just prior to entering the
vpp main loop.

Change-Id: I26d5cd6a624cb2a497d81eb85a62365621b3b469
Signed-off-by: Dave Barach <dave@barachs.net>
2019-03-21 23:17:51 +00:00
Florin Coras
9e041b10ee vec: use memset in vec_resize_allocate_memory
Change-Id: I0ed28846060a774b1f6cdc1e4e5974a7e16f9f16
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-21 22:09:44 +00:00
Florin Coras
4b76112dc4 session/fifo: make event unset atomic
Ensures that fifo cursize loads cannot be speculated to before the event
unset.

Change-Id: Ia7c20c510d58f26a8e9b82d3982c6d4143a3a4d6
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-21 13:56:02 -07:00
Neale Ranns
192b13f96d BVI Interface
a new dedicated BVI interface as opposed to [re]using a loopback.

benefits:
 - removes ambiguity over the purpose of a loopback interface
 - TX node dedicated to BVI only functions.

Change-Id: I749d6b38440d450ac5b909a28053c75ec9df946a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-21 20:33:30 +00:00
Steven Luong
1ea74b5df5 docs: break up long lines in vmxnet3.rst to avoid line wrap
Although it does not make a difference for the formatter with long lines, it
is easier to view and read the raw text with conventional editor when there no
line wrap. Just break up the long lines to 80 characters or less.

Change-Id: Ia916638e974abd19b8d19aee4dd72ff6a243ca48
Signed-off-by: Steven Luong <sluong@cisco.com>
2019-03-21 18:19:38 +00:00
Neale Ranns
7227c39dc4 error-drop; print interface by name
Change-Id: I19736180c1e7e1d13dbb74bcd8f1dfae762b1d25
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-21 18:18:38 +00:00
Neale Ranns
2ac885c665 IPSEC: Mutli-tunnel tests
Change-Id: I46f1db6579835c6613fdbb2b726246cc62b135fe
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-21 13:44:31 +00:00
ezkexma
bcee60d570 api trace: cli bug fix
vpp/src/vlibmemory/vlib_api_cli.c
Fixing the help string for the "set api-trace" command.

Change-Id: I70f85a4f55466d2cc01018c4ad8cbe8332dbb925
Signed-off-by: ezkexma <maqi.z.ke@ericsson.com>
2019-03-21 12:39:35 +00:00
Kingwel Xie
27431dde95 icmp: bug fix of buffer->error
Recent changes in icmp4/6 choose to free the original
buffer, and make a copy for sending icmp reply back.
However, buffer->error will be ignored when the buffer
is freed unconditionally.

A quick fix can be moving the counter increment code to icmp,
but I prefert to enqueue all buffers to 'error-drop' so that
they can be handled in a batch

rebase, using vlib_buffer_enqueue_to_single_next

Change-Id: I9f3028b55f1d5f634763e2410cd91e17f368195e
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2019-03-21 11:29:24 +00:00
Kingwel Xie
1ba5bc8d88 ipsec: add ipv6 support for ipsec tunnel interface
Change-Id: I6a76907dc7bed2a81282b63669bea2219d6903c9
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2019-03-21 07:42:09 +00:00
Florin Coras
a5efca30f5 vcl: mark app state as failed if attach fails
Change-Id: If6c3b9a9136390fb740e5c00fd270b7962a1c4ab
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-20 22:02:49 +00:00
Damjan Marion
8863123bad crypto: add hmac truncate option
This reverts commit 785368e559dbdf50676f74f43f13423c817abb52.

Change-Id: I782ac2be4e161790c73ccd4b08492e2188a6d79d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-20 17:24:31 +00:00
Damjan Marion
f2edfbd212 crypto_openssl: call EVP_EncryptFinal_ex only if needed
Change-Id: I4dc6749a67c0726bae20b8204a5171676308b909
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-20 17:23:59 +00:00
Neale Ranns
c80cc9ab84 IPSEC: Tunnel SA not deleted
p is overwritten by hash_unset so an incorrect value is passed to
ipsec_sa_del

Change-Id: I97300dd4421c62d7cfa47b8e7e9789becb2370e9
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-20 17:23:41 +00:00
Damjan Marion
b966e8bfdd ipsec: keep crypto data inside SA
Change-Id: Ie8986bd3652d25c4befe681cea77df95aba37ebc
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-20 17:23:04 +00:00
Kingwel Xie
c372dc2190 ipsec: bug fix ipsec-init sequence
ipsec_tunnel_if_init might be called before ipsec_init
this memset in ipsec-init therefore zero the memory
allocated by ipsec_tunnel_if_init

Change-Id: Ie889f1bf624c76842ef77e5a51ed1d41fed4758d
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2019-03-20 16:36:18 +00:00
Florin Coras
5fc939eea9 cpu: fix rtype for fn selected by CLIB_MARCH_FN
Change-Id: I79f65d7bd19af035442dca48b7be6c94de20c167
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-20 16:12:02 +00:00
Florin Coras
e5c57d763b tcp: disable cc elog debugging
Change-Id: Iffed748a15b9f01b985f9a6a9574a7bc42ab55aa
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-20 15:22:40 +00:00
Damjan Marion
47d165e4c1 perfmon: python to C parser for intel CPUs
EXAMPLE:
src/plugins/perfmon/intel_json_to_c.py \
  -i skylakex_core_v1.12.json \
  -o src/plugins/perfmon/perfmon_intel_skx.c \
  -m 0x55,0 \
  -m 0x55,1 \
  -m 0x55,2 \
  -m 0x55,3

Change-Id: I16ce059e231d340ecfcb6f6638e29c5b46304683
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-20 03:06:52 -07:00
Florin Coras
d89411ef5f ldp: force exit if constructor init fails
Change-Id: I0c4659b9e413cf7291ec9e3b5a67de8ad8028cd3
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-20 09:27:32 +00:00
Lijian.Zhang
e6a47cf557 Re-enable aarch64 neon instruction in vlib_buffer_free_inline
int vaddvq_u8 (uint8x16_t __a) is not appropriate to implement xxx_is_all_zero,
as there may be overflow causing incorrect return value.

Here's an example.
u8x16 x = {0 <repeats 12 times>, 1, 255, 0, 0};

Change-Id: Ia6a10bdf8da360dec12db902d028751a1a77e9a4
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Sirshak Das <Sirshak.Das@arm.com>
2019-03-20 09:27:20 +00:00
Filip Tehlar
e225f71766 tests: implement crypto tests per RFC2202
Change-Id: I18b30d5ee8aa60c34d52b7716b5feb7225cb0d59
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2019-03-20 00:56:41 -07:00
Paul Vinciguerra
76ef6094cb tests: cdp plugin. Replace cdp enable cli command with API call.
Change-Id: Ic2d21b535a58c1c618ec9e652d30858ad45a7d43
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-20 07:47:36 +00:00
Paul Vinciguerra
b8daa257bd vpp_papi: Expose the list of field attributes to the client.
Change-Id: I7aba1760f68798fc5bea1244ce798e4b528a4df4
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-20 07:44:20 +00:00
Paul Vinciguerra
ec850a8044 tests: replace CLI command with API for flowprobe params.
Change-Id: If446a0d111b89f0a761db41696e0d6ca912312f0
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-20 07:44:18 +00:00
Paul Vinciguerra
3d04e3303a vpp_papi: specify encoding for .encode()/.decode()
py2 defaults to 'ascii', py3 defaults to 'utf-8'.

Change-Id: Ib76d0ec56f24535e4bafd397cc6fb5e85967d508
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-19 17:36:32 -07:00
Jon Loeliger
4dc5c7b905 MAP: Add optional user-supplied 'tag' field in MAPs.
Like other entities, allow an arbitrray user-supplied 'tag'
field to be place on created MAP domains.  It is also later
returned with the MAP details.  You might be thinking "User
assigned MAP name" here.

As the MAP domain structure was at the limit of a cacheline size,
introduce a parallel "extra data" vector with non-essential domain
information in it.

Change-Id: Icc12b64cc4cb3e040c9a475908b19f6abaf4c293
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2019-03-19 20:44:34 +00:00
Neale Ranns
2e2c91f925 Revert "tests: Deprecate the use of CLI commands in tests."
This reverts commit e2e8f02165f27ae04e6d20ce0c628e29271a8db6.

Change-Id: Ie23dcb8a5b3e96f77e0d117a6887c43064c79669
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-19 17:56:54 +00:00
Damjan Marion
91f17dc7c4 crypto: introduce crypto infra
Change-Id: Ibf320b3e7b054b686f3af9a55afd5d5bda9b1048
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2019-03-19 16:29:43 +00:00
Michal Cmarada
5daf0c55c0 add default NONE flag for bd_flags
Change-Id: I316bcc3d0244cf89bd1e2fc8a08cfac6aad0b22c
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
2019-03-19 16:22:48 +00:00
Neale Ranns
231c469687 IPSEC: remove byte swap operations in DP during SPD classify
Change-Id: I4bfde738f9585b045cb5ba62cf51b141d639b1b2
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-19 14:53:26 +00:00
Neale Ranns
9f231d4f14 IPSEC: tidy the policy types
Change-Id: I5e981f12ff44243623cfd18d5e0ae06a7dfd1eb8
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-19 11:26:14 +00:00
Steven Luong
ee94ffa35d docs: Update vmxnet3 usecase
Update vmxnet3 usecase to reflect the current supported features.

Change-Id: I4558eb422d5b2641b3acfc7c0a3734bf31a8fb0f
Signed-off-by: Steven Luong <sluong@cisco.com>
2019-03-19 07:39:51 +00:00
Florin Coras
d5c604d687 session: add session flags
- use flag instead of enqueue_epoch for enqueueing rx events.
- use flag for proxy sessions

Change-Id: Iec3eee55a68d02536ece6329348a3369c7c7412e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-18 22:07:37 +00:00
Damjan Marion
1ee346a0a6 Fix build with newer linux headers
Change-Id: Ibfdcec60567ec357205fa137257f2d8cba44b01c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-18 17:13:10 +00:00
Neale Ranns
5cbf7c7a88 VOM: GBP: L3-out subnets need only the sclass not an EPG
Change-Id: Ic600233ea69216aeee707a103bf840fbeec5c205
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-18 15:27:20 +00:00
Paul Vinciguerra
c0692a4496 tests: Speedup tests by 30%.
Baseline:
  2598325153 function calls (2598296959 primitive calls) in 2257.698 seconds

Post-changeset:
 1495427 function calls (1467233 primitive calls) in 1572.080 seconds

Change-Id: I191b68b29c9e0f19964bf0b8879ddf357c9cbd5c
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-18 14:08:34 +00:00
Paul Vinciguerra
b5f15bddc5 Tests: Trivial. Define constants once.
Change-Id: Iaf106962598d04708e8740e016d5c55ff35432c9
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-18 14:06:38 +00:00
Paul Vinciguerra
e2e8f02165 tests: Deprecate the use of CLI commands in tests.
Since the stated policy regarding CLI commands is:
  "Note that the debug CLI is a developer's tool
   - no warranty express or implied - and that
   we may choose not to fix debug CLI bugs.",

this change emits a deprecation warning whenever a test case calls a CLI command.

Change-Id: I91b30e86ae1b2fca36732837f36cdda762cdf458
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-18 14:06:12 +00:00
Steven Luong
ee8ba6877e vmxnet3: auto bind support
For creating the vmxnet3 interface, add the bind option to automatically bind
the pci to vfio-pci module which removes the need for manual bind. Manual bind
still works, should people prefer to go that route.

Change-Id: Ife75926f8755d754a08dd0ecff0f1de326ad5ba1
Signed-off-by: Steven Luong <sluong@cisco.com>
2019-03-18 11:11:50 +00:00
Andrew Yourtchenko
a990a2e493 vnet: disable the expansion of the heap allocated for classifier tables
Classifier data structures assume the contiguous chunk of memory
within the heap. Default heap flags for dlmalloc allow for heap growth.
When that happens, the memory becomes discontiguous. This results
in symptoms that are more cryptic than necessary.

Disabling the expand makes the session allocation behavior
of the classifier the same for dlmalloc as for the legacy allocator.

Change-Id: I2f725b5f78a31a8eaa5f5a20dfdd7e1129662f6a
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-03-18 10:49:56 +01:00
Tom Seidenberg
97f8ae923a Fix bihash bucket double unlock.
Change-Id: Icc9bef32d1bb2b8f277598c50c69343c81f22cd2
Signed-off-by: Tom Seidenberg <tseidenb@cisco.com>
2019-03-15 20:15:24 +00:00
Ole Troan
e4a6d69faa PAPI: Build python3 package for vpp_papi
Change-Id: Iae53fe88a69b53b75a7439d159ae0f9d18545908
Signed-off-by: Ole Troan <ot@cisco.com>
2019-03-15 19:01:59 +00:00
Ole Trøan
3b0d7e42f6 Revert "API: Cleanup APIs interface.api"
This reverts commit e63325e3ca03c847963863446345e6c80a2c0cfd.

Allow time for CSIT to accommodate.

Change-Id: I59435e4ab5e05e36a2796c3bf44889b5d4823cc2
Signed-off-by: ot@cisco.com
2019-03-15 17:34:06 +00:00
Dave Barach
3fef8f811a DOC ONLY: fix g2 build documentation
Removed a broken paragraph, replaced it with a link.

Some nuisance white-space cleanups courtesy of emacs:
(add-hook 'before-save-hook 'delete-trailing-whitespace)

Change-Id: Ib348107c2dc0df8249461591015347d7b4f6fa4a
Signed-off-by: Dave Barach <dave@barachs.net>
2019-03-15 11:29:45 -04:00
Florin Coras
5e06257cb8 vcl: cleanup debug messages
Change-Id: Ida3ecffc9a4d7a080ad63cd48fd4b5330b732ffb
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-15 14:08:10 +00:00
Jakub Grajciar
e63325e3ca API: Cleanup APIs interface.api
Use of consistent API types for interface.api

Change-Id: Ieb54cebb4ac96b432a3f0b41596718aa2f34885b
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-03-15 10:24:22 +00:00
Paul Vinciguerra
4ba4edd150 Add @deprecated decorator.
import deprecation

@deprecation.deprecated(deprecated_in="1.0", removed_in="2.0",
                        current_version=__version__,
                        details="Use the bar function instead")
def foo():
    """Do some stuff"""
    return 1

Change-Id: Ib2ec5dd90445c9967eb39dbf6543cafd48b7f866
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-15 10:03:12 +00:00
Paul Vinciguerra
e3a0e6e8bf Tests: test/test_flowprobe.py Fix TypeError.
TypeError: not all arguments converted during string formatting

Change-Id: I0b4b27e37ba47e737aeb639c9787f8bc08a92dce
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-14 21:26:07 +00:00