summaryrefslogtreecommitdiffstats
path: root/src/vnet
AgeCommit message (Collapse)AuthorFilesLines
2018-01-23VPPAPIGEN: vppapigen replacement in Python PLY.Ole Troan40-73/+91
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-21vhost_user: 'nregions' saves the actual number of mapped guest physical ↵Haiyang Tan1-1/+2
address area This patch fixed the VMA leak that if mapping one of guest physical address area get failed. Change-Id: I07b0b9a932209561d6ff2b2dd08a111ea5db2209 Signed-off-by: Haiyang Tan <haiyang.tan.dev@gmail.com>
2018-01-19vxlan:restructure encap loopEyal Bari1-321/+198
unified some code from IPv4/6 pathes replaced unrolled rewrite copy with simple assignment refactored stats handling was not tested for performance Change-Id: I00aeb9dd5b72584e6606e1a076e5c8270389aaa4 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-01-19Sub-Interface deletion not cleanup hash's properly (VPP-1136)John Lo2-14/+18
On deleting sub-interfaces, functions vnet_delete_sub_interface() and vnet_delete_hw_interface() are not cleaning up sub-interface related hash tables and memory properly. Change-Id: I17c7c4b2078c062c77bfe48889beb677610035ca Signed-off-by: John Lo <loj@cisco.com> (cherry picked from commit 7f5bec647c9dc743c015d461d040e63a77fd0a08)
2018-01-18vlib: add vlib_buffer_alloc_to_ring APIDamjan Marion2-11/+4
Change-Id: I4e2804754b443f5f41fb25eed8334908c4a70f84 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-01-18tapv2: add option to set host-side default gwDamjan Marion7-2/+97
Change-Id: I76fd655ecd9445299b94b3b5af10e7b1588584e4 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-01-18FIB Inherited SrouceNeale Ranns18-137/+1621
forwarding provided by the source is pushed to all other entries it covers in the sub-tree Change-Id: I2a45222ef653358f55c2436de3e3c6353cfadba2 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-01-17Fix checksum offload sssue caused by overwriten lX_hdr_offsetDamjan Marion1-2/+2
This happens when 2 packets belonging to 2 different interfaces hit dual loop in the ethernet-input. Packets go to slow path which doesn't set l2 hdr offset correctly for l3 packets. Change-Id: I61d87c079db0b2e21f8af6f6b600bff14030535d Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-01-16Tolerate missing nodes during feature arc initialisationNeale Ranns1-2/+8
Change-Id: Ib0d0b663bf71ce52ead2f81140c710f31f040f89 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-01-16tapv2: deleting tap interface may leak buffers (VPP-1124)Steven4-11/+34
Buffers may be allocated for indirect descriptors by tx thread and they are freed when tx thread is invoked in the next invocation. This is to allow the recipient (kernel) to have a chance to process them. But if the tap interface is deleted, the tx thread may not yet be called to clean up the indirect descriptors' buffers. In that case, we need to remove them without waiting for the tx thread to be called. Failure to do so may cause buffers leak when the tap interface is deleted. For the RX ring, leakage also exists for vring->buffers when the interface is removed. Change-Id: I3df313a0e60334776b19daf51a9f5bf20dfdc489 Signed-off-by: Steven <sluong@cisco.com> (cherry picked from commit d8a998e74b815dd3725dfcd80080e4e540940236)
2018-01-15bfd: fix bfd_auth_keys_dumpFlorin Coras1-1/+1
Change-Id: I58598f18b9af70e580be4d28a0c40ec0ffcd5dca Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-15svm: refactor memfd and remove ssvm_ethFlorin Coras3-976/+0
Change-Id: Icde296e956eb89ea3a17d547f04a833916ec6440 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-13Improve "show xxx tunnel" and "show int addr" outputJohn Lo5-139/+111
Improve "show xxx tunnel" output functions format_xxx_tunnel() for GRE, VXLAN, VXLAN-GPE, GENEVE and GTPU tunnels to make their output more consistent and provide better information. Improved the output of "show int addr" to make its info more consistent with tunnels and provide fib-index info. Change-Id: Icd4b5b85a5bec417f8ee19afea336c770ad3b4c5 Signed-off-by: John Lo <loj@cisco.com>
2018-01-11api: fix handlers that explicitly depend on svm queueFlorin Coras4-40/+38
Fixes the remainig apis that explicitly check svm queue length. Change-Id: I6055c7c50050affee3098e162e15fb12c205e5db Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-11tcp: make proxy server uri cli configurableFlorin Coras2-3/+18
Change-Id: I94c7315558ccc9f3d4bcdefd09a696234bc56227 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-11api: remove transport specific code from handlersFlorin Coras29-604/+525
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-11Handle a mix of CNAME, A/AAAA recordsDave Barach1-10/+30
Poster-child: 8.8.8.8 resolving mag.ncep.noaa.gov Change-Id: I600cd0274b9017e9c91817511d3d3366f0bd02b9 Signed-off-by: Dave Barach <dave@barachs.net>
2018-01-11Add support for MAP-T CE (VPP-1058)Juraj Sloboda5-162/+441
Change-Id: Ib99058323c50f20fcdb44185aee027c5c6ef8c91 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-01-10Functional improvements, bug fixesDave Barach4-25/+152
At least when testing against "known good" DNS servers: it turns out that sending 2x requests - one for an A-record and another for a AAAA-record - seems to work better than sending a single DNS_TYPE_ALL request. Fix c-string vs. u8 vector mistakes. Fix server failover. Change-Id: I26554f0a9c1744376f21372506ebec8658e351e2 Signed-off-by: Dave Barach <dave@barachs.net>
2018-01-09VPP-1113 SR MPLS path.frp_label_stackPablo Camarillo1-17/+16
provide one label stack per fib_table_entry_path_add2 call. otherwise multiple mheap releases take place. Change-Id: I475ca1b801fc85dddda0b540c69ad628a274df7f Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
2018-01-09VPP-1120 SRv6 bug with SID list containing only one SID and no srhPablo Camarillo1-26/+64
Packets with a SR policy of one SID list create a malformed packet. Outer IPv6 header points to a routing extension header that does not exist since the SID list contains only one SID. Change-Id: I1effee0457453bab95706a8a24fdabfbd843d5b7 Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
2018-01-09api: refactor vlibmemoryFlorin Coras50-284/+248
- 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>
2018-01-09GRE tunnel key should use fib_index instead of fib_id (VPP-1118)John Lo1-12/+1
Follow up fix - vl_api_gre_add_del_tunnel_t_handler should pass outer_fib_id from API message to vnet_gre_add_del_tunnel() and not convert it to fib_index, since vnet_gre_add_del_tunnel() already perform the lookup to get fib_index from fib_id. Change-Id: I24967a97f82ce018ddef596e556bd3eb1706cb63 Signed-off-by: John Lo <loj@cisco.com>
2018-01-09DVR: run L3 output featuresNeale Ranns15-496/+780
- rename l2_bridged to is_dvr. Including on the ip.api this was new in the 18.01 release so no compatability issues. - steal the free space in vnet_buffer_opaque_t for use with flags. - run the ipX-output feature arc from the DVR DPO Change-Id: I040e5976d1dbe076fcdda3a40a7804f56337ce3f Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-01-09BIER: crash in show command when no tables are presentNeale Ranns1-0/+1
Change-Id: Ie291468ea9d05c47cefe39c4ff7fea3e016bacf2 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-01-09BIER: missing endian swap for imposition object in API returnNeale Ranns1-1/+1
Change-Id: Iddd754d00ace3d042336e5c2c40431566275051a Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-01-08Fix missing dereferenceJuraj Sloboda1-1/+1
Change-Id: I123259c131f1bd16c70990bf7f48d9a275c53ce2 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-01-08NAT64: IPFix (VPP-1106)Matus Fabian1-1/+5
Change-Id: Ib90dc5613c9fdac0344b3bd7f163e2f7163c64d8 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-01-06GRE tunnel key should use fib_index instead of fib_id (VPP-1118)John Lo1-2/+11
The code path in src/vnet/gre/interface.c uses fib_id as a component to generate hash key for GRE tunnel. This should be fib_index as the GRE rx/decap data path will be using fib_index to generate the hash key to lookup the GRE tunnel. Change-Id: Ia7f0892d84f9dac79223a6e016775892b61eb5fb Signed-off-by: John Lo <loj@cisco.com> (cherry picked from commit 72247c803250894834d15952a6fddcd8f4a39a9c)
2018-01-06VPP-1110 BVI reply ARP that doesn't request BVI loacl IP.zhaoqingling1-0/+6
Change-Id: I66ae618edaa12c2b4e4afe276da689673b02c9cd Signed-off-by: zhaoqingling <zhao.qingling@zte.com.cn>
2018-01-05sock api: add infra for bootstrapping shm clientsFlorin Coras1-14/+0
- add function to sock client that bootstraps shm api - allow sock clients to request custom shm ring configs Change-Id: Iabc1dd4f0dc8bbf8ba24de37f4966339fcf86107 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-05Unify and cleanup usage of hash_set/unset_mem by various tunnelsJohn Lo3-78/+30
Move the functions hash_set_key_copy() and hash_unset_key_free() which are dupilicated in various tunnel support code modules to hash.h as hash_set_mem_alloc() and hash_unset_mem_free() to be used by all. Change-Id: I40723cabe29072ab7feb1804c221f28606d8e4fe Signed-off-by: John Lo <loj@cisco.com>
2018-01-05MAP: Add RFC6052 mapping to MAP-TOle Troan5-19/+73
Change-Id: I2e311f8b7f50133678b9172e8d071826af491609 Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-01-05VPP-1115 Fix a debug log mistake when create AF_PACKET socketzhaoqingling1-1/+1
Change-Id: Id6607adbe5da8ae8472dde8bb442ca5f68f6d84f Signed-off-by: zhaoqingling <zhao.qingling@zte.com.cn>
2017-12-22tcp: add builtin server/client transfer testFlorin Coras4-33/+60
Change-Id: Iab0baabf2f27bc7ad7fbf2d2789a493752b07d8a Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-12-21fib: make deag entries urpf extemptFlorin Coras5-0/+19
Change-Id: Ie8f6bb4fcd3e4fa269e86a77d2f21c87f372b783 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-12-21VPP-1109 Fix loop for some CLI (code review)Swarup Nayak1-0/+3
Change-Id: I518387ab479bee4778d45a33c95f7b0f72aa1b72 Signed-off-by: Swarup Nayak <swarupnpvt@gmail.com>
2017-12-20L2 EmulationNeale Ranns2-1/+2
L2 Emulation is a feautre that is applied to L2 ports to 'extract' IP packets from the L2 path and inject them into the L3 path (i.e. into the appropriate ip[4|6]_input node). L3 routes in the table_id for that interface should then be configured as DVR routes, therefore the forwarded packet has the L2 header preserved and togehter the L3 routed system behaves like an L2 bridge. Change-Id: I8effd7e2f4c67ee277b73c7bc79aa3e5a3e34d03 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-12-20Fix MPLS local-label CLI help stringMarek Gradzki1-1/+1
CLI parsing code (unformat_fib_route_path) does not recognise 'resolve-via-connected'. However it understands 'resolve-via-attached'. Change-Id: I57e5eb75199cb8ae72c0fc8642a41f042b022201 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-12-20VPP-1083 "ip punt redirect add" crashed if not mentioned any other parameterSwarup Nayak2-8/+28
Change-Id: Ibb6f450783d0ab64bd943c19f12d0954b0a94b24 Signed-off-by: Swarup Nayak <swarupnpvt@gmail.com>
2017-12-19BIER coverity fix in route downlaodNeale Ranns2-3/+3
Change-Id: I9341f1554d804dfeeecef656e59e8598704863dc Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-12-19FIB memory leak during recursive loop detectionNeale Ranns1-0/+2
Change-Id: I5ecd43330b3329b072e6da62a4eed1641eb17f8f Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-12-19VPP-1032: fix coverity warning in bierDave Barach1-2/+2
Change-Id: I0f8d2d9be78d4d936ed61538aee1b7207871347b Signed-off-by: Dave Barach <dave@barachs.net>
2017-12-19Fix passing bad context for callback functionJuraj Sloboda1-2/+2
Change-Id: I61e6019ab34f52c82bf3f1e5327501a613f58bd9 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2017-12-19lldp: Fix Coverity Warnings CID 177942, CID 177945Dave Wallace1-1/+1
Change-Id: Ic1ab32c5df3f7a613fe0dcd6bfc15037fa2a008b Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-12-18session api: Fix Coverity Warning CID 180115Dave Wallace1-1/+1
Change-Id: I87e3de556910851d16af343bfcbede49500843ff Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-12-18SR-MPLS: binary API and automated steeringPablo Camarillo8-502/+1675
Change-Id: Iacfbaaa91ea8bd92790dec9fce567063bdbc5d64 Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
2017-12-18VPP-269 Coding standards cleanup - vnet/vnet/policerKrishanpal singh1-11/+14
Change-Id: Ib92794205027d3242c6f0c8962fe02ac38c7129b Signed-off-by: Krishanpal singh <krish.singh03@gmail.com>
2017-12-16GRE tunnel key includes the FIB tableNeale Ranns4-137/+219
- GRE tunnels with the same src,dst addresses are not the same tunnel - Two data-plane improvements: - the cached key was never updated and so useless - no need to dereference the tunnel's HW interface to get the sw_if_index Change-Id: I2f2ea6e08c759a810b753cec22c497e921a2ca01 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-12-16Use crc32 wrapper (VPP-1086)Gabriel Ganne1-4/+4
This allows arm platforms to also take advantage of crc32 hardware acceleration. * add a wrapper for crc32_u64. It's the only one really used. Using it instead of a call to clib_crc32c() eases building symmetrical hash functions. * replace #ifdef on SSE4 by a test on clib_crc32c_uses_intrinsics. Note: keep the test on i386 * fix typo in lb test log Change-Id: I03a0897b70f6c1717e6901d93cf0fe024d5facb5 Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>