aboutsummaryrefslogtreecommitdiffstats
path: root/vlib
AgeCommit message (Collapse)AuthorFilesLines
2016-12-21aarch64 compatibilityChristophe Fontaine2-4/+4
- lb plugin: compatibility for non x86 platforms. - Add vector_neon.h to support simd instructions, especially 'u16x8_zero_byte_mask' used in "vnet/vnet/ip/ip4_source_and_port_range_check.c" Change-Id: I395546b0e2d5748e73daffa51269a200ef8d1235 Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-12-20VPP-525: multi-thread case binary API post-mortem dump AWOLDave Barach1-6/+9
root cause: blocking all signals in worker threads Change-Id: Ife0a5f04be0648fab84e493f203e79ba94890052 Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-20Declare variables as externalDamjan Marion7-11/+14
non-external declarations in header files are generating multiple empty definitions of the same symbol. Change-Id: I7f3933404f79d08579468d0052c106731b57507c Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-07epoll_input: don't sleep if we expect event in less than 1 msDamjan Marion1-4/+14
Change-Id: I81652fb04608d805497a600c7dc8041911bbf39a Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-02buffers: fix vlib_buffer_copyDamjan Marion1-2/+2
memcpy should happen after current_data is set. Change-Id: I838f61b54d15a8bb55d54f770f47fb4d58d071cb Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-24vlib: remove old memcpy implementationDamjan Marion1-63/+1
Change-Id: I21f5abb00cf12da5c144da477badc38736be7a7d Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-24vlib: merge buffers.c and dpdk_buffer.cDamjan Marion3-1379/+515
Majority of those two files are identical so makes sense to have only one. Change-Id: Id23eeb332cb23a11e54eecccefe08594e21a724e Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-23dpdk: remove rte_mbuf modifications at many places in the codeDamjan Marion4-111/+11
It is sole responsibility of dpdk tx function to fill/update rte_mbuf prior to sending packet do PMD. Change-Id: I8ca1dba3e7bef41034d36e3525831849f7ac4ac0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-22Fix coverity warnings, VPP-486Dave Barach1-4/+4
Change-Id: I4ec49e116fdb418ebf9d84000f2a0cec1cf78b14 Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-22Prevent a frame leak when a pending node dispatches packets to itself.Neale Ranns1-6/+30
this patch recognises the case where the pending frame has packets dispatched to the same to-node, i.e. when restoring the frame there now exists a new to-node frame, and then frees the frame in hand. Change-Id: If166bf56970b7b3412fa6097cd90bf22f72abe4d Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-19vlib: Add 'show cpu' commandDamjan Marion1-0/+34
Change-Id: I0d9af8e022cc25b8b4503f808f79028190475f8f Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-17remove reference to Intel with dpdk docsPadraig Connolly1-1/+1
*Changed configure files to say DPDK instead of Intel DPDK *Changed rpm and deb config files to say DPDK instead of Intel DPDK *Changed vnet Makefile to say DPDK instead of Intel DPDK Change-Id: Ic6e3eacf2341af873d4bd2e036d5afa857ca6355 Signed-off-by: Padraig Connolly <padraig.connolly@intel.com>
2016-11-17dpdk: remove efdDamjan Marion2-26/+0
Change-Id: I761af883403b6740bd24ce196ae0bfe6bc77b408 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-17Fix 4 typosDave Barach1-9/+9
As given, the macro was ignoring its bi0...bi3 arguments, and would only work if the arguments happened to be given as pi0..pi3 Change-Id: I5a8b163fcfc6b8197534d474fcd952b2e8b2694b Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-15threads: add support for multiple worker handoff queuesDamjan Marion3-71/+265
Change-Id: I2452df3c493eeb0a5078d53a230df6906651c057 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-15threads: add assert to silence coverity warningDamjan Marion1-0/+1
Change-Id: I381786b26050f2dfcb4c74094309cf2114d26d85 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-15buffer: clone free_list to each vlib_main on creationDamjan Marion1-0/+29
Currently only packet-generator is creating free_lists during runtime. This avoids crash when buffer is freed on different worker thread. Change-Id: If2ae066a12cf7c4b3267d56d8566806f31cf7ffc Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-09threads: don't wait for dpdk init in vpp_liteDamjan Marion1-1/+3
Change-Id: I110cdc3cc2a26aa36dc250302a6f26db2d884e08 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-08pg: maintain per-worker bitmap of enabled streamsDamjan Marion1-0/+12
Change-Id: I38e476c8080faa5a8647ce6be5a71090e0aa8d5b Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-08pg: support for packet generator on different worker threadsDamjan Marion1-0/+23
New Debug CLI: packet-generator new { worker X } Change-Id: I71499733a29b49cd36d753d54846d2553af6d024 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-04vlib: fix cacheline alignement in several structsDamjan Marion1-7/+7
sizeof(vlib_frame_queue_t) was 208 bytes so non-zero elements of array were not aligned with cacheline. Change-Id: I626615cb64fe9aa86122881a1fff1c5bcca1ec20 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-04feature: store arc index in vlib_bufferDamjan Marion3-8/+8
Previos implementation imposed a limit that node can be member of only one feature arc as feature arc index was stored in node runtime. Now start node stores index into vlib_buffer_t and feature nodes are taking it from there. Change-Id: I252841083bc292af7ed36bf1ac652f2b8c16bfb8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-03vlib: add vlib_buffer_copy functionDamjan Marion1-0/+72
It works with and without DPDK so it allws us to enable lawful-intercept code in vpp_lite images. Change-Id: I08f234cbc652c3ff47a6123a43b9e7f8bdcd5534 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-03Reset frame length after dispatch when recycling framesDave Barach1-0/+1
Fixes a gross bug when enqueuing x->x->error-drop or similar Change-Id: Ie1dc10371de4a265f5131b67cab7a62ed460a1fc Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-01feature: add new feature handling code and device-input featuresDamjan Marion2-0/+4
Signed-off-by: Damjan Marion <damarion@cisco.com> Change-Id: I010ecde93863dbdad84b993cd3680a5446db59b5
2016-11-01vppinfra: add STATIC_ASSERT macroDamjan Marion1-1/+2
Change-Id: Icc4e74ae1627c5b97746ed64955a3dc089e3998f Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-01node: ensure that vlib_node_runtime_t is cacheline sizedDamjan Marion3-7/+9
Change-Id: Ib14ba63d09212a172fe52b01131404bf50cc494d Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-27Per-packet IPFIX record generation pluginDave Barach1-0/+3
Change-Id: Ia790aa018e70d67ed343e3e466d1b33b22560fc0 Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-26dpdk: remove support for dpdk 16.04Damjan Marion1-37/+0
This also removes old DPDK vhost-user code which doesn't help much with DPDK 16.07 or newer. Change-Id: Ic996df1eaccc33acd3fa6cabeaf7381a672c2a90 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-21Quad-loop ip4_lookup_inline, add _x4 validate buffer enqueueDave Barach1-0/+86
Change-Id: I80a25fa90d8a65db619b8697cede2b98bed37cea Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-13Add clib_mem_alloc_or_null(...)Dave Barach1-1/+2
Change-Id: I5177d6d3349384beb551b4f2f52b30b044ce335b Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-13vpp_lite: add cpu pinning support (VPP-467)Pavel Kotucek4-31/+62
Proper cpu pinning in vpp_lite platform, like in normal vpp image. Extended “show threads” command to show propper information. Changed handling of coreID and socketID for threads in "show threads" CLI, pthread_getaffinity is used instead of info stored in DPDK. Change-Id: Ic8299ec5e284472bb10a37a95fadeed57b6edae8 Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-10-07unicast RPF for FIB2.0Neale Ranns1-16/+22
In a heirarchical FIB performing a unicast RPF check would require the traversal of the data-plane graph to seek out all the adjacency objects and then read those to find their interface. This is not efficient. Instead, for each path-list we construct a list of unique input interfaces and link this uRPF-list against the entry in the prefix table. In the data-plane the uRPF list can be retrieved from the load-balance lookup result and the RPF check is a simple and efficient walk across the minimal interface list. The uRPF-list is maintained as the routing heirarchy changes, in a similar way to the data-plane object graph. We also provide a knob to allow an arbitrary prefix to pass the loose check. Change-Id: Ie7c0ae3c4483ef467cfd5b136ee0315ff98ec15b Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-09-27Fix hugepage detection issueDamjan Marion2-0/+35
Per-numa free hugepages number was not read correctly due to wrong sysfs path. Change-Id: I889111027d7f93c42e2e4673d8d4e8f75ae065b6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-27Scheduler policy & priority config, few minor fixes (VPP-425)Pavel Kotucek2-20/+21
- scheduler-prio -> scheduler-priority - improve formatting of "show threads" output - add description to "startup.conf" - bail out of priority is set without rr or fifo policy Change-Id: Idf897f7603d989d6c2d0093eea89c5d1653eaa8c Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-09-27VPP-425: Scheduler policy & priority configurationPavel Kotucek3-4/+100
Add ability to hadle scheduling policy and priority via config file. CPU section contains new items to specify scheduling policy and priority: cpu { scheduler-priority <num> scheduler-policy [other | batch | idle | fifo | rr ] } Change-Id: Ie20765280e458e1d7deb4a8c66daaa69793f795e Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-09-21Refactor pre-Doxy siphon scripts; VPP-396Chris Luke4-3/+94
- Modularize the code to make the Siphon process easier to maintain. - Move much of the output rendering into Jinja2 templates. - Add syscfg siphon type for startup config documentation. - Add sample syscfg documentation. - Add clicfg and syscfg preamble docs, adapted from their wiki pages. - Fix sorting of CLI items across multiple directories. Change-Id: Ib8288fe005adfea68ceed75a38ff8eba25d3cc79 Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-09-20Added volatile to local variables needed by setjmpEyal Bari1-2/+2
Function vlib_main uses nonlocal control transfer (setjmp, longjmp), local variables might be mapped to cpu registers which might be different when longjmp'ing back to it. Added volatile to keep those variables on the stack. to fix vpp crash when exiting via SIGTERM. Change-Id: I03e836966c68a966a84d635bc1f7b3a3c252f3ea Signed-off-by: Eyal Bari <ebari@cisco.com>
2016-09-13Use the correct thread stack alignment constraint, VPP-401Dave Barach1-2/+6
Change-Id: Ia7837dfaa9ed200145aeea19177fe549ab4bd087 Signed-off-by: Dave Barach <dave@barachs.net>
2016-09-07Avoid use of node index 0 by registering null-nodeDamjan Marion1-0/+29
In some cases it is convenient to use 0 as an invalid node index so here we make sure that index 0 is not used. Change-Id: I5af6bef6769d56086ceb343423185f22843732bd Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-06Add support for input nodes in interrupt mode on the worker threadsDamjan Marion1-0/+24
Change-Id: Ice2e0e60c801bd6fb67f3a544e95e9ffaa22ca16 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-06VPP-346 More VPP doc fixesChris Luke5-7/+23
- Fix issue in Doxy dependency check when nothing needs to be installed. 'set -e' and plain '[]' logic don't mix well. - Fix Makefile snafu when building Doxy output for a single file. - Include only one of vnet/vnet/buffer.c/dpdk_buffer.c in docs depending on DPDKness. This could do with some improvement in future, eg to properly align the pre-doxy steps with what Doxy does. - Fix rendering of 'inline' tag in Doxygen by having it interpret always_inline as "inline static". - Bunch of duplicate CLI command structure names that confused docs and may one day have caused debugging issues. - Several other Doxygen syntax issues fixed, like documenting non-existant parameters (usually just the wrong parameter name, typos, etc) Change-Id: Ia8cca545e5de9f8750602bffa3c4548acc8971aa Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-08-31VPP-221 CLI auto-documentation infrastructureChris Luke3-40/+149
As a step before Doxygen, extract CLI-related struct initializers from the code and parse that into a summary of the CLI commands available with the provided help text, such as it is. At the moment this only renders this into an indexed Markdown file that Doxygen then picks up but later we can use this information to enrich the existing VLIB_CLI_COMMAND macro documentor as well as provide runtime documentation to VPP that is stored on disk outside the binary image. Additionally support a comment block immediately prior to VLIB_CLI_COMMAND CLI command definitions in the form /*? ... ?*/ that can be used to include long-form documentation without having it compiled into VPP. Examples of documenting CLI commands can be found in vlib/vlib/unix/cli.c which, whilst not perfect, should provide a starting point. Screen captures of sample output can be seen at https://chrisy.flirble.org/vpp/doxy-cli-example.png and https://chrisy.flirble.org/vpp/doxy-cli-index.png . Next, shift the Doxygen root makefile targets to their own Makefile. The primary reason for this is that the siphon targets do dependency tracking which means it needs to generate those dependencies whenever make is run; that is pointless if we're not going to generate any documentation. This includes the package dependencies since they since they sometimes unnecessarily interfere with the code build in some cases at the moment; later we will look to building a Python venv to host the Python modules we use. One final remark: In future we may consider deprecating .long_help in the VLIB_CLI_COMMAND structure entirely but add perhaps .usage_help. .short_help would be reserved for a summary of the command function and .usage_help provide the syntax of that command. These changes would provide great semantic value to the automaticly generated CLI documentation. I could also see having .long_help replaced by a mechanism that reads it from disk at runtime with a rudimentary Markdown/Doxygen filter so that we can use the same text that is used in the published documentation. Change-Id: I80d6fe349b47dce649fa77d21ffec0ddb45c7bbf Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-08-23Fix PCI vendor_id/device_id detection for SR-IOV devicesDamjan Marion3-12/+25
Change-Id: I06ae392c7c8c3b4be7fd46560add442f42927c22 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-17Coding standards cleanup - remove trailing whitespace, fixes VPP-332Damjan Marion2-10/+10
Change-Id: I649a17f8fa47599faf438b2e596f53761790d10c Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-12VPP-237: indent fixes in prep for checkstyleEd Warnicke10-99/+121
Ran indent *twice* Change-Id: If9c18b81983bb859cc8dc3b415c67cbf318fc618 Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-08-12VPP-223 Add doxygen tags to counter.hDave Barach1-58/+118
Change-Id: Ifddf37db04b2ecfa7b470cd52e8eaa2211823f3d Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-11VPP-223 Document vlib cooperative multi-tasking threadsDave Barach2-2/+173
Change-Id: I283963b004ed6d91133e7e36811f75834280bbe7 Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-10VPP-189 Fix coverity warningsDave Barach1-0/+1
Change-Id: Iea6d338e60a95f7f30c10c2e751d4827e816f700 Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-09VPP-189 Fix Coverity warningsDave Barach2-5/+12
Remove a bunch of historical SMP code that we're not using; clean up coverity warnings as a side-effect. Change-Id: Ic80d2f87c7fd4e654078cac23ad5ec287a1d7ffe Signed-off-by: Dave Barach <dave@barachs.net>