aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp
AgeCommit message (Collapse)AuthorFilesLines
2020-06-16virtio: add vhost sw_if_index filter for sw_interface_vhost_user_dumpSteven Luong1-1/+2
The filter sw_if_index was in the API sw_interface_vhost_user_dump. But it was never implemented in the backend. This patch is to add the backend, vat, and custom dump support for the filter. Type: feature Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Iaa41a7e11bfbcbb4c60092375e4b0dcf0950077b
2020-05-29lisp: fix custom dumpFlorin Coras1-15/+27
Type: fix Ticket: VPP-1886 Fixes: 58db6e1 Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic40018a756e57bfec05ffbc5e30d18f4feb315db
2020-05-29misc: fix the pretty print for api traceMohsin Kazmi1-6/+6
Type: style Change-Id: I4ef8ba30be2696e8f63d5305027d2aa629cbdb88 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-05-27dhcp: vat support for the dhcp_client_dump APIDave Barach2-4/+8
Also: permanently solve ordering issues with the vpp builtin vat plugin loader, by explicitly loading vat plugins once we're sure that all data plane plugins have registered their APIs / API message handlers. Fix compilation / link errors when the vpp builtin vat plugin loader is disbled by cmake configuration. Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Id553c63ae860ebfc196c5ad4b55c19e08fec2c9e Signed-off-by: Ole Troan <ot@cisco.com>
2020-05-27build: make address sanitizer options configurable with cmakeDamjan Marion3-2/+28
Type: improvement Change-Id: I9ee0407e0634f773862dd65ff5d5594814294c2c Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-05-04misc: binary api fuzz test fixesDave Barach2-3/+3
Add a hook to src/vlibapi/api_shared.c to fuzz (screw up) binary API messages, e.g. by xoring random data into them before processing. We specifically exempt client connection messages, and inband debug CLI messages. We step over msg_id, client index, client context, and sw_if_index. Otherwise, "make test" vectors fail too rapidly to learn anything. The goal is to reduce the number of crashes caused to zero. We're fairly close with this patch. Add vl_msg_api_max_length(void *mp), which returns the maximum plausible length for a binary API message. Use it to hardern vl_api_from_api_to_new_vec(...) which takes an additional argument - message pointer - so it can verify that astr->length is sane. If it's not sane, return a u8 *vector of the form "insane astr->length nnnn\0". Verify array lengths in vl_api_dhcp6_send_client_message_t_handler(...) and vl_api_dhcp6_pd_send_client_message_t_handler(...). Add a fairly effective binary API fuzz hook to the unittest plugin, and modify the "make test" framework.py to pass "api-fuzz { on|off }" to enable API fuzzing: "make API_FUZZ=on TEST=xxx test-debug" or similar Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I0157267652a163c01553d5267620f719cc6c3bde
2020-05-04tap: refactor existing flagsMohsin Kazmi1-0/+4
Type: refactor This patch refactor the existing flags and also add a new flag for packet coalescing. Change-Id: Ic826e4c81313f26d87c475cdf666b06cbed60a3a Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-04-28lisp: API cleanupJakub Grajciar1-30/+18
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Ib7f73a0b6de188982a09040f7739dc46be3cb1de Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-04-28vlib: startup multi-arch variant configurationRay Kinsella1-0/+11
Support for startup node multi-arch variant selection through startup.conf. This is to facilitate unit, functional testing and benchmarking of non-default multi-arch variant node code path. Also added parameters to make test, to specific using multi-arch variants in unit testing. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I94fd332bb629683b7a7dd770ee9f615a9a424060
2020-04-28stats: add apis to delete simple/combined countersOle Troan1-0/+39
vlib_free_simple_counter() vlib_free_combined_counter() Frees the name and two dimensional vector from the stats segment. Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: If1becf7d09520ba41a3d59e2df94958ecfcf6948
2020-04-27virtio: support virtio 1.1 packed ring in vhostSteven Luong1-3/+7
virtio 1.1 defines a number of new features. Packed ring is among the most notable and important one. It combines used, available, and descripptor rings into one. This patch provides experimental support for packed ring. To avoid regression, when packed ring is configured for the interface, it is branched to a separate RX and TX driver. Non packed ring should continue to perform as it was before. Packed ring is tested using qemu4.2 and ubuntu focal fossa (kernel 5.4.0-12) on the guess VM which supports packed ring. To configure VPP with packed ring, just add the optional keyword "packed" when creating the vhost interface. To bring up the guest VM with packed ring, add "packed=on" in the qemu launch command. To facilitate troubleshooting, also added "verbose" option in show vhost desc CLI to include displaying the indirect descriptors. Known qemu reconnect issue - If VPP is restarted, guest VMs also need to be restarted. The problem is kernel virtio-net-pci keeps track of the previous available and used indices. For virtio 1.0, these indices are in shared memory and qemu can easily copy them to pass to the backend for reconnect. For virio 1.1, these indices are no longer in shared memory. Qemu needs a new mechanism to retrieve them and it is not currently implemented. So when the protocol reconnects, qemu does not have the correct available and used indices to pass to the backend. As a result, after the reconnect, virtio-net-pci is reading the TX ring from the wrong position in the ring, not the same position which the backend is writing. Similar problem exists also in the RX. Type: feature Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I5afc50b0bafab5a1de7a6dd10f399db3fafd144c
2020-04-22misc: asan: disable leak sanitizer by defaultBenoît Ganne1-1/+2
Leak Sanitizer is not stable yet with VPP. It can always be enabled at runtime with ASAN_OPTIONS=detect_leaks=1. Type: fix Change-Id: Ieff01091e2976e127783ebd331cd0e50a1dbca12 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-04misc: strcpy be goneDave Barach1-1/+1
Causes static analysis "vulnerability" warnings Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I272fa69251d70f62178e6dff0423c16f99937af1
2020-04-03docs: 80-vpp.conf fix transposition error in commentsPaul Vinciguerra1-1/+1
Type: docs Change-Id: I0d75c7673d85c5bd8ae10f48e7189ee28a31240e Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-04-03ip: remove vl_api_address_family_t byte order swapJakub Grajciar1-6/+6
Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I8074db3623ee4b37ac70ce8ea0d1912b97e5c059
2020-03-23sr: srv6 API cleanupJakub Grajciar1-14/+16
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I3c348ad2fca8bb3d9a246af7a2aa9dc9c33f57c3 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-03-21vlib: leave SIGPROF signal with its default handlerJieqiang Wang1-0/+1
When profiling VPP with MAP (a software profile suite on Arm CPUs, see details in https://www.arm.com/products/development-tools/server-and-hpc/forge/map) on Arm servers, VPP will receive SIGPROF signal because MAP uses SIGPROF signal to drive its sampler to do profiling on VPP. However, the default action of SIGPROF signal handler in VPP such as unix_signal_handler() is process termination. To profile VPP with MAP, the SIGPROF handler should be left as default, and MAP sampler will overwrite it with its own implementation. Type: feature Change-Id: Ie14e513d35ec27a66e95067689408bad8ed1ad6b Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
2020-03-19ip: change ip API enums address_family and ip_proto size to u8Jakub Grajciar1-2/+2
Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I73d27520726543d6375caad76a841339f68c3533 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-03-17api: API cleanupJakub Grajciar1-10/+10
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Ic108311e09c56cc2b3db63d5850598b6896a7897 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-03-16vxlan: vxlan/vxlan.api API cleanupJakub Grajciar1-2/+4
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I7f6f37ec6eed780322e2488d6eb0f5681945ba09 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-03-12policer: API cleanupJakub Grajciar1-3/+3
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Ia14f33992353b419b70b55beed63ab8ed6a2e837 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-03-05session: API cleanupJakub Grajciar1-12/+16
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Ib752a3425c076eb53bc5255a48039cbb74b1fcce Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-03-05tap: add support for persistanceMohsin Kazmi1-1/+5
Type: feature Change-Id: I775f53531972447ebae0d69b9e2dfeee84d115e5 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-03-04vxlan: vxlan-gpe/vxlan-gpe.cpi API cleanupJakub Grajciar1-2/+4
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Ic428e35141724b47a944211b4d95c3e41796c81e Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-02-26lldp: API cleanupJakub Grajciar1-1/+1
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I2fe6b56dc0f224f438ed5f14c0f276d94afbaea8 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-02-26pg: API cleanupJakub Grajciar1-2/+4
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Ibf693e4b178d2579bc3afb9653bffc07fbb7dd0a Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-02-26sr: API cleanupJakub Grajciar1-1/+1
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I6238ec79b916c23c07c3f7e2ac8e635f5a0d6112 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-02-26api: improve api string safetyJakub Grajciar2-10/+9
- Remove vl_api_from_api_string to prevent use of not nul-terminated strings. - Rename vl_api_from_api_to_vec -> vl_api_from_api_to_new_vec to imply a new vector is created. NOT nul terminated. - Add vl_api_from_api_to_new_c_string. Returns nul terminated string in a new vector. - Add vl_api_c_string_to_api_string. Convert nul terminated string to vl_api_string_t - Add vl_api_vec_to_api_string. Convert NON nul terminated vector to vl_api_string_t Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Iadd59b612c0d960a34ad0dd07a9d17f56435c6ea Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-02-15tap: fix the default parameter for num_rx_queuesMohsin Kazmi1-0/+2
Type: fix Change-Id: I1a20fea56f1ba1fada7c7ce96ea333bf097b1273 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-02-11vppinfra: remove the historical mheap memory allocatorDave Barach1-8/+0
The mheap allocator has been turned off for several releases. This commit removes the cmake config parameter, parallel support for dlmalloc and mheap, and the mheap allocator itself. Type: refactor Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I104f88a1f06e47e90e5f7fb3e11cd1ca66467903
2020-02-06vlib: add plugin override supportDave Barach1-4/+20
Allow a plugin to override (suppress loading of) other plugins. This mechanism allows a developer to prevent specific plugins from being loaded. To do so, provide an "overrides" list in the plugin definition: VLIB_PLUGIN_REGISTER () = { <snip> .overrides = "avf_plugin.so,ioam_plugin.so,dpdk_plugin.so", }; or some such. Simply list the plugins in question as shown above. The .overrides structure member is limited to 256 octets. The named .elf section mechanism used to discover the vlib_plugin_registration_t's precludes the use of a variable-length array of strings. Use the vlib log to eliminate plugin and built-in vat plugin loader console spew. Added vlib_log_register_class_rate_limit(...) to allow procedural configuration of the log rate-limit. We *never* want to rate-limit plugin loader messages. Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I0a9327b8cf5508482f057342783252112cb44170
2020-02-05vppinfra: numa vector placement supportDave Barach2-2/+13
Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I7e7d95a089dd849c1f01ecea84529d8dbf239f21
2020-02-05stats: fix state counter removalVladimir Isaev5-45/+125
Avoid using vec_del1() for directory vector to keep indexes valid all the time. There are state counters for each slave in LACP bond mode which can be dynamically created and removed. Vector index is used to access these counters. But also vec_del1() is used to remove counter from vector. This function changes the index of the last element, so after this we are unable to access ex-last element using old index. As a result it is not possible to add-del-add two interfaces to the LACP bond: DBGvpp# create bond mode lacp BondEthernet0 DBGvpp# create packet-generator interface pg1 DBGvpp# create packet-generator interface pg2 DBGvpp# bond add BondEthernet0 pg1 DBGvpp# bond add BondEthernet0 pg2 DBGvpp# bond del pg1 DBGvpp# bond del pg2 DBGvpp# bond add BondEthernet0 pg1 DBGvpp# bond add BondEthernet0 pg2 bond add: /if/lacp/1/3/partner-state is already register Type: fix Signed-off-by: Vladimir Isaev <visaev@netgate.com> Change-Id: I2c86e13905eefdef6233369cd4ab5c1b53d123bd
2020-01-30misc: deprecate netmap and ixge driversDamjan Marion1-1/+0
Both are out of sync for long time... Type: refactor Change-Id: I7de3170d35330fc172501d87655dfef91998b8fe Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-01-16misc: binary-api sw_interface_vhost_user_dump is brokenSteven Luong1-0/+1
Recent modificaton to vhost_user APIs for typing which added a sw_if_index filter to the API sw_interface_vhost_user_dump with the default value -1 to mean all interfaces. But the default is not set from api_format.c, causing the binary-api command for sw_interface_vhost_user_dump to display nothing. Also missing is the proper display on custom dump for the aformentioned API. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I05546e2318165af7531977fbed66ea7224c4a7ce
2020-01-08tap: split gso and checksum offload functionalityMohsin Kazmi1-1/+3
Type: refactor Change-Id: I0d4b79ef384c11c841576d264bfd8ccb21783e10 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-01-08virtio: split gso and checksum offload functionalityMohsin Kazmi1-1/+3
Type: refactor Change-Id: I897e36bd5db593b417c2bac9f739bc51cf45bc08 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-01-03ip: API cleanupJakub Grajciar1-2/+1
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I17b95bba2327049d2b99e59cea79208814a24b22 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-12-17vpp: fix .short_help for "ip virtual"Paul Vinciguerra1-1/+1
Type: fix "# <feature-name>: <subject> Change-Id: I8b6b6b8c70faec7cd95e1842259e907fb9587017 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-17build: export vapi generation in vpp-devOliver Giles1-1/+1
Adds the higher-level vapi generation to cmake/api.cmake and exposes the necessary python scripts in vpp-dev, so that out-of-tree/downstream plugins can also leverage the more convenient API. Type: feature Signed-off-by: Oliver Giles <oliver_g@radwin.com> Change-Id: I8c40a14d27ba3cb972c6907632e03c0e7b0ce982
2019-12-17dpdk: add devargs supportChenmin Sun1-0/+5
Type: feature This patch adds the devargs support for dpdk device The devargs are used as hardware-specific init args for dpdk devices please refer to the nic guides under $(DPDK_DIR)/doc/guides/nics/$(NIC_DRIVER).rst Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: Id380d04720090bb66afe5ce09d664e5e248b8eb9
2019-12-17ip: Protocol Independent IP NeighborsNeale Ranns2-317/+4
Type: feature - ip-neighbour: generic neighbour handling; APIs, DBs, event handling, aging - arp: ARP protocol implementation - ip6-nd; IPv6 neighbor discovery implementation; separate ND, MLD, RA - ip6-link; manage link-local addresses - l2-arp-term; events separated from IP neighbours, since they are not the same. vnet retains just enough education to perform ND/ARP packet construction. arp and ip6-nd to be moved to plugins soon. Change-Id: I88dedd0006b299344f4c7024a0aa5baa6b9a8bbe Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-12-11api: Use vl_msg_push/pop_heapNathan Skrzypczak2-24/+9
Type: refactor Change-Id: I0eb46676fc22ce6825b2d879498df344b5a855e8 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-12-11devices: tap API cleanupJakub Grajciar1-6/+10
Use consistent API types. Type: fix Change-Id: I11cc7f6347b7a60e5fd41e54f0c7994e2d81199f Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-12-10api: multiple connections per processDave Barach5-10/+10
Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I2272521d6e69edcd385ef684af6dd4eea5eaa953
2019-12-04gre: Multi-point interfacesNeale Ranns1-2/+2
Type: feature Change-Id: I0129ad6ace44a50a8a3b26db8e445cd06b2b49e8 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-12-03classify: API cleanupJakub Grajciar1-5/+5
Use consistent API types. Type: fix Change-Id: Ib5b1efa76f0a9cecc0bc146f8f8a47c2442fc1db Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-11-27misc: add address sanitizer heap instrumentationBenoît Ganne1-0/+9
Introduce AddressSanitizer support: https://github.com/google/sanitizers/ This starts with heap instrumentation. vlib_buffer, bihash and stack instrumentation should follow. Type: feature Change-Id: I7f20e235b2f79db72efd0e756f22c75f717a9884 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-11-26fib: Table ReplaceNeale Ranns1-7/+34
Type: feature from the API doc, a table replace is: " The use-case is that, for some unspecified reason, the control plane has a very different set of entries it wants in the table than VPP currently has. The CP would thus like to 'replace' VPP's current table only by specifying what the new set of entries shall be, i.e. it is not going to delete anything that already eixts. the CP delcartes the start of this procedure with this begin_replace API Call, and when it has populated all the entries it wants, it calls the below end_replace API. From this point on it is of coursce free to add and delete entries as usual. The underlying mechanism by which VPP implements this replace is purposefully left unspecified. " In the FIB, the algorithm is implemented using mark and sweep. Algorithm goes: 1) replace_begin: this marks all the entries in that table as 'stale' 2) download all the entries that should be in this table - this clears the stale flag on those entries 3) signal the table converged: ip_table_replace_end - this removes all entries that are still stale this procedure can be used when an agent first connects to VPP, as an alternative to dump and diff state reconciliation. Change-Id: I168edec10cf7670866076b129ebfe6149ea8222e Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-11-07interface: shmemioerror while getting name_filter argAleksander Djuric1-1/+5
Type: fix Signed-off-by: Aleksander Djuric <aleksander.djuric@gmail.com> Change-Id: I5e0eb7024d208040d79e9d6db863f41e2ecf4ee6 Signed-off-by: Ole Troan <ot@cisco.com>