aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp
AgeCommit message (Collapse)AuthorFilesLines
2021-10-13docs: convert vpp doc md->rstNathan Skrzypczak4-151/+203
Type: improvement Change-Id: If453321785b04f9c16e8cea36fb1910efaeb2c59 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-10-11vat: move memset after initFilip Tehlar1-1/+1
Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Ia65fd2f99dfe6538411c247aeb9691c590c2e00b
2021-10-05build: don't hardcode triplet, allow specifying custom lib dirDamjan Marion2-4/+4
Type: fix Change-Id: I33f364fda88914f88f9b976cb83e6d3ff466f0bb Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
2021-09-28misc: vpe.api messages dynamically allocatedOle Troan9-1927/+116
This is the last in the series of moving API messages from vpp/api/vpe.api to vlibmemory/memclnt.api. This patch makes the remaining vpe.api messages dynamic, to help VAT2 binary-api command. Moves the VAT test code to a separate file and removes the now unnused API meta files. Type: improvement Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I01dd78eaff1d3715dff17d2643bf0f7f0089935b Signed-off-by: Ole Troan <ot@cisco.com>
2021-09-28stats: add name vectors to prometheus exporter outputAlexander Chernavin1-0/+9
Type: improvement Counters are labeled with interface indices in the Prometheus exporter output. For example: # TYPE _if_drops counter _if_drops{thread="0",interface="0"} 0 _if_drops{thread="0",interface="1"} 0 _if_drops{thread="0",interface="2"} 2112 [..] Currently, it's unable to map interface indices to the interface names using only output provided by the Prometheus exporter. However, this mapping is present in the vpp_get_stats output: # vpp_get_stats dump /if/names [0]: local0 /if/names [1]: GigabitEthernet0/8/0 /if/names [2]: GigabitEthernet0/9/0 /if/names [..] With this change, add name vectors to Prometheus exporter output as info metrics. Thus exposing interfaces and their indices: # TYPE _if_names_info gauge _if_names_info{index="0",name="local0"} 1 _if_names_info{index="1",name="GigabitEthernet0/8/0"} 1 _if_names_info{index="2",name="GigabitEthernet0/9/0"} 1 [..] Signed-off-by: Alexander Chernavin <achernavin@netgate.com> Change-Id: Iff86c4d6fea8805e71fb04fccf278bae855e88d1
2021-09-27misc: api move continuedFlorin Coras2-41/+0
Move control ping and change dependencies from vpe.api_types to memclnt.api_types Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I9f8bc442e28738c48d64d1f6794082c8c4f5725b
2021-09-27misc: move part of vpe apis to vlibmemoryFlorin Coras3-595/+17
VPE apis are actually vlib apis. This moves those that are not tightly coupled with vapi to vlib_api Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I456a64ce49a0cdeff4a0931c6ea513cb639f683e Signed-off-by: Ole Troan <ot@cisco.com>
2021-09-23stats: revert stat_validate_counter_vector3 non-staticRay Kinsella2-4/+1
This reverts commit c30157811e4c8e870d2680b08ecd3a38dff2d53b. Type: refactor Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Id011c8e5acb1613e09fd339ce614159c0acd651a
2021-09-22vppinfra: make default hugepage size configurableDamjan Marion2-0/+10
i.e. memory { default-hugepage-size 1G } Type: improvement Change-Id: I822afb51712ae92f4e4992b8ffa33dcb15ccaef1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-09-17build: use GNUInstallDirs install destinationsNick Brown1-3/+3
So as to be compliant with distribution layouts, as recommend by: https://cmake.org/cmake/help/latest/command/install.html#installing-files Type: make Change-Id: Ic46ace4f26aab1aa4902cbd013c40a92c480680d Signed-off-by: Nick Brown <nickbroon@gmail.com>
2021-09-09stats: revert enable/disable segments pollsRay Kinsella3-29/+16
This reverts commit 034bd1067eddb700c6d2bc67974056fe00012310. Type: refactor Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Icce6052d6cf9616f7eac3185b4c9aace234aa59f
2021-08-31stats: enable/disable segments pollsRay Kinsella3-19/+32
Add an enable/disable field to stats segments poll. The is used by the perfmon plugin to only poll for stats on an active bundle. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I6404a7db50d8e922afea5da8ec15fdabe3d97157
2021-08-31stats: stat_validate_counter_vector3 non-staticRay Kinsella2-1/+4
Make stat_validate_counter_vector3 usable outside of stats segement. Is used by the perfmon plugin to allocate a 2-dimension array of values. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: If4be2e14ba718c20bf939d162e580880eab1a6cb
2021-08-11fib: Compiile time option to use 8-8-8-8 stride tries for FIB ratherNeale Ranns1-0/+1
than 16-8-8-8 Type: feature the memory trade-off is: for 8-8-8-8 tries DBGvpp# sh ip fib mtrie mem ipv4-VRF:0 mtrie:8068 hash:3499 totals: mtrie:8068 hash:3499 all:11567 for 16-8-8 DBGvpp# sh ip fib mtrie mem ipv4-VRF:0 mtrie:333056 hash:3499 totals: mtrie:333056 hash:3499 all:336555 Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I5271a4322d786de6e47613cff9bd432762dbed2a
2021-07-29ip: add api test fileFilip Tehlar1-0/+1
Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I49c4183a443b7b39924328900e6a6ac2e09be426
2021-07-13misc: remove vnet_all_api_h and vnet_msg_enumFilip Tehlar1-5/+0
These file are no longer needed Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I34f8e0b7e17d9e8c06dcd6c5ffe51aa273cdec07
2021-07-12session: api cleanupFilip Tehlar1-0/+1
Use autogenerated code. Does not change API definitions. Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Iacc58d27ac51c8a1c571087f98297e046b3477c2
2021-07-02interface: api cleanupFilip Tehlar1-0/+1
Use autogenerated code. Does not change API definitions. Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I189bfcca2d5fa1f37d05a72c92d04bf260343043
2021-07-01ip: api cleanupFilip Tehlar1-0/+1
Use autogenerated code. Does not change API definitions. Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I4b6d881571c158b7a69a78b9680732d090c4f8b5
2021-06-21classify: api cleanupFilip Tehlar1-0/+1
Use autogenerated code. Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Id7d4d23e4fe707f7049828fec44df7ff0419d23c
2021-06-16stats: fix counters name overflowBenoît Ganne1-6/+6
sm_directory_vector_by_name is a C-string hashtable, make sure the names are NULL-terminated. Type: fix Change-Id: If44456ef9da69ed012f2b981b58ce732663af67d Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-06-16api: remove custom dumpFilip Tehlar2-3113/+0
Type: improvement Change-Id: I4b9b2be8817be10e46accc19219deb2b544f266b Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2021-05-21nat: add maximum configured sessions to stat segmentOle Troan1-1/+2
Add /nat44-ed/max-cfg-sessions gauge. Reflects the configured value for configured sessions (per thread). Type: improvement Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I618c8aa0daab0981399cfe9273d191fa1990ef60 Signed-off-by: Ole Troan <ot@cisco.com>
2021-05-06stats: move vector_rate counters into providerOle Troan3-66/+96
Type: improvement Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Iae1fb59a6dc9679c0fa0b87fa5232d551a7995a5
2021-05-06stats: memory heap countersOle Troan4-87/+229
- Add counters for the main-heap - Add additional counters per heap: STAT_MEM_TOTAL STAT_MEM_USED, STAT_MEM_FREE, STAT_MEM_USED_MMAP, STAT_MEM_TOTAL_ALLOC, STAT_MEM_FREE_CHUNKS, STAT_MEM_RELEASABLE, The per-heap counters are organised as a two dimensional vector. total, used and free are directly available via symlinks. vpp_get_stats ls "^/mem/" /mem/stat segment /mem/stat segment/total /mem/stat segment/used /mem/stat segment/free /mem/main heap /mem/main heap/total /mem/main heap/used /mem/main heap/free vpp_get_stats dump "^/mem/main\ heap$" [0 @ 0]: 1073741776 packets /mem/main heap [1 @ 0]: 91586688 packets /mem/main heap [2 @ 0]: 982155088 packets /mem/main heap [3 @ 0]: 0 packets /mem/main heap [4 @ 0]: 1073741776 packets /mem/main heap [5 @ 0]: 433 packets /mem/main heap [6 @ 0]: 981708688 packets /mem/main heap Type: feature Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I36725dde3b4b3befd27a8b4d3ba931f2d3b627cc
2021-05-05api: fix crash in custom dumpPaul Vinciguerra1-1/+1
Change-Id: Iffc52b4f52c235b0b5d13d2b42467cb2be0bf934 Type: fix Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2021-05-04stats: adding symlinks for nodes and interfaces in the stat segmentArthur de Kerhor3-45/+201
A given interface counter (e.g rx) can be accessed via /interfaces/<interface_name>/<counter_name>. Same goes with nodes: /nodes/<node_name>/<counter_name> As interfaces may contain '/' in their names, these are replaced by '_' in symlinks Also added 2 tests for the stat segment Type: feature Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com> Change-Id: I27da252e7b3dc177815616ca46b5c200a456bf0f Signed-off-by: Ole Troan <ot@cisco.com>
2021-05-04dpdk: allow configuration of max-simd-bitwidthRay Kinsella1-0/+3
Enable configuration of DPDK's max-simd-bitwidth through the startup.conf Type: improvement Change-Id: I455148714ffc7caa257931526f310dbefd7ab01c Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
2021-04-30misc: experimental configure scriptDamjan Marion2-5/+62
Type: make Change-Id: Iaeb9d22eec9a7a763b63899814a44e78c8050f1f Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-18vppinfra: remove linux/syscall.hDamjan Marion1-2/+0
For portabiliy reasons it is better to have all wrapped in clib code. I.e. instead of using getcpu() we have clib_get_current_numa_node () and clib_get_current_cpu_id(). Type: refactor Change-Id: I29b52d7f29bc7f93873402c4070561f564b71c63 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-26vlib: split vlib_main_t into global and per-threadDamjan Marion4-12/+4
Type: refactor Change-Id: I8b273bc3bf16aa360f031f1b2692f766e5fc4613 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-26vlib: introduce vlib_get_main_by_index(), vlib_get_n_threads()Damjan Marion2-3/+3
Type: improvement Change-Id: If3da7d4338470912f37ff1794620418d928fb77f Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-11misc: remove cop API support (part 1)Dave Barach1-35/+0
API marked for deprecation last year due to non-inclusive language. Last supported release: 21.01. See the "adl" plugin. Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I931e58ced9cc8403ca5b23fd6b07e50d0ff7306b
2021-02-22api: fix memory leak in vl_api_cli_inband_t_handlerAndrew Yourtchenko1-0/+1
I noticed the memory leak while sending a lot of cli_inband APIs: DBGvpp# memory-trace on main-heap ... send a lot of API cli_inband ... DBGvpp# show memory main-heap Thread 0 vpp_main base 0x7f85c8302000, size 1g, locked, unmap-on-destroy, name 'main heap' page stats: page-size 4K, total 262144, mapped 33129, not-mapped 229015 numa 0: 33129 pages, 129.41m bytes total: 1023.99M, used: 125.78M, free: 898.22M, trimmable: 897.59M Bytes Count Sample Traceback 9751632 145034 0x7f85d01696e8 clib_mem_alloc_aligned_at_offset + 0x80 vec_resize_allocate_memory + 0xa8 _vec_resize_inline + 0x240 va_unformat + 0xe4 unformat + 0x159 vlib_cli_dispatch_sub_commands + 0x11e vlib_cli_input + 0x8f vl_api_cli_inband_t_handler + 0xd9 vl_msg_api_handler_with_vm_node + 0x488 void_mem_api_handle_msg_i + 0x6f vl_mem_api_handle_msg_main + 0x38 vl_api_clnt_process + 0x28d 9723904 145034 0x7f85cd677238 clib_mem_alloc_aligned_at_offset + 0x80 vec_resize_allocate_memory + 0xa8 _vec_resize_inline + 0x240 unformat_init_string + 0x10d vl_api_cli_inband_t_handler + 0xc1 vl_msg_api_handler_with_vm_node + 0x488 void_mem_api_handle_msg_i + 0x6f vl_mem_api_handle_msg_main + 0x38 vl_api_clnt_process + 0x28d vlib_process_bootstrap + 0x5d 0x7f8608b0e038 290077 total traced objects Solution: free the input data structure. Type: fix Change-Id: I42de5572e8760237e793a53c1a94bce65a4ac5fa Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-02-16stats: coverity errors leaking fdOle Troan1-1/+4
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I21368e37d70c5a64babd904bcf5f79339a5ab064 Signed-off-by: Ole Troan <ot@cisco.com>
2021-02-12policer: remove SSE2 prefixBrian Russell1-13/+13
The policer code uses a naming convention of prefixing a lot of its definitions with "SSE2" when in fact there is nothing SSE2 specific about them. This is confusing so remove the prefix. Unfortunately it has to stay in the API definitions for backward compatibility. Type: improvement Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: I59a7df9fd5ded2575f2e587b2768a025a213b07c
2021-02-11policer: use ip dscpBrian Russell1-6/+4
Use the common IP definitions of DSCP rather than duplicating in the policer code. Type: improvement Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: Iff4bc789356edc290b9c31eca33e93cf5b6211bf
2021-01-08vhost: Add event index for interrupt notification to driverSteven Luong1-0/+53
VPP only supports a poor man's approach for interrupt notification to the driver. It uses a simple binary flag for "interrupt needed" or "interrupt not needed". Most drivers support more sophisticated event index already. This feature is to add the long due missing feature and make it configurable, off by default. Type: feature Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I68dab7dd07045cafb49af97b7f70db9b8131ae03
2021-01-07ipsec: Deprecated the old IPsec Tunnel interfaceNeale Ranns1-43/+0
Type: fix it's been 2 releases since it was marked deprecated. Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I0eba7ed607826ed0d00e7d2d8f9b27d09e8e9a6e
2020-12-14misc: refactor clib_bitmap_foreach macroDamjan Marion1-3/+3
Type: refactor Change-Id: I077110e1a422722e20aa546a6f3224c06ab0cde5 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-12-14misc: move to new pool_foreach macrosDamjan Marion2-4/+4
Type: refactor Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-12-14api: add missing version infoPaul Vinciguerra1-0/+1
Type: fix Change-Id: I269214e3eae72e837f25ee61d714556d976d410f Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-12-08fib: Source Address SelectionNeale Ranns1-22/+0
Type: feature Use the FIB to provide SAS (in so far as it is today) - Use the glean adjacency as the record of the connected prefixes = there's a glean per-{interface, protocol, connected-prefix} - Keep the glean up to date with whatever the recieve host prefix is (since it can change) Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Change-Id: I0f3dd1edb1f3fc965af1c7c586709028eb9cdeac
2020-12-04stats: fix coverity issuesAndrew Yourtchenko1-4/+3
Usage of the possibly negative value with subsequent check on it makes coverity very unhappy, so put the check before use. Change-Id: I731fbe6246f9e4212d546fd9277bc1ddcd3c2ec1 Type: fix Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-11-26gre: Move to new API generated types/messagesNeale Ranns1-42/+0
Type: improvement also clean up GRE includes across the code base. Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I90928b0da3927b7ca1a23683aa80d4b53bbf63fd
2020-11-25api: vat2 and json autogeneration for api messagesOle Troan1-0/+7
VAT2: A completely auto-generated replacement of VAT. Reads input message in JSON from stdin and outputs received messages in JSON. A VAT2 plugin is automatically built for a .api file. There no longer a need for a separate _test.c. Example: vat2 show_version {} { "_msgname": "show_version_reply", "retval": 0, "program": "vpe", "version": "21.01-rc0~411-gf6eb348a6", "build_date": "2020-11-19T09:49:25", "build_directory": "/vpp/autogen3" } vat2 sw_interface_dump '{"sw_if_index": -1, "name_filter_valid": 0, "name_filter": ""}' [{ "_msgname": "sw_interface_details", "sw_if_index": 0, "sup_sw_if_index": 0, "l2_address": "00:00:00:00:00:00", "flags": "Invalid ENUM", "type": "IF_API_TYPE_HARDWARE", "link_duplex": "LINK_DUPLEX_API_UNKNOWN", "link_speed": 0, "link_mtu": 0, "mtu": [0, 0, 0, 0], "sub_id": 0, "sub_number_of_tags": 0, "sub_outer_vlan_id": 0, "sub_inner_vlan_id": 0, "sub_if_flags": "Invalid ENUM", "vtr_op": 0, "vtr_push_dot1q": 0, "vtr_tag1": 0, "vtr_tag2": 0, "outer_tag": 0, "b_dmac": "00:00:00:00:00:00", "b_smac": "00:00:00:00:00:00", "b_vlanid": 0, "i_sid": 0, "interface_name": "local0", "interface_dev_type": "local", "tag": "" }] This is the first phase and vat2 is not integrated in packaging yet. Type: feature Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Ib45ddeafb180ea7da8c5dc274a9274d7a4edc876 Signed-off-by: Ole Troan <ot@cisco.com>
2020-11-24buffers: add page-size configNathan Skrzypczak1-0/+5
Type: feature Add a `buffers {page-size}` parameter to specify page size for buffers. This also fixes an issue with the parsing in unformat_log2_page_size. Change-Id: I7d7b1fa0bb7febaa7509cf2c625882f07eeafaad Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2020-11-10vpp: use vpp heap for libcBenoît Ganne3-0/+150
This makes libc use vpp main heap instead of the default libc heap. This gives better visibility (accounting, tracing) on allocations happening in external libraries called from vpp (eg. OpenSSL). Type: feature Change-Id: I5d8a673472145a4e090bedb443b8c58a967d1cca Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-11-04vlib: add postmortem pcap dispatch traceDave Barach1-3/+3
Inspired by a real-life conundrum: scenario X involves a vpp crash in ip4-load-balance because vnet_buffer(b)->ip.adj_index[VLIB_TX] is (still) set to ~0. The problem takes most of a day to occur, and we need to see the broken packet's graph trajectory, metadata, etc. to understand the problem. Fix a signed/unsigned ASSERT bug in vlib_get_trace_count(). Rename elog_post_mortem_dump() -> vlib_post_mortem_dump(), add dispatch trace post-mortem dump. Add FILTER_FLAG_POST_MORTEM so we can (putatively) capture a ludicrous number of buffer traces, without actually using more than one dispatch cycle's worth of memory. Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: If093202ef071df46e290370bd9b33bf6560d30e6
2020-10-21vlib: per-class logging configuration in startup.confDamjan Marion1-0/+2
logging { class avf { rate-limit 200 level debug syslog-level debug } class dpdk/cryptodev { rate-limit 200 level disabled syslog-level disabled } } Type: improvement Change-Id: Iebe49b3ed4dfbfd589e80fcd2f9a63a8fe66b83b Signed-off-by: Damjan Marion <damarion@cisco.com>