aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp/api
AgeCommit message (Collapse)AuthorFilesLines
2019-05-07mp_safe SW_INTERFACE_DUMP, SW_INTERFACE_DETAILS, SW_INTERFACE_TAG_ADD_DEL,stable/1810Steven 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)
2018-10-04Fix handling of mpls_tunnel_add_del APIJohn Lo1-7/+22
Handles next_hop_weight, next_hop_preference and next_hop_table_id properly in vl_api_mpls_tunnel_add_del_t_handler(). Also updated vpp_api_test and custom_dump handling of related APIs. Change-Id: I89e211bfa3b9d8ead396b24b3c46b7c7f6511f44 Signed-off-by: John Lo <loj@cisco.com>
2018-10-01thread: Add show threads apiMohsin Kazmi3-2/+124
Change-Id: I3124238ab4d43bcef5590bad33a4ff0b5d8b7d15 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-09-30vlib: barrier sync elog tracing improvementsDave Barach1-0/+1
Change-Id: I2d3b8d5a7192ff68bee443a99346ecb807b2d833 Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-28stats: Split stat_segment and stats code in preparation for deprecation.Ole Troan2-2/+1
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 Vinciguerra5-5/+5
This is a new commit for code under a different maintainer. Change-Id: I79fa403fec6a312238a9a4b18b35dbcafaa05439 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-09-26MPLS tunnel dump: use sw_if_index not tunnel_indexNeale Ranns1-1/+1
Change-Id: I6c0d5aec6ee96a0d40358f0e09a0901b22265063 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-09-26itf: dump interface rx-placementMohsin Kazmi1-0/+14
Change-Id: I7dd48c8a2c77f82a2c1aa8311b062f5f0bc4e3fd Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-09-25L2 BD: introduce a BD interface on which to send UU packetsNeale Ranns1-8/+12
Change-Id: I21ad6b04c19c8735d057174b1f260a59f2812241 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-22fix following error in debian jessie:Khers1-3/+6
'‘for’ loop initial declarations are only allowed in C99 or C11 mode' Change-Id: Id842382f884122555abaa936c56cdfd305f2a5f3 Signed-off-by: Khers <s3m2e1.6star@gmail.com>
2018-09-21Add more CLI options to vpp_api_test for calling ip_add_del_routeJohn Lo1-3/+3
Change-Id: I114e93b6bc71cfcdcfe6d3ddde26f77118e36ab8 Signed-off-by: John Lo <loj@cisco.com>
2018-09-20vhost-user: Add disable feature support in apiMohsin Kazmi1-0/+4
Two flags to disable mergable rx buffers and indirect descriptors are added to api. Change-Id: Iba0ee9c48d19dfc3d3420a3fdaf44a1a1d325e99 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-09-14Ehnance and fix vpp_api_test and custom_dump to support SR-MPLSJohn Lo1-8/+152
Change-Id: I2e06de176f4272b4b7475857b42fe0d106382b6f Signed-off-by: John Lo <loj@cisco.com>
2018-09-07IP route update fix when multipath and drop setNeale Ranns1-3/+17
Change-Id: I9cec7486cb6e3c5261d74d2b15a4d19469285a30 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-06Enum type on the API for QoS sourcesNeale Ranns1-1/+3
Change-Id: I877541ede6e26581c659821502f23b777903b82f Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-24rx-placement: Add API call for interface rx-placementMohsin Kazmi1-0/+17
Change-Id: I9228ce29e9d2fc862a2d076b4072bcdd728d6dd1 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-17l2: arp termination dumpMohsin Kazmi1-0/+10
VPP-1368 Change-Id: I6373f76ba87184a91b517712eafb4ee1f5cea59e Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-06-25tw: add light weight timer update functionFlorin Coras1-3/+3
Because it avoids pool putting/getting the timer, this function is somewhat faster than stopping and restarting a timer. Change-Id: Id99ed9d356b0b1f7e12facfe8da193e1cd30b3ec Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-19Driver level time-based src mac filterDave Barach1-0/+1
Change-Id: I062d7653e00d77e73a61d8841e01ab4a159b6404 Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-06-19Fixed bugs in SRv6 APIPablo Camarillo1-15/+15
Jira ticket VPP-1196 Jira ticket VPP-1081 Jira ticket VPP-1078 Jira ticket VPP-1217 Change-Id: Id7e85229cae1017acb0aa4ca63ced334e6dafb8d Signed-off-by: pcamaril <pcamaril@cisco.com> Signed-off-by: Pablo Camarillo <pcamaril@cisco.com> Signed-off-by: pcamaril <pcamaril@cisco.com> Signed-off-by: Michal Cmarada <michal.cmarada@pantheon.tech>
2018-06-14Use __attribute__((weak)) references where necessaryDave Barach1-4/+1
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 Barach1-4/+6
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-13vxlan:offload RX floweyal bari1-0/+15
ip4 vxlan cli/api (using flow infra) to create flows and enable them on different hardware (currently tested with i40e) to offload a vxlan tunnel onto hw: set flow-offload vxlan hw TwentyFiveGigabitEthernet3/0/0 rx vxlan_tunnel1 to remove offload: set flow-offload vxlan hw TwentyFiveGigabitEthernet3/0/0 rx vxlan_tunnel1 del TODO:ipv6 handling Change-Id: I70e61f792ef8e3f007d03d7df70e97ea4725b101 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-06-11MTU: Software interface / Per-protocol MTU supportOle Troan1-3/+3
This patch separates setting of hardware interfaec and software interface MTU. Software MTU is L2 payload MTU (i.e. not including L2 header). Per-protocol MTU for IPv4, IPv6 and MPLS can also be set. Currently only IP4, IP6 are enabled in adjacency / rewrite code. Documentation in src/vnet/MTU.md Change-Id: Iee2fd6f0bbc8210748dd8e073ab9fab87d323690 Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-07DHCP Client DumpNeale Ranns1-4/+4
- use types on the DHCP API so that the same data is sent in comfing messages and in dumps - add the DHCP client dump API - update VOM to refelct API changes - rename VOM class dhcp_config* dhcp_client* - the VOM dhcp_client class maintains the lease data (which it reads on a dump) for clients to read Change-Id: I2a43463937cbd80c01d45798e74b21288d8b8ead Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-06-04Fix API trace dump for tapv2Milan Lenco1-3/+3
Change-Id: Ib092da61ba037ea30c6f38ea692ef9f1ca0cd8e7 Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
2018-05-29af_packet: Add support for dump interfacesMohsin Kazmi1-0/+11
Change-Id: I8d8ecc80edb7665125ba625a3ce7b30d2dea88f0 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-05-25ARP proxy dumpsNeale Ranns1-4/+5
Change-Id: I8335ebf266becf2f42bb3f28a17dfed8d9b08f97 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-05-11Periodic scan and probe of IP neighbors to maintain neighbor poolsJohn Lo1-0/+33
Scan IPv4 and IPv6 neigbor pool entries once a minute to keep them up to date. The neighbor of an entry is probed if its time-stamp is older than 1 minute. If the neighbor respond, its time-stamp will be updated. If there is no response from a neighbor, its entry will be deleted when the time-stamp of the entry become more than 4 minutes old. Static neighbor entries are not probed nor deleted. Implemented CLI and API to enable and disable priodic scan of IPv4, IPv6 or both types of IP neighbors. CLI is "ip scan-neighbor" and API is "ip_scan_neighbor_enable_disable". Other IP neighbor scan parameters can also be changed from their defaults via the CLI/API. Change-Id: Id1a0a934ace15d03db845aa698bcbb9cdabebfcd Signed-off-by: John Lo <loj@cisco.com>
2018-04-27VAT for qos_record_enable_disable APIIgor Mikhailov (imichail)1-2/+17
Change-Id: I2b418b9aefe298e4e6190cbe2e220a657f688cda Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2018-04-16Implement ip_probe_neighbor APIJohn Lo1-0/+16
Add API support similar to VPP CLI "ip probe-neighbor" except API call is asynch and will not wait, as the CLI does, for address resolution of probed neighbor. The API client can use the APIs want_ip4_arp_events or want_ip6_nd_events to get notified of the desired address resolution event. Change-Id: Ieab58abe75b5cc7f5185b3b91418b6362f8992d3 Signed-off-by: John Lo <loj@cisco.com>
2018-04-09Autodetect plugin pathDamjan Marion1-6/+10
dpdk plugin self-disables if there are no hugepages available Change-Id: Ib286e1a370deeb21248e6e961573ef9c68759b4c Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2018-03-21bond: Add bonding driver and LACP protocolSteven1-0/+84
Add bonding driver to support creation of bond interface which composes of multiple slave interfaces. The slave interfaces could be physical interfaces, or just any virtual interfaces. For example, memif interfaces. The syntax to create a bond interface is create bond mode <lacp | xor | acitve-backup | broadcast | round-robin> To enslave an interface to the bond interface, enslave interface TenGigabitEthernet6/0/0 to BondEthernet0 Please see src/plugins/lacp/lacp_doc.md for more examples and additional options. LACP is a control plane protocol which manages and monitors the status of the slave interfaces. The protocol is part of 802.3ad standard. This patch implements LACPv1. LACPv2 is not supported. To enable LACP on the bond interface, specify "mode lacp" when the bond interface is created. The syntax to enslave a slave interface is the same as other bonding modes. Change-Id: I06581d3b87635972f9f0e1ec50b67560fc13e26c Signed-off-by: Steven <sluong@cisco.com>
2018-03-13Rationalize plugin symbol error reportingDave Barach1-2/+6
Change-Id: I64f2b2007f30fc1c6bd2990ba0d7ccbcd43cdb38 Signed-off-by: Dave Barach <dave@barachs.net>
2018-03-09Coordinate known Ethernet speeds with Linux kernel and DPDKLee Roberts1-0/+18
Linux kernel and DPDK recognize the following Ethernet speeds: 10M, 100M, 1G, 2.5G, 5G, 10G, 20G, 25G, 40G, 50G, 56G and 100G. Add consistent Ethernet speeds to VPP. Change-Id: I4cfcf378fb34425c1206db5aa2f6bdcc66e0a6ab Signed-off-by: Lee Roberts <lee.roberts@hpe.com>
2018-03-02tapv2: CLI and binary API fixesSteven1-1/+1
1. When interface create encouners an error (see test below), the same id cannot be used again. This is due to hash_set is called too early in the function. After the hash entry is set, there are different errors may cause the interface create to be aborted. But we didn't remove the hash entry when error is encountered. The fix is to move the hash_set call near the end which has no more "goto error" DBGvpp# create tap id 1 rx-ring-size 1021 tx-ring-size 1021 create tap id 1 rx-ring-size 1021 tx-ring-size 1021 create tap: ring size must be power of 2 DBGvpp# create tap id 1 rx-ring-size 1024 tx-ring-size 1024 create tap id 1 rx-ring-size 1024 tx-ring-size 1024 create tap: interface already exists DBGvpp# 2. multiple issues exist with api_format.c with the below command binary-api tap_create_v2 id 4 hw-addr 90:e2:ba:76:cf:2f rx-ring-size 1024 tx-ring-size 1024 - hw_addr is not taken due to the test for random mac is inverted - id is an integer, not a string - integer values were not converted to network format Change-Id: I5a669d702a80ad158517df46f0ab089e4d0d692e Signed-off-by: Steven <sluong@cisco.com>
2018-02-15Optimize GRE Tunnel and add support for ERSPAN encapJohn Lo1-1/+7
Change GRE tunnel to use the interface type where the same encap node is used as output node for all GRE tunnels, instead of having dedicated output and tx node for each tunnel. This allows for more efficient tunnel creation and deletion at scale tested at 1000's of GRE tunnels. Add support for ERSPAN encap as another tunnel type, in addition to the existing L3 and TEB types. The GRE ERSPAN encap supported is type 2 thus GRE encap need to include sequence number and GRE- ERSPAN tunnel can be created with user secified ERSPAN session ID. The GRE tunnel lookup hash key is updated to inclue tunnel type and session ID, in addition to SIP/DIP and FIB index. Thus, GRE-ERSPAN tunnel can be created, with the appropriate session ID, to be used as output interface for SPAN config to send mirrored packets. Change interface naming so that all GRE tunnels, irrespective of tunnel type, uses "greN" where N is the instance number. Removed interface reuse on tunnel creation and deletion to enable unfied tunnel interface name. Add support of user specified instance on GRE tunnel creation. Thus, N in the "greN" interface name can optionally be specified by user via CLI/API. Optimize GRE tunnel encap DPO stacking to bypass load-balance DPO node since packet output on GRE tunnel always belong to the same flow after 5-tupple hash. Change-Id: Ifa83915744a1a88045c998604777cc3583f4da52 Signed-off-by: John Lo <loj@cisco.com>
2018-02-14make-test: use api custom-dump to reduce log size.Dave Wallace1-1/+7
- Reduce log size by using "api trace custom-dump" instead of "api trace dump". - Fix custom-dump output of cli_inband_t api message to include cli command being executed. New output: DBGvpp# api trace custom-dump /tmp/test vl_api_memclnt_delete_t: index: 2 handle: 0x301d8e10 SCRIPT: memclnt_create name vpp_api_test SCRIPT: sw_interface_dump all SCRIPT: control_ping SCRIPT: exec show run Old output: DBGvpp# api trace dump /tmp/test ---------- trace 0 ----------- vl_api_memclnt_delete_t: index: 33554432 handle: 0x108e1d3000000000 ---------- trace 1 ----------- vl_api_memclnt_create_t: name: vpp_api_test input_queue: 0x808e1d3000000000 context: 0 ctx_quota: 0 ---------- trace 2 ----------- vl_api_sw_interface_dump_t: _vl_msg_id: 61 client_index: 33554432 context: 0 name_filter_valid: 0 ---------- trace 3 ----------- vl_api_control_ping_t: _vl_msg_id: 712 client_index: 33554432 context: 0 ---------- trace 4 ----------- vl_api_cli_inband_t: _vl_msg_id: 715 client_index: 33554432 context: 0 length: 9 Change-Id: If740c861649a3a59b8cc7a777c23c3cf94b8ff87 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-07VXLAN: Allow user to specify a custom vxlan tunnel instance id.Jon Loeliger1-0/+2
If one is not selected by the user, the next available id will be allocated, thus maintaining backward compatibility. Change-Id: I4691ed0638b8072f9cfa9f20b9fe4f981e708800 Signed-off-by: Jon Loeliger <jdl@netgate.com>
2018-02-07classifier-based ACL: refactor + add output ACLAndrew Yourtchenko1-1/+20
For implementation of MACIP ACLs enhancement (VPP-1088), an outbound classifier-based ACL would be needed. There was an existing incomplete code for outbound ACLs, it looked almost exact copy of input ACLs, minus the various enhancements, trying to sync that code seemed error-prone and cumbersome to maintain in the longer run. This change refactors the input+output ACLs processing into a unified routine (thus any changes will have effect on both), and also adds the API to set the output interface ACL, with the same format and semantics as the existing input one (except working on output ACL of course). WARNING: IP outbound ACL in L3 mode clobbers the ip.* fields in the vnet_buffer_opaque_t, since the code is using l2_classify.* The net_buffer (p0)->ip.save_rewrite_length is rescued into l2_classify.pad.l2_len, and used to rewind the header in case of drop, so that ipX_drop prints something sensible. Change-Id: I62f814f1e3650e504474a3a5359edb8a0a8836ed Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.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-18tapv2: add option to set host-side default gwDamjan Marion1-0/+4
Change-Id: I76fd655ecd9445299b94b3b5af10e7b1588584e4 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-01-17Fix api test_client.c compilationPierre Pfister1-1/+0
c42fc05bfbb26fd11fe92ac9d11587660a817ac1 removed mr_create_table_if_needed parameter in FIB API calls. This commit fixes the API test program, which was not compiling anymore. Change-Id: Id6899c860235363bef9ba35cd8f24033a55cd5e6 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2018-01-16api: fix api_format.c soft link to vatFlorin Coras2-23526/+2
Commit 6c4dae27e75fc66 broke api_format.c soft link between vat at vpp api. Probably a make fixstyle issue. Thanks to John Lo for catching this. Change-Id: I0567b49fb5c70314d7d6e72f8c9f0f1575948702 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-15svm: refactor memfd and remove ssvm_ethFlorin Coras1-3/+2
Change-Id: Icde296e956eb89ea3a17d547f04a833916ec6440 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-11api: remove transport specific code from handlersFlorin Coras1-5/+5
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-11Remove vpp_api_test interface name filter catalogDave Barach1-2/+3
If I remember correctly, I added the interface name filter catalog to avoid cluttering up the vat interface table with [unused] packet generator interfaces. Since we no longer create pg interfaces we're not planning to use, the filter catalog does more harm than good. Every new interface name prefix would have had to be added to the list, and folks wouldn't likely know they should do that... Change-Id: I4067f8ba70ad13c8dc5ebaf21a23759a2cf2675e Signed-off-by: Dave Barach <dave@barachs.net>
2018-01-09api: refactor vlibmemoryFlorin Coras6-11/+23539
- 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-18API: Fix Coverity Warning CID 177944Dave Wallace1-1/+1
Change-Id: I5dbd5e5673ecb0d3878053ae9985478740cf3bc6 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-12-18SR-MPLS: binary API and automated steeringPablo Camarillo1-18/+13
Change-Id: Iacfbaaa91ea8bd92790dec9fce567063bdbc5d64 Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>