summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-09-18vppapigen: fix missing vla check for union classOle Troan2-52/+87
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Ie775cf3469d761847ac39cf0d80a3ec6463b7928
2019-09-18stats: fix per_worker vector rate heapOle Troan1-3/+7
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-18quic : refactor function namingMathiasRaoul3-56/+51
- 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-18tcp: compute snd time for rate sampleFlorin Coras3-29/+28
Type: feature Change-Id: I6bd675dc28dbc34293e895911efe986844c0564f Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-09-18builtinurl: initial working attemptDave Barach11-1/+755
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-18vppapigen: fix tests and run on verifyPaul Vinciguerra3-26/+58
- 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-17build: fix rpm python 3 dependsEd Kern1-1/+1
Type: fix Change-Id: Ie6eaccb27779bb14c0a23764a16cd22f0a72e379 Signed-off-by: Ed Kern <ejk@cisco.com>
2019-09-17session: limit pacer bucket sizeFlorin Coras2-2/+4
Type: feature Change-Id: I3ca27b09670716eba463d7b16771f765a1bd6dcd Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-09-17vlib: fix cli process stack overflowAloys Augustin1-1/+1
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-16tcp: use rate sample rtt in recovery if possibleFlorin Coras1-6/+14
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-16http_static: add dynamic GET / POST method hooksDave Barach3-178/+342
Add .json output to format_vnet_sw_interface_cntrs(...) Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ied036ebfaaafbf1dfc2a4e396c00f09f40659400
2019-09-16dpdk: initialize rte_mbuf during mempool dequeueDamjan Marion2-1/+47
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-16vlib: cli support ctrl-w to erase left wordHiroki Shirokura1-0/+47
Type: fix Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com> Change-Id: I3ae7dc3858d0353764d629d6a9eff2bdab5f8768
2019-09-16api: autogenerate api trace print/endianOle Troan34-395/+987
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-13session: add session enable option in config fileNathan Skrzypczak1-0/+2
Type: feature Change-Id: I8f02873e75c6e890f6749806d4f02547f951c8ca Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-09-13hsa: Fix QUIC sessions count calculationAloys Augustin1-3/+1
Type: fix Signed-off-by: Aloys Augustin <aloaugus@cisco.com> Change-Id: Ia53a41a30920f8af7cd00c6f809b32e7cc277b7a
2019-09-13devices: partial revert of af_packet API cleanup patchDamjan Marion2-80/+0
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-12tcp: cleanup scoreboard after recoveryFlorin Coras1-0/+7
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-12devices: af_packet API cleanupJakub Grajciar5-24/+109
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-12map: fix non-null-terminated C-stringBenoît Ganne1-3/+4
Type: fix Change-Id: Ia3a4693acd5eab234f60b37436c5b642b00bda46 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-09-12dpdk: fix null-termination of stringsElias Rudberg1-0/+3
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-12hsa: fix memory management bugsBenoît Ganne2-5/+9
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-12quic: fix use-after-freeBenoît Ganne1-1/+6
Type: fix Change-Id: I5e5e37684e336ca992dae8ea1d39b1fb103802b1 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-09-11misc: bond_create is broken for custom dump printSteven Luong1-2/+2
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-11quic: fix non-null terminated hostname stringBenoît Ganne1-9/+5
Type: fix Change-Id: I089d359d5726050f32f69366547086216fdb3098 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-09-11docs: run-sphinx-docs-mergedjdenisco2-3/+3
Type: docs Signed-off-by: jdenisco <jdenisco@cisco.com> Change-Id: I571222f3e3672253930700e23cca4812dde84a6d
2019-09-11ip: apply dual loop unrolling in ip4_inputLijian.Zhang1-0/+68
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-11ip: apply dual loop unrolling in ip4_rewriteLijian.Zhang1-0/+131
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-11dpdk: apply dual loop unrolling in DPDK TXLijian.Zhang1-0/+57
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-11memif: fix zero-copy arg overwriteJakub Grajciar1-3/+0
Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I9a34465c85597baecdbc672ce395265f7dbb7f00
2019-09-11bonding: API cleanupJakub Grajciar5-39/+63
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-11tcp: handle sack renegingFlorin Coras4-135/+203
Type: feature Change-Id: I201155b1b92cf7e57310af726879dab039090582 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-09-11build: fix running error with vmxnet3_test_plugin.sojialv011-10/+4
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-10tcp: enable gso in tcp hoststackSimon Zhang6-3/+89
Type: feature Change-Id: If68d07fbe8c6f7fffd2f93c7e854367082927e4f Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
2019-09-10misc: clean up "pcap [rx|tx] trace" debug CLIDave Barach4-169/+196
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-10session: fix session filter rangeFlorin Coras1-1/+1
Type:fix Change-Id: I173f45bf3d90e6979675b2ac812a969539f02147 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-09-10tcp: validate connections in outputFlorin Coras1-9/+46
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-10misc: fix shebang with missing envNathan Skrzypczak2-2/+2
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-10papi: let async calls return contextVratko Polak1-1/+6
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-09misc: fix coverity warning in the oddbuf pluginDave Barach9-134/+21
Clean up license / copyright headers Type: fix Ticket: VPP-1771 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ibfc2a46632e17578fd74357b83f417987b8447be
2019-09-09docs: improve unformat documentationDave Barach1-8/+120
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-09memif: API cleanupJakub Grajciar7-68/+125
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-09libmemif: prevent crash in case of invalid connection handleJakub Grajciar1-9/+31
Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I803c86a48e0148ef143026a5cd93e4510c4f0611 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-09-07vlib: clean up the "pcap dispatch trace" debug CLIDave Barach2-138/+183
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-1762 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I1240fe3f61a0acf5ee9faed60d6ad3386e72e569
2019-09-07ip: fix udp/tcp checksum corner casesDave Barach13-5/+1311
When checksumming chained buffers with odd lengths: insert a NULL byte, or the calculation fails. Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: John Lo <loj@cisco.com> Change-Id: I380f7c42897bdb28c8c29aa1c4cdaaa849cc9ecc
2019-09-06ikev2: fix crash during IKE SA Init exchangeFilip Tehlar1-6/+1
Type: fix Change-Id: If827fe348fe35d1221d29f91b7e6ea1624d13999 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2019-09-06bonding: add weight support for active-backup modeSteven Luong8-96/+332
Not all interfaces have the same characteristics within the bonding group. For active-backup mode, we should do our best to select the slave that performs the best as the primary slave. We already did that by preferring the slave that is local numa. Sometimes, this is not enough. For example, when all are local numas, the selection is arbitrary. Some slave interfaces may have higher speed or better qos than the others. But this is hard to infer. One rule does not fit all. So we let the operator to optionally specify the weight for each slave interface. Our primary slave selection rule is now 1. biggest weight 2. is local numa 3. current primary slave (to avoid churn) 4. lowest sw_if_index (for deterministic behavior) This selection rule only applies to active-backup mode which only one slave is used for forwarding traffic until it becomes unreachable. At that time, the next "best" slave candidate is automatically promoted. The slaves are sorted according to the preference rule when they are up. So there is no need to find the next best candidate when the primary slave goes down. Another good thing about this rule is when the down slave comes back up, it is selected as the primary slave again unless there is indeed a "better" slave than this down slave that were added during that period. To set the weight for the slave interface, do this after the interface is enslaved set interface bond <interface-name> weight <value> Type: feature Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I59ced6d20ce1dec532e667dbe1afd1b4243e04f9
2019-09-06quic: fix server opening stream immediatelyAloys Augustin2-4/+19
Previously, if the first thing a server did was to open a stream and send data, this could trigger a crash on the clilent side VPP as the quic session wouldn't be allocated. Change-Id: I43990ce2a71217d6719ecae4da60111d05fbcfc0 Type: fix Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-09-06tap: revert clean-up when linux will delete the tap interfaceMohsin Kazmi2-43/+0
Type: fix Ticket: VPP-1766 revert e4ac48e792f4eebfce296cfde844ee73b1abd62f Change-Id: I03feea4008a47859d570ad8d1d08ff3f30d139ef Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> (cherry picked from commit 623a1b7053424b539a51faf866ab839d3da3f45b)
2019-09-05build: fix unsupported CMake comparison operationjialv011-1/+1
VERSION_GREATER_EQUAL is not supported before CMake version 3.7. Type: fix Signed-off-by: Jianlin Lv <Jianlin.Lv@arm.com> Change-Id: Id690b7b7c26121f9d289ebd0aaea0860be63795f