aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp/stats
AgeCommit message (Collapse)AuthorFilesLines
2019-04-17Doxygen cleanup.Dave Wallace1-1/+1
- Add subpages definitions in appropriate section (User or Dev docs) for doc files (*.rst, *.md) that being listed at the top level of the generated doc page. - Generate and add API list to RELEASE doc. - Fix list_api_changes script to use HEAD as the endtag so it doesn't need to be changed every release. Change-Id: Iace7b6433359c6b96869cb1db01facbbcb0ac1e6 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-04-12stats: Off by one error in stats directory vector.Ole Troan1-1/+1
Change-Id: Ic75af8bbd52c8a08e34ff2a847f60be5479b814b Signed-off-by: Ole Troan <ot@cisco.com> (cherry picked from commit 1c9a58decd525ad46487b120642883089fb5758f)
2019-04-02stat-segment: scaling improvementNeale Ranns2-10/+33
don't walk the entire list of entries each time a new one is added approximate/indicative numbers recorded on a VM: after: 50000 tunnels in 1.124443 secs, 44466.45 tunnels/sec before: 50000 tunnels in 5.202779 secs, 9610.25 tunnels/sec Change-Id: Ie1155416be76f55f2a0a88360ce53e15aeace785 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-01stats: Add node names in /sys/nodes/namesOle Troan2-1/+31
Change-Id: I9c92d51cc0e9dccf3c3726c4de8d7f15537778c9 Signed-off-by: Ole Troan <ot@cisco.com>
2019-02-28stats: Add interface name to sw_if_index as /if/namesOle Troan2-10/+72
Expose interface name to sw_if_index table as a directory node in the stats segment. Change-Id: Ie50e4af01997d141880f02e3a8496bfeb91b9944 Signed-off-by: Ole Troan <ot@cisco.com>
2019-02-26stats: buffer gauge callbacks use index instead of name.Ole Troan2-13/+25
Change-Id: I500b8e72d7e021b9564dad0ffc087cb0e1ceb96f Signed-off-by: Ole Troan <ot@cisco.com>
2019-02-22stats: add buffer gaugesFilip Tehlar2-7/+48
Change-Id: I7f7a459f25d64ea5fa36e30d7dccc667bc19c5a9 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2018-12-19Stats: Updated wrong slot on new vectorOle Troan1-1/+0
Change-Id: Ibf6008fd4e780a8c6fa676c7f7ba2f1cd98e72a9 Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-17stats: Deprecate old stats frameworkOle Troan3-3882/+0
Change-Id: Iecdf0e5767115ef0570e9ea7212dc4644cf4afbd Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-16IP6-MFIB: replace the radix tree with bihash (VPP-1526)Neale Ranns1-2/+2
Change-Id: I7a48890c075826fbd8c75436dfdc5ffff230a693 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-26stats: Remove unneeded dependencies in stat_clientOle Troan2-13/+2
Remove exposing stat_client_main internals and atomics to simplify use from C++. Change-Id: Ie864170fee8b4eaa2fd7f98556cf0ebb46cb1a2a Signed-off-by: Ole Troan <ot@cisco.com>
2018-11-16VPP-1496 Cleanup stats socket on exit.Paul Vinciguerra1-0/+16
Stats socket not cleaned up on exit. vagrant@vpp:/tmp/vpp-failed-unittests/vpp-unittest-VCLCutThruTestCase-clRggF-FAILED$ ls -ltr total 104 srwxrwxr-x 1 vagrant vagrant 0 Nov 14 18:21 stats.sock Change-Id: I8126e70da2983222ca430aa280f3b9e45eea7ca4 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-10-23c11 safe string handling supportDave Barach1-5/+5
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-22Fix stat_segment.c issue.Paul Vinciguerra1-5/+8
* using default socket name even when overridden in config. Change-Id: I1849bf5269629873afd1dd48d2df785a491781c3 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-10-19vppinfra: add atomic macros for __sync builtinsSirshak Das1-1/+1
This is first part of addition of atomic macros with only macros for __sync builtins. - Based on earlier patch by Damjan (https://gerrit.fd.io/r/#/c/10729/) Additionally - clib_atomic_release macro added and used in the absence of any memory barrier. - clib_atomic_bool_cmp_and_swap added Change-Id: Ie4e48c1e184a652018d1d0d87c4be80ddd180a3b Original-patch-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Sirshak Das <sirshak.das@arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com> Reviewed-by: Steve Capper <steve.capper@arm.com>
2018-10-02VPP-1440: clean up coverity warningsDave Barach1-0/+1
Change-Id: Ic6823fb617ecae547a5f0e28b1e037848e40f682 Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-28stats: Split stat_segment and stats code in preparation for deprecation.Ole Troan4-106/+145
Split the stat_segment.c code from stats.c. Rename stats.[ch] to prepare for removing (19.01?) In addition stats.api can be removed. Since the stats aggregation for the stat segment does not use the API, that part is now done on the main thread. (Old stats aggregator is also left in place). Change-Id: I9867429f4fc547b1a7ab7f88bc4f3625428d681b Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-27Trivial: Cleanup some typos.Paul Vinciguerra2-4/+4
This is a new commit for code under a different maintainer. Change-Id: I79fa403fec6a312238a9a4b18b35dbcafaa05439 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-09-20UDP-Encap: name counters for the stats segmentNeale Ranns1-3/+1
change the ADD api so that is returns the 'ID' that can be used by the client to read the stats from the stats segment and to delete the object. Previously a similar value used required to be chosen by the client, now VPP allocates one (like it does e.g. for interfaces) Change-Id: I563cf6092276eb990c52d5457c86e72546bcf69e Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-18STATS: First go at documentationOle Troan1-0/+129
Change-Id: I4d586456c46994b60ff7670d1411997a3615a284 Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-17STATS: Dynamically mapped shared memory segmentOle Troan4-353/+388
Move from using a hash to a vector with offsets into shared memory. Limit exposure of VPP data structures and include files to external stats library and applications. Change-Id: Ic06129f12d10cf4c4946a86d9bc734eacff2c7da Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-30Crude stat segment lock recoveryDave Barach1-14/+24
Make sure that vpp_get_stats main heap does not address-collide with the stats segment, which lands "somewhere" in the vpp address space. Add mising MAP_ANONYMOUS flag in clib_mem_vm_map Change-Id: I8a671d174eefd8dd24771ad2ed9f1250e2c7a9f8 Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-29STATS: stat_client updates.Ole Troan2-4/+18
New stat segment client library: vpp-api/client/stat_client.h New stat segment query app: vpp_get_stats [ls | dump | poll ] <pattern ...> Prometheus integration through: vpp_prometheus_export <pattern> Change-Id: I6f370cf599e9fcf066f22965a62d3a8acd529994 Signed-off-by: Ole Troan <ot@cisco.com>
2018-07-26VPP-1359 Wrong vl_msg_idLukasz Majczak1-1/+1
Wrong vl_msg_id set in vl_api_stats_get_poller_delay_t_handler while reporting stats delay. Change-Id: I7d6ad14359e41c717b976390c58e254e3602e0ff Signed-off-by: Lukasz Majczak <lma@semihalf.com>
2018-07-18Add config option to use dlmalloc instead of mheapDave Barach1-2/+2
Configure w/ --enable-dlmalloc, see .../build-data/platforms/vpp.mk src/vppinfra/dlmalloc.[ch] are slightly modified versions of the well-known Doug Lea malloc. Main advantage: dlmalloc mspaces have no inherent size limit. Change-Id: I19b3f43f3c65bcfb82c1a265a97922d01912446e Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-12stats-segment: add startup node serialization optionFlorin Coras2-1/+7
Node serialization is turned off by default. To enable it do: statseg {serialize-nodes on} Change-Id: I53bba3cab517bd3ba90eba52d94b3ebb16870141 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-05add stat segment size configurationDave Barach2-1/+29
Change-Id: I395ff9c91d670a9f9e50dc1b030e0412b7234de5 Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-29VPP-1324 SIGSEGV vl_msg_api_handler_with_vm_node()Lukasz Majczak2-11/+21
Increase local arrays sizes to the correct number and gather missing statistics. Change-Id: If44d43f258730e9a18f50fb59fc526c214d2be8a Signed-off-by: Lukasz Majczak <lma@semihalf.com>
2018-06-21BIER neighbor statsNeale Ranns3-47/+207
Change-Id: I2f638f1932b4aeddf2408c06d1b8393551675b72 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-06-15STATS: Separate socket for fd exchange.Ole Troan3-56/+71
stats { interval <no> socket-name <name> | default } Where the default socket is in /run/vpp/stats.sock Change-Id: Idd501b328c662804d4ccd58034b0ea6b8aa1f89a Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-15STATS: Add more hierarchy to counters.Ole Troan1-4/+4
Put error counters under node_index. /err/<node-name>/<error-name> E.g: /err/ip4-lookup/Hash table collisions /err/ip6-rewrite/Buffer allocation error Error names are not globally unique, and this allows for walking all errors for a particular node. Put interface counters under the directory /if. E.g. /if/rx Put system counters under the directory /sys. E.g. /sys/vector_rate Change-Id: I5b794d16698f61bcb2063a8cd77a7c4ae36419b8 Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-14Use __attribute__((weak)) references where necessaryDave Barach1-4/+2
It should be possible to use vlib without the vlibmemory library, etc. Change-Id: Ic2316b93d7dbb728fb4ff42a3ca8b0d747c9425e Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-13Stat segment / client: show run" works nowDave Barach3-51/+161
Seems to have minimal-to-zero performance consequences. Data appears accurate: result match the debug CLI output. Checked at low rates, 27 MPPS sprayed across two worker threads. Change-Id: I09ede5150b88a91547feeee448a2854997613004 Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-10Don't use foreach_vlib_main macro w/out barrier syncDave Barach1-4/+8
It should be OK to scrape dispatch stats without forcing a barrier sync. Scrape the stats manually. We'll see what happens. Change-Id: Ia20b51ea12ed81cce76e1801401bad0edd0645bb Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-08Add reaper functions to want events APIs (VPP-1304)Neale Ranns1-14/+66
Change-Id: Iaeb52d94cb6da63ee93af7c1cf2dade6046cba1d Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-06-08export counters in a memfd segmentDave Barach4-11/+519
also export per-node error counters directory entries implement object types Change-Id: I8ce8e0a754e1be9de895c44ed9be6533b4ecef0f Signed-off-by: Dave Barach <dave@barachs.net>
2018-04-24mem-leak in stats handling (VPP-1250)Neale Ranns1-4/+18
Change-Id: I55f978c84a56bc089e5657c528195b6c84409364 Signed-off-by: Neale Ranns <neale.ranns@cisco.com> (cherry picked from commit df53f5fda277a035984f1de4474f0b58ae15b114)
2018-04-04Detailed stats collection featureNeale Ranns1-12/+20
Use device-input and interface-output feautre arcs to collect unicast, multicast and broadcast states for RX and TX resp. Since these feature arcs are present only for 'physical' interfaces (i.e. not su-interfaces) counter collection is supported only on parent interface types. Change-Id: I915c235e336b0fc3a3c3de918f95dd674e4e0e4e Signed-off-by: Neale Ranns <nranns@cisco.com> Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-03-21UDP Encap countersNeale Ranns3-2/+183
Change-Id: Ib5639981dca0b11b2d62acf2c0963cc95c380f70 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-16stats: allow configuring poller delayKlement Sekera2-3/+98
This introduces a startup config option for configuring stats poller delay. Use `stats { interval <seconds> }` to configure the delay at startup. The default value remains unchanged - 10 seconds. Change-Id: If12cb1f7f6f1f8ecfa461561bc77847cdf260388 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-03-06API: Add service definitions for events and singleton messages (second attempt)Marek Gradzki1-0/+95
Based on https://gerrit.fd.io/r/#/c/10920/ Updates service definition in stats.api with correct reply message names. Change-Id: I3282bee5304e667e23bc1fab3f43d967a50d880d Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-03-05Revert "API: Add service definitions for events and singleton messages."Ole Trøan1-95/+0
This reverts commit f7b7fa53b7eaec81d8c00c1023fb7d01f1f9761f. Change-Id: I87496342943248e94f01ada31459f387c0a3a610 Signed-off-by: Ole Troan <ot@cisco.com>
2018-03-05API: Add service definitions for events and singleton messages.Ole Troan1-0/+95
Change-Id: I7de987c30b263d43521e6280c5273f30b5f6e11c Signed-off-by: Ole Troan <ot@cisco.com>
2018-01-23VPPAPIGEN: vppapigen replacement in Python PLY.Ole Troan1-1/+1
This is a version of the VPP API generator in Python PLY. It supports the existing language, and has a plugin architecture for generators. Currently C and JSON are supported. Changes: - vl_api_version to option version = "major.minor.patch" - enum support - Added error checking and reporting - import support (removed the C pre-processor) - services (tying request/reply together) Version: option version = "1.0.0"; Enum: enum colours { RED, BLUE = 50, }; define foo { vl_api_colours_t colours; }; Services: service { rpc foo returns foo_reply; rpc foo_dump returns stream foo_details; rpc want_stats returns want_stats_reply events ip4_counters, ip6_counters; }; Future planned features: - unions - bool, text - array support (including length) - proto3 output plugin - Refactor C/C++ generator as a plugin - Refactor Java generator as a plugin Change-Id: Ifa289966c790e1b1a8e2938a91e69331e3a58bdf Signed-off-by: Ole Troan <ot@cisco.com>
2018-01-17stats: Fix per interface statsMohsin Kazmi2-150/+115
Change-Id: I94618933719abb6ada1272bcf76f4f5304043873 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-01-11api: fix handlers that explicitly depend on svm queueFlorin Coras1-48/+48
Fixes the remainig apis that explicitly check svm queue length. Change-Id: I6055c7c50050affee3098e162e15fb12c205e5db Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-11api: remove transport specific code from handlersFlorin Coras1-78/+77
This does not update api client code. In other words, if the client assumes the transport is shmem based, this patch does not change that. Furthermore, code that checks queue size, for tail dropping, is not updated. Done for the following apis: Plugins - acl - gtpu - memif - nat - pppoe VNET - bfd - bier - tapv2 - vhost user - dhcp - flow - geneve - ip - punt - ipsec/ipsec-gre - l2 - l2tp - lisp-cp/one-cp - lisp-gpe - map - mpls - policer - session - span - udp - tap - vxlan/vxlan-gpe - interface VPP - api/api.c OAM - oam_api.c Stats - stats.c Change-Id: I0e33ecefb2bdab0295698c0add948068a5a83345 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-09api: refactor vlibmemoryFlorin Coras2-52/+51
- separate client/server code for both memory and socket apis - separate memory api code from generic vlib api code - move unix_shared_memory_fifo to svm and rename to svm_fifo_t - overall declutter Change-Id: I90cdd98ff74d0787d58825b914b0f1eafcfa4dc2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-12-12Stats for Multicast FIBNeale Ranns4-11/+448
Change-Id: I46b4aeb6ec9ab6ee462f9c5074b5778d94bf8dc3 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-12-06UT: Repaired broken C unit tests (--enable-tests)Ole Troan2-5/+2
Change-Id: I63d720378b92813993525f80fee90fc79df27fba Signed-off-by: Ole Troan <ot@cisco.com>