7353 Commits

Author SHA1 Message Date
Dave Wallace
0e402a98b2 hsa: refactor vpp_echo failure handling
- Return unique value for each failure condition
- Last failure value returned
- All failures included in description
- Output failure value and description

Type: test

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I72d5e7f660ad4765c468874421622607af6ae3d1
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-09-20 13:49:44 +00:00
Benoît Ganne
4e323cbdbd interface: fix pcap drop trace in case of vlan
Type: fix

Change-Id: If3c4e5c376b51a26143d8922dcacfbda534163bd
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-09-20 07:48:41 +00:00
Florin Coras
5c29029ef0 session: builtin app rx notifications regardless of state
Type: feature

Provide rx notifications to builtin apps even after disconnect.
Consequently tcp connections that are past FIN_WAIT_1 can still receive
rx notifications.

This is not currently supported for external applications.

Change-Id: I529da7f7120b0e7c62c5026ac71f86d6b5196cf4
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-09-19 17:49:33 +00:00
Filip Tehlar
de2dd6c356 ikev2: add support for GCM cipher
Type: feature
Change-Id: Ic703015b55f0ae947e5e44b10b74b3c79efe7da6
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2019-09-19 16:52:40 +00:00
Jakub Grajciar
aa4438a311 cop: API cleanup
Use consistent API types.

Type: fix

Change-Id: I6ac453c88628a4dbb08b03c408df09b91b1ea5ca
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-09-19 16:30:52 +00:00
Ole Troan
75761b933f api: split vl_api_prefix into two
One type for address with prefix and one type for prefix.

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Icfec51d9b7d5cde1d69fbecdd97498688ab7b295
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
2019-09-19 14:24:54 +00:00
Andrew Yourtchenko
fbc388986e tests: split up the long running IPSec tests into separate classes
Type: test
Change-Id: Ieeae7f1653f5f2e8e49f258871b389ef8954c90b
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-09-18 23:17:16 +00:00
Dave Wallace
789ac9de06 hsa: fix vpp_echo stats output
- Output stats when there are missing timing events
- Add missing timing event status to the stats output

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I10a8db6db9568b98379df544d0098f9722a44867
2019-09-18 16:17:41 +00:00
Ole Troan
d5a78a5310 vppapigen: fix missing vla check for union class
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ie775cf3469d761847ac39cf0d80a3ec6463b7928
2019-09-18 15:10:12 +00:00
Ole Troan
a41b0b78a4 stats: fix per_worker vector rate heap
The per_worker counters were outside of the stats heap.
Also fixes the length of the per_vector counter.
A simple vector is two dimensional including a thread dimension.

Fixes: f89a6de8f0
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I370bf9cb033d264f42df2723e01b768dc270792b
2019-09-18 15:09:47 +00:00
MathiasRaoul
b28349e891 quic : refactor function naming
- functions renaming to be consistent with the other plugin functions name
- removing useless logs

Type: style

Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
Change-Id: Iea212a799448975e01a92f16cc329de13907ff07
Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
2019-09-18 14:58:40 +00:00
Florin Coras
7436b43673 tcp: compute snd time for rate sample
Type: feature

Change-Id: I6bd675dc28dbc34293e895911efe986844c0564f
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-09-18 14:40:43 +00:00
Dave Barach
43765e2b4e builtinurl: initial working attempt
Note that the builtin URLs are disabled by default. To activate,
"builtinurl enable" or use the builtinurl_enable API.

See .../extras/http/sample.md for some Hugo-friendly .md w/ embedded
Javascript that accesses the builtin URLs.

Type: feature

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I6d82d9292c41d6d2d90be73ba8a1a043fb20c986
2019-09-18 14:26:59 +00:00
Paul Vinciguerra
4bf849043d vppapigen: fix tests and run on verify
- changes vppapigen to only process an import once.

Type: fix

Change-Id: Ifcbcfcc69fdfb80d63195a17701762d0c239d7b4
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Signed-off-by: Ole Troan <ot@cisco.com>
2019-09-18 11:40:17 +02:00
Ed Kern
c63c0166ee build: fix rpm python 3 depends
Type: fix

Change-Id: Ie6eaccb27779bb14c0a23764a16cd22f0a72e379
Signed-off-by: Ed Kern <ejk@cisco.com>
2019-09-17 13:27:17 -06:00
Florin Coras
7c8f828ba3 session: limit pacer bucket size
Type: feature

Change-Id: I3ca27b09670716eba463d7b16771f765a1bd6dcd
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-09-17 14:49:32 +00:00
Aloys Augustin
735d2e202b vlib: fix cli process stack overflow
Some cli processes, including bringing up an i40e interface with dpdk,
consume more than the currently available stack space.

Type: fix
Fixes: VPP-1774
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Change-Id: I86ceb9e6e07523d5e0f760b5922467f09a8d4006
2019-09-17 11:52:51 +00:00
Florin Coras
1dbda64b46 tcp: use rate sample rtt in recovery if possible
If in recovery and rate samples are taken for burts that have not been
retransmitted, use the rtt estimate.

Type: feature

Change-Id: I95028f492008457c959157aa4ee4c3435fa9c3f0
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-09-16 22:57:01 +00:00
Dave Barach
5554c56a65 http_static: add dynamic GET / POST method hooks
Add .json output to format_vnet_sw_interface_cntrs(...)

Type: feature

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ied036ebfaaafbf1dfc2a4e396c00f09f40659400
2019-09-16 16:18:10 -04:00
Damjan Marion
da9513af29 dpdk: initialize rte_mbuf during mempool dequeue
In some cases it may happen that buffer is allocated by DPDK, and freed
by VPP native code. In such cases dpdk metadata is not reset, so we need
to do that during mempool dequeue. Template approach is taken to reduce
cost of that operation.

Type: fix
Fixes: 910d369

Change-Id: Ic239007cfc8fbceb965021c56963cda9d53f63be
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-09-16 17:20:31 +00:00
Hiroki Shirokura
67e4df144b vlib: cli support ctrl-w to erase left word
Type: fix
Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
Change-Id: I3ae7dc3858d0353764d629d6a9eff2bdab5f8768
2019-09-16 14:52:32 +00:00
Ole Troan
33a58171e5 api: autogenerate api trace print/endian
In addition to the external vppapitrace tool, VPP itself supports dumping of API trace files.
In two formats, "custom-dump" and "dump". "dump" gives a human friendly list,
and "custom-dump" is meant to give a list of commands that can be fed to VAT.
This patch only deals with "dump".
Prior to this fix, auto-generation was only done for the basic types.
This fix adds support for any type, including lists, and supports pretty-printing
of enums, strings, IP addresses, MAC addresses and so on.

Usage: api trace dump <api-trace-file>

For example

Change-Id: I4e485680e6dcfce7489299ae6cf31d835071ac40

---------- trace 48 -----------
vl_api_sw_interface_set_flags_t:
  _vl_msg_id: 75
  client_index: 0
  context: 10
  sw_if_index: 1
  flags: IF_STATUS_API_FLAG_ADMIN_UP
---------- trace 49 -----------
vl_api_sw_interface_add_del_address_t:
  _vl_msg_id: 88
  client_index: 0
  context: 11
  sw_if_index: 1
  is_add: 1
  del_all: 0
  prefix: 172.16.1.1/24
---------- trace 51 -----------
vl_api_cli_inband_t:
  _vl_msg_id: 819
  client_index: 0
  context: 13
  cmd: packet-generator capture pg0 pcap /tmp/vpp-unittest-TestMAP-YhcmDX/pg0_out.pcap disable
---------- trace 58 -----------
vl_api_ip_neighbor_add_del_t:
  _vl_msg_id: 199
  client_index: 0
  context: 20
  is_add: 1
  neighbor:
    sw_if_index: 2
    flags: IP_API_NEIGHBOR_FLAG_NONE
    mac_address: 0202.0000.ff02
    ip_address: fd01:2::2

Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I5556d06008de2762e7c2d35a8b0963ae670b3db1
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
2019-09-16 12:23:27 +00:00
Nathan Skrzypczak
1292d19c79 session: add session enable option in config file
Type: feature

Change-Id: I8f02873e75c6e890f6749806d4f02547f951c8ca
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-09-13 15:18:29 +00:00
Aloys Augustin
a786687ab4 hsa: Fix QUIC sessions count calculation
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Change-Id: Ia53a41a30920f8af7cd00c6f809b32e7cc277b7a
2019-09-13 13:10:49 +00:00
Damjan Marion
bf02d6f467 devices: partial revert of af_packet API cleanup patch
Reverting as make test must me able to run non-root so creating tap interfaces is no-go.

Type: fix
Fixes: 3b2db9002c14f9e0742622f2d503c5801d443827

Change-Id: Ib6eb2679b65b662ed6e88e67f8b199744abae85e
Signed-off-by: Damjan Marion <dmarion@me.com>
2019-09-13 11:51:27 +00:00
Florin Coras
321cfa5fcb tcp: cleanup scoreboard after recovery
Type: fix

When recovering from congestion, remove last hole in scoreboard if it
covers all bytes sent above snd_congestion.

Change-Id: I752accd4590cd9bf553c35a1bb40a38c308c04f5
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-09-12 18:54:32 -07:00
Jakub Grajciar
3b2db9002c devices: af_packet API cleanup
Use consistent API types.

- fix af_packet_dump dumping deleted interface

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ie8d138e30c8c51a2306bb2ad9ac0b7a49d5412bf
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-09-12 20:25:10 +00:00
Benoît Ganne
3c7c613cf1 map: fix non-null-terminated C-string
Type: fix

Change-Id: Ia3a4693acd5eab234f60b37436c5b642b00bda46
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-09-12 20:24:47 +00:00
Elias Rudberg
7fd402163c dpdk: fix null-termination of strings
Fix problem with some strings not being null-terminated,
by using the vec_terminate_c_string macro in two places.
The problem was found using AddressSanitizer.
(Also make sure indentation is OK for those changes.)

Ticket: VPP-1772
Type: fix

Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
Change-Id: Ib7826e3c322e58b649e2d7f6053786da618a5e9e
2019-09-12 14:21:22 +00:00
Benoît Ganne
58519563ac hsa: fix memory management bugs
Fix use-after-free and non-null terminated string.

Type: fix

Change-Id: Ibba2a6cae68c612a34477aa813b3bf27a0c8fc1f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-09-12 14:18:14 +00:00
Benoît Ganne
6d6456ab42 quic: fix use-after-free
Type: fix

Change-Id: I5e5e37684e336ca992dae8ea1d39b1fb103802b1
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-09-12 12:33:14 +00:00
Steven Luong
b087696489 misc: bond_create is broken for custom dump print
Regression from https://gerrit.fd.io/r/#/c/vpp/+/21508/
The aformentioned patch changed lb and mode to u32. But it does not make the
same change to custom_dump.c

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I2b7d065e21427090af3deb47c8a24c5da679e4f5
2019-09-11 19:37:07 +00:00
Benoît Ganne
b840c773dc quic: fix non-null terminated hostname string
Type: fix

Change-Id: I089d359d5726050f32f69366547086216fdb3098
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-09-11 19:31:44 +00:00
jdenisco
8b1c7f34fb docs: run-sphinx-docs-merged
Type: docs

Signed-off-by: jdenisco <jdenisco@cisco.com>
Change-Id: I571222f3e3672253930700e23cca4812dde84a6d
2019-09-11 19:20:56 +00:00
Lijian.Zhang
86b1871ba2 ip: apply dual loop unrolling in ip4_input
Too many prefetches within loop unrollings induce bottleneck and
performance degradation on some CPUs which have less cache line fill
buffers, e.g, Arm Cortex-A72.
Apply dual loop unrolling and tune prefetches manually to resolve
hot-spot with prefetch instructions.
It saves about 11.5% cycles with ip4_input node on Cortex-A72 CPUs.

Type: feature

Change-Id: I1ac9eb21061a804af2a414b420217fbcda3689c9
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
2019-09-11 19:20:27 +00:00
Lijian.Zhang
840f64b4b2 ip: apply dual loop unrolling in ip4_rewrite
Too many prefetches within loop unrollings induce bottleneck and
performance degradation on some CPUs which have less cache line fill
buffers, e.g, Arm Cortex-A72.
Apply dual loop unrolling and tune prefetches manually to remove
hot-spot with prefetch instructions, to get throughput improvement.
It brings about 7% throughput improvement and saves 28% clocks with
ip4_rewrite nodes on Cortex-A72 CPUs.

Type: feature

Change-Id: I0d35ef19faccbd7a5a4647f50bc369bfcb01a20d
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
2019-09-11 19:20:27 +00:00
Lijian.Zhang
fe2523d1a4 dpdk: apply dual loop unrolling in DPDK TX
Too many prefetches within loop unrollings induce bottleneck and
performance degradation on some CPUs which have less cache line fill
buffers, e.g, Arm Cortex-A72.
Apply dual loop unrolling and tune prefetches manually to remove
hot-spot with prefetch instructions, to get throughput improvement.
It brings about 1% throughput improvement and saves 8% clocks with
the target node on Cortex-A72.

Type: feature

Change-Id: If3a64a04a77e90cd0240bc4d1186dbb09dac7df0
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
2019-09-11 19:20:27 +00:00
Jakub Grajciar
8a1dea4ce6 memif: fix zero-copy arg overwrite
Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I9a34465c85597baecdbc672ce395265f7dbb7f00
2019-09-11 17:08:54 +00:00
Jakub Grajciar
3d1ef873da bonding: API cleanup
Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Idbba4ab6a412b75338e3149e51476693f0862f16
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-09-11 15:14:02 +00:00
Florin Coras
558e3e0957 tcp: handle sack reneging
Type: feature

Change-Id: I201155b1b92cf7e57310af726879dab039090582
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-09-11 14:37:59 +00:00
jialv01
082ebeba16 build: fix running error with vmxnet3_test_plugin.so
vpp_api_test load vmxnet3_test_plugin.so error:
"load_one_plugin:42:/vpp/lib/vpp_api_test_plugins/vmxnet3_test_plugin.so:
  undefined symbol: unformat_vlib_pci_addr"

Type: fix

Signed-off-by: Jianlin Lv <Jianlin.Lv@arm.com>
Change-Id: I444aa05d0bc3c4f4f25082388243f1adb305dd0a
2019-09-11 13:34:46 +00:00
Simon Zhang
1146ff4bcd tcp: enable gso in tcp hoststack
Type: feature

Change-Id: If68d07fbe8c6f7fffd2f93c7e854367082927e4f
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
2019-09-10 20:02:55 +00:00
Dave Barach
b97641c79f misc: clean up "pcap [rx|tx] trace" debug CLI
Separate debug CLI arg parsing from the underlying action
function. Fixes a number of subtle ordering dependencies, and will
allow us to add a binary API to control the feature at some point in
the future.

Type: refactor
Ticket: VPP-1770

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Id0dbeda06dad20e756c941c691e2088ce3c50ec7
2019-09-10 14:51:02 +00:00
Florin Coras
61a89f2b61 session: fix session filter range
Type:fix

Change-Id: I173f45bf3d90e6979675b2ac812a969539f02147
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-09-10 14:37:56 +00:00
Florin Coras
78dae00881 tcp: validate connections in output
Type: feature

This shouldn't happen unless connections are removed after buffers were
enqueued to tcp-output and before tcp-output runs. For instance, packet
is enqueued to tcp output and cleanup is called for connection.

Change-Id: Ib7dd82ffa6cfb21ff5068aba010e0a3497eeea13
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-09-10 14:11:01 +00:00
Nathan Skrzypczak
5c2f96436a misc: fix shebang with missing env
This is needed for macos where /usr/bin/python[23] does not exist
and /usr/bin is write protected

Type: fix

Change-Id: Ia1b3c732248c78482993de532fa2ea96e376d90a
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-09-10 07:29:26 +00:00
Vratko Polak
2f6e0c6002 papi: let async calls return context
Callback receives "reply" messages containing context,
but previously there was no easy way
to get the automatically generated context value
of the originally sent "command" message.

With this, the caller can store the contexts,
so the callback knows which command got replied to.

Type: feature

Change-Id: I58ca812d20b03916f74096c396126710115a747c
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-09-10 07:23:39 +00:00
Dave Barach
a287a30dda misc: fix coverity warning in the oddbuf plugin
Clean up license / copyright headers

Type: fix
Ticket: VPP-1771

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ibfc2a46632e17578fd74357b83f417987b8447be
2019-09-09 16:58:40 -04:00
Dave Barach
5b786fb894 docs: improve unformat documentation
Specifically: document the unformat specifiers "%=", "%|", and correct
usage of unformat_line_input.

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I254f9c4a61c5c8d3edbf76f521e5f38fb89150f1
2019-09-09 18:37:35 +00:00
Jakub Grajciar
546f955b3d memif: API cleanup
Use consistent API types.

memif_create now enables zero-copy by default.
Add no_zero_copy param to memif_create which
if set, disables zero copy.

Type: refactor

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I11df8b9212c40de179ee71dc9da14039b982ede5
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-09-09 14:29:48 +00:00