aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp
AgeCommit message (Collapse)AuthorFilesLines
2019-07-31devices interface tests: vhosst GSO supportSteven Luong1-0/+4
Add gso option in create vhost interface to support gso and checksum offload. Tested with the following startup options in qemu: csum=on,gso=on,guest_csum=on,guest_tso4=on,guest_tso6=on,guest_ufo=on, host_tso4=on,host_tso6=on,host_ufo=on Type: feature Change-Id: I9ba1ee33677a694c4a0dfe66e745b098995902b8 Signed-off-by: Steven Luong <sluong@cisco.com>
2019-07-31api papi: add alias for timestamp(datetime)/timedeltaPaul Vinciguerra3-36/+48
Now that we have support for f64: - create explicit types for timestamp(datetime)/timedelta - update log_details to use timestamp and remove redundant string representation. If you need the string representation, in python do str(timestamp). If you prefer the raw f64 value, the client can pass in the _no_type_conversion option. Type: feature Change-Id: I547b5fa7122d2afa12628b7db0192c23babbbae8 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-28api: add vl_api_version_t typePaul Vinciguerra5-0/+47
Type: feature Depends-on: https://gerrit.fd.io/r/20484 Change-Id: Ifc8d7e00d7254db40856a088fdd352d9773f71d5 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-28pg: add GSO supportMohsin Kazmi1-0/+2
Type: feature Change-Id: I72676495a85fbecc946aa266a75234cce70c3a5e Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-07-24qos: QoS dump APIsNeale Ranns1-2/+2
Type: feature Change-Id: I514b40026986f3828c8727453456b20a0a45f3af Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-23api: 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>
2019-07-22stats: fix use-after-free hash key stringBenoît Ganne1-6/+4
Hash keys are not copied by the hash infrastructure, instead the pointer is used directly. stat_segment_register_gauge() does not allocate a private object for the key, causing issues when it is freed or reused. Allocate a private object on insertion into the hashtable instead. Type: fix Fixes: 92e3082199d10add866894e86a9762d79a3536c4 Change-Id: Ifb6addfcaec81bdb7ea3512050ce55f06ef09a4c Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-19bonding: add support for numa-only in lacp modeZhiyong Yang1-0/+2
If numa-only is set, Only slaves on local numa node transmit pkts if have at least one, otherwise the bond interface works as usual. CLI change: create bond mode lacp [load-balance { l2 | l23 | l34 } {numa-only}] [hw-addr <mac-address>] [id <if-id>] The new member "u8 numa_only;" is also added to bond_create_if_args_t. Type: feature Change-Id: Icdccedafb0738d8c9d4a5acce909ce562428c071 Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2019-07-09vppinfra: allocate bihash virtual space on demandDave Barach1-0/+81
Reduces the vpp image virtual size by multiple gigabytes Add a "show bihash" command which displays configured and current virtual space in use by bihash tables. Modify the .py test framework to call "show bihash" on test tear-down Type: refactor Change-Id: Ifc1b7e2c43d29bbef645f6802fa29ff8ef09940c Signed-off-by: Dave Barach <dave@barachs.net>
2019-07-08map gbp papi: match endianess of f64Paul Vinciguerra2-2/+83
clib_net_to_host_f64, clib_host_to_net_f64 are now implemented as '=', https://gerrit.fd.io/r/#/c/20406/ set papi to match. - all f64 api references are now wrapped with clib_net_to_host_f64 or clib_host_to_net_f64. IEEE f64 endianess is not defined. If clib_net_to_host_f64 and clib_host_to_net_f64 are later defined in VPP as big-endian, it is a single character change in the papi vpp_serializer. Note: This breaks the api in a manner that would not be detected by the flag day initiative. The scope is small. This only impacts map.api, which applied the u64 transformation, while the gbp api uses '='. The implementation of "=" raises issues for the papi socket implementation if used between systems of differing endianess. See Vratko's comments. - Added get_f64_endian_value() to api to allow client to verify endianess of f64's. Type: fix Depends-on: https://gerrit.fd.io/r/#/c/20484/ Change-Id: I00fc64a6557ba0190398df211aa0ea5c7eb101df Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-08api: Implement log_dump/log_detailsPaul Vinciguerra2-8/+140
- Replaces the need to screen scrape "show log". - Adds an api to return the system time. When running over a socket, the api client may have different time than the vpp host. expected use: vpp_time_before_command = self.vapi.show_vpe_system_time_ticks().vpe_system_time_ticks <run some commands> log_output = self.vapi.log_dump(start_timestamp=vpp_time_before_command) Depends-on: https://gerrit.fd.io/r/20484 Depends-on: https://gerrit.fd.io/r/#/c/19581/ ============================================================================== TestVpeApi ============================================================================== log_details(_0=838, context=3, timestamp_ticks=2.4954863503546518e+48, level=<vl_api_log_level_t.VPE_API_LOG_LEVEL_WARNING: 4>, timestamp=u'2019/07/04 20:35:41:281', msg_class=u'buffer', message=u'vlib_physmem_shared_map_create: clib_mem_create_hugetlb_fd: open: No such file or directory\n\n') log_details(_0=838, context=3, timestamp_ticks=1.6101902879480125e+159, level=<vl_api_log_level_t.VPE_API_LOG_LEVEL_WARNING: 4>, timestamp=u'2019/07/04 20:35:41:281', msg_class=u'buffer', message=u'falling back to non-hugepage backed buffer pool') test_log_dump_default (test_vpe_api.TestVpeApi) OK log_details(_0=838, context=13, timestamp_ticks=2.4954863503546518e+48, level=<vl_api_log_level_t.VPE_API_LOG_LEVEL_WARNING: 4>, timestamp=u'2019/07/04 20:35:41:281', msg_class=u'buffer', message=u'vlib_physmem_shared_map_create: clib_mem_create_hugetlb_fd: open: No such file or directory\n\n') log_details(_0=838, context=13, timestamp_ticks=1.6101902879480125e+159, level=<vl_api_log_level_t.VPE_API_LOG_LEVEL_WARNING: 4>, timestamp=u'2019/07/04 20:35:41:281', msg_class=u'buffer', message=u'falling back to non-hugepage backed buffer pool') test_log_dump_timestamp_0 (test_vpe_api.TestVpeApi) OK test_log_dump_timestamp_future (test_vpe_api.TestVpeApi) SKIP test_show_vpe_system_time_ticks (test_vpe_api.TestVpeApi) SKIP ============================================================================== TEST RESULTS: Scheduled tests: 4 Executed tests: 4 Passed tests: 2 Skipped tests: 2 ============================================================================== Test run was successful Type: feature Change-Id: I893fc0a65f39749d2091093c2c604659aadd8447 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-26api: refactor format_vl_api_prefix_t return keysPaul Vinciguerra1-2/+2
format_vl_api_prefix_t returns a dict with keys 'address' and 'address_length', but other format_vl_api_prefix functions return a dict with 'prefix', and 'len'. Refactor all format_vl_api_prefix_t to return consistent keys 'address' and 'len'. Type: refactor Change-Id: I5f9558fc2da8742a303266e011102f5b2db80aad Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-26api: Remove the inlines file and replace with library functionsNeale Ranns2-2/+0
using inlines exposes the users to the internal data types used by VPP, namely vec.h. This file does not compile with a C++ compiler. Type: feature Change-Id: I1544fdd9eae998309f865df61df78571bdb96903 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-26misc: add bond_dump, slave_dump, and rx_placement_dumpSteven Luong1-6/+6
Fixed the missing bond_dump, slave_dump, and rx_placement_dump in custom_dump.c Type: fix Change-Id: I9bf9ce071db175543edb383768c5915b939758ae Signed-off-by: Steven Luong <sluong@cisco.com>
2019-06-20ipsec: add ipsec api custom-dump routinesDave Barach1-1/+157
Type: feature Change-Id: I637ca85bb0c5c3e9704e242747b1174bfcd74e02 Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-20tap: add support to configure tap interface host MTU sizeMohsin Kazmi1-0/+4
This patch adds support to configure host mtu size using api, cli or startup.conf. Type: feature Change-Id: I8ab087d82dbe7dedc498825c1a3ea3fcb2cce030 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-06-19l2: BD ARP termination entry API updateNeale Ranns1-3/+3
Type: refactor Change-Id: I492b6e88acadf0ab0e4d7b1c0c5d1cab84c1726f Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-18ipsec: ipsec-tun protectNeale Ranns2-37/+0
please consult the new tunnel proposal at: https://wiki.fd.io/view/VPP/IPSec Type: feature Change-Id: I52857fc92ae068b85f59be08bdbea1bd5932e291 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-18fib: fib api updatesNeale Ranns4-146/+106
Enhance the route add/del APIs to take a set of paths rather than just one. Most unicast routing protocols calcualte all the available paths in one run of the algorithm so updating all the paths at once is beneficial for the client. two knobs control the behaviour: is_multipath - if set the the set of paths passed will be added to those that already exist, otherwise the set will replace them. is_add - add or remove the set is_add=0, is_multipath=1 and an empty set, results in deleting the route. It is also considerably faster to add multiple paths at once, than one at a time: vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.11 100000 routes in .572240 secs, 174751.80 routes/sec vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.12 100000 routes in .528383 secs, 189256.54 routes/sec vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.13 100000 routes in .757131 secs, 132077.52 routes/sec vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.14 100000 routes in .878317 secs, 113854.12 routes/sec vat# ip_route_add_del 1.1.1.1/32 count 100000 multipath via 10.10.10.11 via 10.10.10.12 via 10.10.10.13 via 10.10.10.14 100000 routes in .900212 secs, 111084.93 routes/sec Change-Id: I416b93f7684745099c1adb0b33edac58c9339c1a Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-18stats: off by one error in /sys/node/{calls,clocks,...}Ole Troan1-4/+4
Fixes: 58492a8372 Change-Id: Ia2eeebc2488b57e57f8d5e52f9948d1cced7b6fc Type: fix Ticket: VPP-1698 Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-18stats: fix memory leakage when adding / deleting interfacesOle Troan2-17/+57
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. This fix also adds memory usage statistics for the statistics segment as /mem/statseg/{used, total} Change-Id: Ife98d5fc5baef5bdae426a5a1eef428af2b9ab8a Type: fix Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-18api: string type to convert to vectorOle Troan2-0/+2
Previous use of strndup() required user to remember to call free(). Now return a vector pointing directly to the API message string. Of course user must remember to copy the string out if lifetime is longer than API message lifetime. Change-Id: Ib5e2b3d52d258e1a42ea9ea9a9e04abbe360e2bf Type: fix Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-14stats: add version field to stat segment base headerOle Troan2-0/+7
Add a version in the base header of the stat segment To make support for multiple reader implementations safer. Change-Id: I6816e2a51a98c2df1e621e80d4ef0b4ba4e9f47b Type: feature Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-07build: add -Wall and -fno-common, fix reported issuesBenoît Ganne6-28/+33
Type: refactor Change-Id: I8489ccd54411c2aa9355439c5641dc31012c64a2 Signed-off-by: Benoît Ganne <bganne@cisco.com> Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-06-04stats: removing empty object in stats vectorOle Troan1-1/+1
Type: fix Change-Id: I9b6bdacdb9a0750834de9a93d8c3f7ed827ce3c8 Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-04startup: remove dpdk linking bonding configurationZhiyong Yang1-10/+0
As dpdk linking bonding code has been removed by the patch https://gerrit.fd.io/r/#/c/19867/, corresponding configuration info should be removed. Change-Id: I048ae068619c83190252a75284bd5306ce61611e Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2019-05-28Punt: socket register for exception dispatched/punted packets based on reasonNeale Ranns3-5/+40
- add to the Punt API to allow different descriptions of the desired packets: UDP or exceptions - move the punt nodes into punt_node.c - improve tests (test that the correct packets are punted to the registered socket) Change-Id: I1a133dec88106874993cba1f5a439cd26b2fef72 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-05-27virtio: Add gso support for native virtio driverMohsin Kazmi1-0/+2
Change-Id: I7b735f5a540e8c278bac88245acb3f8c041c49c0 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-05-24Remove historical ip4 icmp OAM codeDave Barach7-970/+0
Add a registration overwritten warning to ip4_icmp_register_type(...) Change-Id: I6c2aabdb979b54ec49e827225acc74559ac4caab Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-23stats: fix memory leak in statseg configDave Wallace1-12/+18
Type: fix Change-Id: I383d5b189efc90ad418725b7e52888138dee0f75 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-05-22stats: support multiple works for error countersOle Troan5-10/+28
The current code only allowed access to the main thread error counters. That is not so useful for a multi worker instance. No return a vector indexed by thread of counter_t values. Type: fix Change-Id: Ie322c8889c0c8175e1116e71de04a2cf453b9ed7 Signed-off-by: Ole Troan <ot@cisco.com>
2019-05-17Load vat plugins late in the init sequenceDave Barach1-1/+1
After the related data-plane plugins have initialized their message IDs. Change-Id: I4202a9e46ef6cdb12a5186be0f2370e2f9ccbb78 Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-16init / exit function orderingDave Barach1-6/+8
The vlib init function subsystem now supports a mix of procedural and formally-specified ordering constraints. We should eliminate procedural knowledge wherever possible. The following schemes are *roughly* equivalent: static clib_error_t *init_runs_first (vlib_main_t *vm) { clib_error_t *error; ... do some stuff... if ((error = vlib_call_init_function (init_runs_next))) return error; ... } VLIB_INIT_FUNCTION (init_runs_first); and static clib_error_t *init_runs_first (vlib_main_t *vm) { ... do some stuff... } VLIB_INIT_FUNCTION (init_runs_first) = { .runs_before = VLIB_INITS("init_runs_next"), }; The first form will [most likely] call "init_runs_next" on the spot. The second form means that "init_runs_first" runs before "init_runs_next," possibly much earlier in the sequence. Please DO NOT construct sets of init functions where A before B actually means A *right before* B. It's not necessary - simply combine A and B - and it leads to hugely annoying debugging exercises when trying to switch from ad-hoc procedural ordering constraints to formal ordering constraints. Change-Id: I5e4353503bf43b4acb11a45fb33c79a5ade8426c Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-15Fix stats documentation with default socket nameIgor Mikhailov (imichail)1-2/+2
Change-Id: Ibcb726c229cc12705764f771c15110852b420c49 Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2019-05-10cli: Add return value in cli_inbandOle Troan1-1/+1
Even when a CLI command called through the cli_inband API failed the API would return 0 (SUCCESS). This patch fixes that, but since most CLI handlers return error->code == 0, in most failure cases it will return -1 (UNSPECIFIED ERROR). Type: fix Change-Id: Ic83f3b23e8e8954bb8aa211301baba24e8c20ef6 Signed-off-by: Ole Troan <ot@cisco.com>
2019-05-10Fix 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>
2019-05-09add mactime plugin unit / code coverage testsDave Barach2-5/+22
The unit and code coverage tests are boring. The rest of the patch involves test and packet-generator infra cleanups. Teach the "make test-xxx" family of targets to set the api test plugin path correctly, to make "binary-api <api-message-name> <args>" debug CLI commands work correctly in the "make test" environment. Unfortunately involves both the top-level and test Makefiles. Add a minor pg cli feature, a CLI to manually set s->sw_if_index[VLIB_TX]. Consider the case where one configures an interface with both a device-input and an output feature. To test the output feature using the pg, it's necessary to inject packets into the interface output node with both b->sw_if_index[VLIB_TX] and b->sw_if_index[VLIB_RX] set correctly. For example: packet-generator new { name tx limit 15 size 128-128 interface local0 # rx: device input feature not configured on local0 tx-interface loop0 # tx: output node requires b->sw_if_index[VLIB_TX] node loop0-output data { hex 0x01005e7ffffa000dead0000008000102030405060708090a0b0c0d0e0f0102030405 } } Fix a longstanding bug in the packet generator stream setup. Remove kludges which set b->sw_if_index[VLIB_TX] to ~0 [in multiple places] instead of using the stream value s->sw_if_index[VLIB_TX], and setting THAT datum correctly. Change-Id: I1097a18e8db73661ded6b822c1d718f7e5cf36ed Signed-off-by: Dave Barach <dave@barachs.net>
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-05-01virtio: remove configurable queue size supportMohsin Kazmi1-4/+0
Native virtio device through legacy driver can't support configurable queue size. Change-Id: I76c446a071bef8a469873010325d830586aa84bd Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-04-30stats: fix non null terminated stringBenoît Ganne1-0/+5
Change-Id: I08e490d9e955072eff20d0141598157d995bcb56 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-04-29API: Add support for limits to language.Ole Troan1-4/+4
string name [limit = 64]; Meta-data to do argument validation. Change-Id: I1f3e0f09b2d5285224399413d25206f77bd3f4b1 Signed-off-by: Ole Troan <ot@cisco.com>
2019-04-19Doxygen 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> (cherry picked from commit 11ee93f6abfaddf5bbd56cf0858c0c6ea0384b65)
2019-04-18GRE: API updateNeale Ranns1-14/+12
Change-Id: I5010cd34123c6498230dedac6ba8dd774a1085f9 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-16stats: Add name vectors to Python clientOle Troan1-2/+3
Change-Id: Ic62dfa0bf3e082a0b999026830c64a9c543da586 Signed-off-by: Ole Troan <ot@cisco.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>
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