summaryrefslogtreecommitdiffstats
path: root/src/vpp
AgeCommit message (Collapse)AuthorFilesLines
2019-07-24api: binary api cleanupDave Barach1-3/+17
Multiple API message handlers call vnet_get_sup_hw_interface(...) without checking the inbound sw_if_index. This can cause a pool_elt_at_index ASSERT in a debug image, and major disorder in a production image. Given that a number of places are coded as follows, add an "api_visible_or_null" variant of vnet_get_sup_hw_interface, which returns NULL given an invalid sw_if_index, or a hidden sw interface: - hw = vnet_get_sup_hw_interface (vnm, sw_if_index); + hw = vnet_get_sup_hw_interface_api_visible_or_null (vnm, sw_if_index); if (hw == NULL || memif_device_class.index != hw->dev_class_index) return clib_error_return (0, "not a memif interface"); Rename two existing xxx_safe functions -> xxx_or_null to make it obvious what they return. Type: fix Change-Id: I29996e8d0768fd9e0c5495bd91ff8bedcf2c5697 Signed-off-by: Dave Barach <dave@barachs.net> (cherry picked from commit 3940de36728b768574a3e998389bb90d55f690d1)
2019-06-21stats: fix memory leakage when adding / deleting interfacesOle Troan1-10/+26
This fixes two leaks in registering errors in the stats segment. - The error name created by vlib_register_errors() was not freed. - Duplicate error names (when interface readded) was added to the vector. Change-Id: If5fe371e8059cf6678fc785cbf673707b4f4a655 Type: fix Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-06Fix stat seg average vector rate computationDave Barach2-14/+53
Add the number of worker threads and per worker thread vector rates to the stats segment. Change-Id: I3040108ec9fcdf5fdb6b9a950060dea9b3c88fd1 Signed-off-by: Dave Barach <dbarach@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net> (cherry picked from commit f89a6de8f032536080c4a11b267bf921093d3740)
2019-05-03mp_safe SW_INTERFACE_DUMP, SW_INTERFACE_DETAILS, SW_INTERFACE_TAG_ADD_DEL,Steven Luong1-0/+2
BRIDGE_DOMAIN_DUMP, CONTROL_PING, CONTROL_PING_REPLY, and show interface CLI Change-Id: I2927573b66bb5dd134b37ffb72af0e6676750917 Signed-off-by: Steven Luong <sluong@cisco.com> (cherry picked from commit 15c31921a628c5500cbed2ebc588d7ddbaa970a3)
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-04-02IPSEC: tunnel scaling - don't stack the inbould SANeale Ranns2-4/+47
Change-Id: I0b47590400aebea09aa1b27de753be638e1ba870 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-29IPSEC-GRE: fixes and API update to common types.Neale Ranns1-10/+8
Change-Id: Icdcbac7453baa837a9c0c4a2401dff4a6aa6cba0 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-25vxlan-gbp: Add api custom-dumpMohsin Kazmi1-0/+52
Change-Id: I1cb391c56463a770d874b2bfc8a0b7f6909ba55a Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-03-15Revert "API: Cleanup APIs interface.api"Ole Trøan1-18/+17
This reverts commit e63325e3ca03c847963863446345e6c80a2c0cfd. Allow time for CSIT to accommodate. Change-Id: I59435e4ab5e05e36a2796c3bf44889b5d4823cc2 Signed-off-by: ot@cisco.com
2019-03-15API: Cleanup APIs interface.apiJakub Grajciar1-17/+18
Use of consistent API types for interface.api Change-Id: Ieb54cebb4ac96b432a3f0b41596718aa2f34885b Signed-off-by: Jakub Grajciar <jgrajcia@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 Troan3-10/+81
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>
2019-02-06buffers: make buffer data size configurable from startup configDamjan Marion1-0/+4
Example: buffers { default data-size 1536 } Change-Id: I5b4436850ca18025c9fdcfc7ed648c2c2732d660 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-30Use IP and MAC API types for neighborsNeale Ranns4-51/+85
use address_t and mac_address_t for IPv6 and ARP entries and all other API calls in ip.api aprat from the route ones, that will follow in a separate commit Change-Id: I67161737c2184d3f8fc1e79ebd2b55121c5b0191 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-30buffers: major cleanup and improvementsDamjan Marion1-5/+7
This patch introduces following changes: - deprecated free lists which are not used and not compatible with external buffer managers (i.e. DPDK) - introduces native support for per-numa buffer pools - significantly improves performance of buffer alloc and free Change-Id: I4a8e723ae47056717afd6cac0efe87cb731b5be7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-25deprecate tapcliDamjan Marion2-71/+0
Change-Id: I82dceaa27a7b0c96de077cf283e4f64aa426f271 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-22virtio: Add api support in vatMohsin Kazmi1-0/+44
Change-Id: I46ec5ba03d61c1fe0aba92f649f43746b5292cc3 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-01-21cmake: fix missing install() lines for startup.conf and 80-vpp.confDamjan Marion1-0/+3
Change-Id: I5bbd44fb1ce5923350bcf1a42b1d85131eaa3747 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-18Look for plugins in target triplet subdirDamjan Marion1-2/+4
Change-Id: I3bab0ab05b4f552ad64392439fb48409ab0ab8c0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-13bonding: support custom interface IDsAlexander Chernavin1-2/+4
Change-Id: I78fe58144fa3ba2e1c7135897a13a2541f235c91 Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2019-01-11Fix custom-dump for gre_add_del_tunnel: src and dst IPsIgor Mikhailov (imichail)1-7/+4
Change-Id: I747ca01dc8df9fb5e11168ec46979c4a1f1baa7c Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2019-01-07L2 BD API to flush all IP-MAC entries in the specified BDJohn Lo1-0/+12
Implement API/CLI to clear IP-MAC tables used for ARP-termination in the specified bridge domain. The CLI to flush MAC IP tables for a BD is: set bridge-domain arp entry <bd-id> del-all The API added is bd_ip_mac_flush. Change-Id: I34ceb87c0f480c7102f6559312c24081ed485af8 Signed-off-by: John Lo <loj@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-19dpdk plugin: blacklist PCI devices by typeDave Barach1-4/+5
Change-Id: I89695c1ad47131ed830f35c677937ce12025a40d Signed-off-by: Dave Barach <dave@barachs.net>
2018-12-18PAPI: Add MACAddress object wrapper for vl_api_mac_address_tOle Troan1-2/+2
Change the definition of vl_api_mac_address_t to an aliased type. Change-Id: I1434f316d0fad6a099592f39bceeb8faeaf1d134 Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-17stats: Deprecate old stats frameworkOle Troan8-4199/+1
Change-Id: Iecdf0e5767115ef0570e9ea7212dc4644cf4afbd Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-17String type: Not include \0 in show_versionOle Troan1-5/+4
The string type does not include the \0 in strings. Change-Id: I869f438b84880df40a018e43b4510194d84ce0fe 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-12-14String type: Fix off by one errorOle Troan1-1/+2
String is not sent nul terminated across API. The hardest two problems in computer science is cache invalidation naming and off by one errors. Change-Id: I36f1952ca955cb2d9dfb4c8120ec48c50ba17991 Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-13API: Use string type instead of u8.Ole Troan4-22/+38
The new string type is modelled after string in proto3. It is always variable length. Change-Id: I64884067e28a80072c8dac31b7c7c82d6e306051 Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Michal Cmarada <mcmarada@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-07VPP-1506: dump local punts and registered punt socketsPavel Kotucek1-7/+7
Change-Id: If7835e9b80ec9402404bfc8d271eb11a10ef992b Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
2018-12-06API: Change ip4_address and ip6_address to use type alias.Ole Troan1-4/+4
Change-Id: Id8669bbadd1d6b2054865a310a654e9b38d1667d Signed-off-by: Ole Troan <ot@cisco.com>
2018-11-28dpdk: allow interface name to be specified from startup.confDamjan Marion1-0/+5
Example: dpdk { dev 0000:01:00.0 { name eth0 } dev 0000:02:00.0 { name eth1 } } Change-Id: I11e60e969a7e3548c99ac0c0c3531767819cb157 Signed-off-by: Damjan Marion <damarion@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-11-12IPv6: Make link-local configurable per-interface (VPP-1446)Juraj Sloboda1-16/+0
Remove old nonfunctional code for setting link-local addresses. Use common API for setting all IPv6 addresses. Change-Id: I562329df86341f81ef2441510a9eefbbf710f6e0 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com> Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-11-06BD ARP entry use common API typesNeale Ranns1-8/+3
Change-Id: I29f20dbaf2c2d735faff297cee552ed648f6f61b Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-05Don't autodetect plugin path if set on cmdlineKlement Sekera1-2/+3
Change-Id: Idf79f261a7590038c1813d3996f4644e3d7e0cbe Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-11-05Genric API types format/unformat support for VAT and custom dumpNeale Ranns3-0/+128
Change-Id: I8bc3a991f0ede0605d78b51ba609fbe5889513f2 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-24Trivial: vpp/vnet/main.c fix resource leakPaul Vinciguerra1-2/+9
Change-Id: Ia6cadec8117d2cc35c9329910bb403bcd1b048ce Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-10-23c11 safe string handling supportDave Barach14-58/+58
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-17stats: vpp_get_stats missing last interface in dumpOle Troan1-2/+2
Change-Id: Ie1fa560cb255a9b13ddb4929da8f33286a8c137e Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-11Stats: Include stat_segment.h in packages.Ole Troan1-0/+1
Change-Id: I976c0aba8397badf64763c4dbddce67009a4fb23 Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-08Stats: prometheus export coverity errors.Ole Troan1-0/+6
Change-Id: Ibc0a25dcf7d734215e0cffe789b5726f23e1c3d7 Signed-off-by: Ole Troan <ot@cisco.com>