summaryrefslogtreecommitdiffstats
path: root/vnet
AgeCommit message (Collapse)AuthorFilesLines
2016-10-13VPP-286: Add CLI Command documentation via doxygen comments for vnet/vnet/ip.Billy McFall14-164/+1105
Change-Id: Ie1be9dc057d07c250852952ea159ed3c44c25f5f Signed-off-by: Billy McFall <bmcfall@redhat.com>
2016-10-13vhost-user: Add reconnect supportDamjan Marion1-0/+1
QEMU 2.7 introduces reconnect support. However it doesn't send last state of last_avail_idx in the SET_VRING_BASE. With this patch we are overriding SET_VRING_BASE with value taken from used->idx. It is a bit hackish as it basically overrides SET_VRING_BASE provided value but it should work in most of the cases. This is what author of reconnect code is also suggesting in his post: https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg01495.html Change-Id: I10e5f401c409d2989bf6c43eaea377800a9c76df Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-13VPP-483: Fixed IPSec tunnel interfaceMatus Fabian1-1/+10
Change-Id: I570f57218293a4824f83b38575eacdbe3da540d8 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-10-13vpp_lite: add cpu pinning support (VPP-467)Pavel Kotucek3-6/+6
Proper cpu pinning in vpp_lite platform, like in normal vpp image. Extended “show threads” command to show propper information. Changed handling of coreID and socketID for threads in "show threads" CLI, pthread_getaffinity is used instead of info stored in DPDK. Change-Id: Ic8299ec5e284472bb10a37a95fadeed57b6edae8 Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-10-12Fix coverity warnings, VPP-486Dave Barach2-2/+2
Change-Id: I7a14d9a28514cdb49f65fab1b120b53239fed7e3 Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-12VPP-213: vnet classifier does not work for l3 ip4 rulesOle Troan1-26/+34
The classifier was written with the assumption that next-indicies of IP4 and IP6 IP_LOOKUP_NEXT nodes are equal. That's not true, and this patch splits the classifier session for IP4 and IP6. Change-Id: Id0368f17bb1d3f145b771d2dc283b56871264e99 Signed-off-by: Ole Troan <ot@cisco.com>
2016-10-12Coverity warnings in new FIB code (VPP-484)Neale Ranns9-7/+27
Change-Id: Ie221e246dd8c6a1b3c76e7aa85924762d4397782 Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-12VPP-362 Implement dumping of LISP adjacenciesFilip Tehlar3-3/+98
Change-Id: Ieea56f3bf9e749878d9f2b35d39d9f7a9cdabde4 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-10-11Rename ip_feature_init_cast(...) to vnet_feature_arc_init(...), VPP-481Dave Barach9-306/+341
Eliminate an unused parameter in vnet_feature_arc_init(...) which eliminates a spurious relationship between feature arcs and ip. Add doxygen tags for 2x debug CLI commands, and for vnet_feature_arc_init(...) Change-Id: If83589539bcbbbd4d85e84458dd7eb7eb08837a0 Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-10ipfix: add l4 unformat support for mask and match (VPP-204)Juraj Sloboda2-11/+201
Change-Id: Iff32c488af9b71acbc4e572c6741afae0a67333c Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-10-10ipfix: add classification nodes for flow statistics (VPP-204)Juraj Sloboda9-1/+647
In order to have meaningfull IPFIX implementation we should be able to classify all packets flowing through vpp. But existing IPv4 and IPv6 classifier nodes are called only if destination IP address is local to vpp. This commit adds new IPv4 and IPv6 classifier nodes that should be used for collecting flow statistics. Change-Id: I60e60105663ba15b5200862a23bb817047fe4d1a Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-10-10FIB2.0: memory leaks during load-balance update (VPP-475)Neale Ranns12-333/+658
some other fixes and enhancemets to address failures in the IPv6 Scale testing: - The rate at which VPP sends ARP/ND requests, 1 per-millisecond, is too high. This is reduced to 1 every 10 ms. probably still too high. - If an ARP/ND response is received that does not contain a change to the known MAC address, no further processing is done. - Added stats to get info about the async FIB walks. - When walking FIB entries and performing a load-balance update, it is not necessary to re-insert the LB in the forwarding table. Change-Id: Ifd47e4bdbce94495f44aaf1b78e7d1395ed870d1 Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-10Fix double free in af_packet api/cliIvan Kelly2-3/+7
The api was allocating a vector for the name, passing it, then freeing it, on create. The cli allocated, passed then forgot about it. af_packet_create_if was storing a reference to the name, which in the case of the api, meant it was referencing dead memory. On af_packet_delete_if this reference was freed, so in the api case, there was a double free. Also, the cli for delete leaked the name. Change-Id: I4d572bd2936eaf8ea7a0a8ff282e83ac2bf1b062 Signed-off-by: Ivan Kelly <ivan@midokura.com>
2016-10-07unicast RPF for FIB2.0Neale Ranns22-207/+1223
In a heirarchical FIB performing a unicast RPF check would require the traversal of the data-plane graph to seek out all the adjacency objects and then read those to find their interface. This is not efficient. Instead, for each path-list we construct a list of unique input interfaces and link this uRPF-list against the entry in the prefix table. In the data-plane the uRPF list can be retrieved from the load-balance lookup result and the RPF check is a simple and efficient walk across the minimal interface list. The uRPF-list is maintained as the routing heirarchy changes, in a similar way to the data-plane object graph. We also provide a knob to allow an arbitrary prefix to pass the loose check. Change-Id: Ie7c0ae3c4483ef467cfd5b136ee0315ff98ec15b Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-07VPP-395 Add udp-punt node(s) and APIAlexander Popovsky (apopovsk)5-3/+379
Uses existing UDP local API in order to register requested UDP port punt to the host. CLI: set punt udp [del] <port> API: punt protocol <l4-protocol> [ip <ver>] [port <l4-port>] [del] * Only UDP (l4-protocol = 17) is supported at this time Change-Id: I9232af1c891d1ed174d77f3e0dfe60c4b9d85e40 Signed-off-by: Alex Popovsky <apopovsk@cisco.com>
2016-10-07VPP-464: Fix IPSec-GRE tunnel input with FIB 2.0Matus Fabian2-0/+10
Change-Id: Ic29592d39f1d672cb6e7e32b4af6123683e022a7 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-10-06Fix IP6 ND solicitation termination to allow link-local source IPJohn Lo2-5/+3
Move check for link-local source IP address for MAC/IP notification only. Allow generation of response to IP6 ND solicitation request if a match is found for target IP irrespective of source IP type. Change-Id: Ib79d4b75fb4fe8aece625fd8cd26c8b9fc75ea47 Signed-off-by: John Lo <loj@cisco.com>
2016-10-05Fix crash caused by "show trace" due to incorrect usage of IP adjacency.Vengada Govindan1-9/+9
Change-Id: Ice0a6939b399eed150b0c58139b79dd4bed91113 Signed-off-by: Vengada Govindan <venggovi@cisco.com>
2016-10-05Fix LISP map-request resend deadlockFlorin Coras1-4/+7
Change-Id: I2cc57079741279669241b88d0317853e1312e8c5 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-10-05dpdk: fix issue in parsing startup.conf dpdk sectionDamjan Marion1-1/+1
Change-Id: Ibbcce6f54bc76b8922b1c649278643c6294d13f9 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-04Fix CLI 'set interface unnumbered' to work with FIB 2.0Igor Mikhailov (imichail)1-0/+4
Commit of the patch from Neale Ranns Change-Id: Ia0480ef56036dd0aec990c3892a93b99eb9fb893 Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2016-10-04Minor tweaks to hqos docChris Luke1-287/+404
- correct formatting errors - add to user_doc tree - unix line endings, not windows(!) Change-Id: I9aa5511c398fc33ecb25fb33ae64c8e666c56dd8 Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-10-04Fix LISP L2 fwd entry updatesFlorin Coras1-7/+10
Change-Id: I554041bf47aa82dd6f6e0563c68d8bbd3b18b255 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-10-04VPP-355: add PBB (802.1ah) tag rewritePavel Kotucek8-103/+503
- new API/CLI to define pbb tag rewrite on interface - encapsulation/decapsulation of PBB tags - tracing of PBB header - PBB tag rewrite operations Change-Id: I538b3025a8b2e41cdeed9f10fea94bbcd28b5f5f Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-10-03FIB Memory Usage DiagnosticsNeale Ranns27-387/+333
add two new CLI commands: show fib memory show dpo memory to display the memory usage of the FIB and DPO object types respectively. Change-Id: I759e149a0b6fbb58d59c139362221dc33531cffa Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-03vhost-user: avoid branching during prefetchDamjan Marion1-5/+2
Change-Id: I1f4421289b2f93b64a2470559d834717ef40e181 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-03vhost: predict map_guest_mem returns similar results over timePierre Pfister1-13/+44
It is very likely that all packets are being stored in the same memory area. It is also likely that all indirect descriptors are being allocated from the same area. This patch takes this into account by predicting the value returned by map_guest_mem will be the same as the previous one. It falls back to slow mode otherwise. Change-Id: Ic1044a172fc4abe77387ba2e19e11cd1f39ad1e3 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-10-03Fix string parsing in lisp map-request itr-rlocs commandFilip Tehlar1-1/+1
Change-Id: Ie17b324492d61130690ba9d05821eaefe10072d4 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-10-03L2 over LISP and GRE (VPP-457)Neale Ranns55-2234/+3596
Change-Id: I0d7f9c7f41a9f9e0acb0950adedb90d45df08c2a Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-03(VPP-455) arp doesn't work when ip4 classifier configured with fib 2.0Neale Ranns7-6/+160
Change-Id: I046de0c00db75d25ed90e33e9910c9dd0ff95580 Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-09-30VPP-363: add ability to change mac address of the interfacePavel Kotucek9-0/+179
Added ability to change interface address. Added new CLI and API functions. Change-Id: Ia336bc75ad8c5858c26f39af851485c4c6f19f58 Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-09-30Fix double-free crashDavid Hotham1-0/+1
loop0 interfaces were transmitting the same packets multiple times, eventually causing them to be freed multiple times Change-Id: I32fcf5cfa10e58bb9e9bbbbc1b9312518d00ee9f Signed-off-by: David Hotham <david.hotham@metaswitch.com>
2016-09-30VPP-454 Fix LISP GID dictionary issueFilip Tehlar2-7/+54
GID dictionary IP prefix entries are rewritten with more narrow one which is not desirable. This patch does exact matching instead of longest prefix matching. Change-Id: I0191e23229a69ffe86f82ea4d71e4a5534dbb5b0 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-09-30VPP-450 Fix adding LISP adjacencies via CLIFilip Tehlar2-67/+46
Change-Id: If90c9c630629e727fffc5d450516045a04433661 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-09-28DPDK HQoS: Enable Hierarchical Scheduler in VPPJasvinder Singh8-4/+1935
This commit extends the vpp framework with new thread type "hqos-threads" that runs the Hierarchical Quality of Service (HQoS) scheduler associted with output interface. HQoS Scheduler prioritize the packets from different users and ensures sufficient bandwidth to pass the more important traffic. At high level, HQoS scheduler is a buffer that can temporarily store a large number of packets. In otherwords, it is a collection of large number of queues organized into hierarchy of 5 levels; the port (i.e. the physical interface) is at the root of the hierarchy followed by the subport (a set of users), the pipes (individual users), the traffic classes (each with a strict priority) and at the leaves, the queues. In each HQoS scheduler, three operations are performed; classification (setting HQoS port, subport, pipe, traffic class and queue within traffic class from packet fields), enqueue (selecting HQoS queue for the packet, and to drop the packet if the queue is full) and dequeue (schedule the packet based on its length and available credits, and handover the scheduled packet to the output interface). In vpp, the number of hqos threads will be equal to cpu cores specified in corelist-hqos-threads parameter cpu section of the vpp configuration file. One hqos thread can run HQoS for multiple output interfaces. A particular HQoS instance is initialised with default parameters required to configure hqos port, subport, pipe and queues. Some of them can be re-configured in run-time through CLI commands as well binary APIs. Following illustrates the sample startup configuration file with 4x worker threads feeding 2x hqos threads that handle each HQoS for 1x output interface. For more details on HQoS configuration please refer to DPDK Programmer's Guide. dpdk { socket-mem 16384,16384 dev 0000:02:00.0 { num-rx-queues 2 hqos } dev 0000:06:00.0 { num-rx-queues 2 hqos } num-mbufs 1000000 } cpu { main-core 0 corelist-workers 1, 2, 3, 4 corelist-hqos-threads 5, 6 } Change-Id: I635c3395a7c4ddf0a239ef77b0b0a31a6dfc4767 Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2016-09-28Fix packet trace for IP4/IP6 lookup/forwarding nodesJohn Lo2-11/+8
Change-Id: Ibf3d2e69dbac28fbef77d8ba20d7f5a60eea0198 Signed-off-by: John Lo <loj@cisco.com>
2016-09-27classify: fix issue with output classify node using wrong sw_if_indexChristophe Fontaine1-6/+6
Output classify node should use sw_if_index[VLIB_TX] Like in l2_output.c, we have to use sw_if_index[VLIB_TX] to get the appropriate configuration. Change-Id: I96b1a03ddf5c9e9c45fa3f5df3ea88895ed4345e Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-09-27arp: handle ARP proxy after tunnellingDavid Hotham1-3/+4
Only rewind the buffer back to the start of the ethernet header, rather than all the way. We don't want to undo earlier decapsulation. Change-Id: I5f4b183eb3e8df690695ce3a97e55f3b0579a266 Signed-off-by: David Hotham <david.hotham@metaswitch.com>
2016-09-27Fix hugepage detection issueDamjan Marion1-40/+5
Per-numa free hugepages number was not read correctly due to wrong sysfs path. Change-Id: I889111027d7f93c42e2e4673d8d4e8f75ae065b6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-27Fix "show adj nbr" displaying IP4 address for IP6 neighborsJohn Lo1-2/+2
Change-Id: Ic453e68bbd3d5ae8d57b513da6781bb957fc84a4 Signed-off-by: John Lo <loj@cisco.com>
2016-09-27fix create sub-interface range cliEyal Bari1-1/+3
the create sub interface command was creating the interfaces with the same outer_vlan value - causing an error changed to use the interface id as outer_vlan in case of a range Change-Id: I3808094d1c99a37adac61e3ece573a6687306461 Signed-off-by: Eyal Bari <ebari@cisco.com>
2016-09-27Fix CLI for adding negative LISP fwd entriesFlorin Coras1-0/+1
Change-Id: I9ee7b6ea2def16715f717f8483c86e0157628946 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-09-27LISP Source/Dest control plane support, VPP-197Florin Coras7-115/+592
Change-Id: If88e4161e0944b657e6183b7b44348f7f46ba0a8 Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-09-26Fix for potential use of uninitialized variablesIgor Mikhailov (imichail)1-23/+13
The code allowed for the command 'set interface unnumbered' to be processed without specifying any parameters, thus the set logic of the command would have been using uninitialized variables 'unnumbered_sw_if_index' and 'inherit_from_sw_if_index'. Change-Id: I4de14fa1096527c5c48f74304db379f9953760a8 Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2016-09-25Packet-generator related fib 2.0 fixesDave Barach2-4/+10
Fix dpo0->dpo1 typo in ip4_local source RPF check. Pass source RPF check on drop adjacencies. Add a bit of defensive driving in ip4_icmp_error(...). Change-Id: I0e444886953f5500766f9b9662fad79fef44a260 Signed-off-by: Dave Barach <dave@barachs.net>
2016-09-23Rmove duplicate register of unformat_l2_input_next_nodeHongjun Ni1-3/+0
Change-Id: I38dc7c37b0debcea9aa1a366b516e86505dd096e Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-09-23Fix source RPF check in ip4_localDave Barach1-0/+5
We need to accept src ip addresses which hit receive and clean adjacencies. Change-Id: I8cf07f622058203665ed09280452ed8412984bd5 Signed-off-by: Dave Barach <dave@barachs.net>
2016-09-23Fix eventfd leakage issue in vhost-user modeSteve Shin2-6/+57
The leakage happens on the file descriptors for kickfd and vring's callfd. Those file descriptors should be closed when vhost-interface is disconnected. Change-Id: I12453b0c3eac037a1dc040a001465059b8f672c2 Signed-off-by: Steve Shin <jonshin@cisco.com>
2016-09-23VPP-424 fix lldp_main declarationKlement Sekera1-1/+1
Change-Id: I1f30977f0b315fa72d73a29a8585b1711d5044d8 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-09-23Fix detection of packet output via BVI into a BD and SHG adjustmentJohn Lo3-9/+13
In BVI output node, set a signature value in packet buffer field sw_if_index[VLIB_TX] so l2-input node can reliably check that packet came into a BD through BVI so it can set the SHG of the packet to 0 for a unicast packet. Change-Id: I301aa2896677e11d0c964ca476dddcb5a8804fc2 Signed-off-by: John Lo <loj@cisco.com>