aboutsummaryrefslogtreecommitdiffstats
path: root/vnet
AgeCommit message (Collapse)AuthorFilesLines
2016-06-22CLI to update locator-setAndrej Kozemcak1-6/+83
Change-Id: I60ea36362a2c4b7c936dde501a3d737b68a8c9ff Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-06-22Fix for build failure due to iOAM plugin header file pathShwetha1-0/+1
Change-Id: Ie5d270a01e3ca0687a407aeebc42aacc53a01ddc Signed-off-by: Shwetha <shwethab@cisco.com>
2016-06-21Check if LISP is enableAndrej Kozemcak5-13/+104
Lisp enable flag is enforced. DP API should not be call if the dp is disable. Change-Id: I265cf3ea0460987f3fd5fd84b43127dd3b1c43c3 Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-06-20VPP-143: Correctly drop local l2tp packets when no session is foundPierre Pfister3-14/+48
When receiving a local ipv6 packet containing an l2tp packet not associated with any session, l2tp node was handling the packet as if provided by an ipv6 feature, hence crashing. This patch fixes the issue by correctly dropping the packet instead. This patch also fixes a typo from commit d65346098daf896. Change-Id: I1b377fc5685568c16831920227671feffac64287 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-06-19Output interface MTU check ignored in double-loopChris Luke1-8/+9
In the double loop of ip4-rewrite, when forwarding packets, the outbound interface MTU check occurs too late in the double-loop to be actioned. Change-Id: Ifc44e65d6ddb832aa0161d0685b1a28378541905 Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-06-19Fix use of lookup_next_index in LISP src/dst FIBFlorin Coras2-12/+79
Adjacencies in LISP src/dst FIB store the index of the LISP output interface (next node after lookup) in the lookup_next_index. Since the values of interface node indexes are not constrained, they can collide with the 'special' adjacencies IP_LOOKUP_NEXT_LOCAL and IP_LOOKUP_NEXT_DROP. As a result, at allocation time, LISP ajacencies may be automatically shared with the previous two, predefined adjacencies and all LISP specific state stored in the rewrite area is lost. This fixes the problem by 'hijacking' the explicit_fib_index instead of the lookup_next_index field. Change-Id: I3c59121dcf0851decf5c08004143d1201dbd1ece Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-06-18Fix node registration in ixge driverDamjan Marion1-2/+1
Change-Id: Ia98ed873954feaa7bf1f13d8eb4054d0afba495e Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-18Give correct argument to ip_call_add_del_adjacency_callbacksPierre Pfister1-1/+1
ip_call_add_del_adjacency_callbacks requires an adjacency index, not a sw_if_index. Change-Id: I4ae6a6bbbe0abee4791217463d353c56f9735ba3 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-06-18Move pkt replication counter to the opaque2 cache lineDave Barach9-20/+17
Change-Id: I5e6edfd03ab41949be2c768dfe68aa824bbc1f38 Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-17Dynamically compute ip feature subgraph orderDave Barach19-135/+530
This change-set enables plugins to add themselves to the ip4/ip6 feature subgraphs without having to modify core vpp engine code at all. Add VNET_IP4/IP6_UNICAST/MULTICAST_FEATURE_INIT macros which express the required ordering constraints, and off you go. Along the way, added an implementation of Warshall's algorithm to vppinfra; to compute the positive transitive closure of a relation. In this case, the relation is "feature A runs before feature B." With that in hand, ip_feature_init_cast(...) computes a partial order across the set of configured feature subgraph nodes. In unit-testing, we discovered VPP-145 - ip4/6 inacl wiped out vnet_buffer(b)->ip>current_config_index, which exists in main. So, we fixed that by moving b->trace_index, adding b->current_config_index, and removing the ip opaque union current_config_index. Change-Id: Iff132116f66413dc6b31ac3377198c7a32d51f48 Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-17Support NAT across multiple interface pairsShesha Sreenivasamurthy2-57/+140
Some of the commands require interface name as an additional parameter as we support multiple interfaces. Example: set vcgn map inside TenGigabitEthernete/0/0 10.1.0.1 - 10.1.0.1 show vcgn inside-translation protocol tcp interface TenGigabitEthernete/0/0 inside-addr 1.0.0.2 show vcgn outside-translation protocol tcp interface TenGigabitEthernet9/0/0 outside-addr 10.1.0.1 Change-Id: Id691ccd3f2c863c665a1568982c819b79dda007e Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-06-17VPP-76:APIs for Proof of transit feature added to iOAMShwetha7-1120/+125
Moved Proof of Transit utility as a plugin Moved Proof of Transit option as a plugin Change-Id: Idc9897205eb8ec80c5dea47b428e6209ac938c32 Signed-off-by: Shwetha <shwethab@cisco.com>
2016-06-17New LISP API map-request itr-rlocAndrej Kozemcak2-1/+141
API to constrain source locator when sending map-requests. lisp map-request itr-rloc <locator-set name> Change-Id: I19f3a1aa8a387ca8662ccf3a4ad774ea7d655f80 Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-06-17VNET: Initialization support for NXP DPAA2 poll mode driverSachin3-1/+13
- NXP proposed a poll mode driver "rte_dpaa2_dpni" in DPDK upstream. - When using external DPDK with the given dpaa2 driver, VPP needs modification to initialize the PMD and to understand the DPAA2 N/W interfaces. Change-Id: I00eb127fa88c71fb430d3def238d50ba68fd595f Signed-off-by: Sachin <sachin.saxena@nxp.com>
2016-06-17Consolidate use of IP fib functions in LISP CPFlorin Coras1-143/+108
Clean up, refactor and consolidate LISP CP functions that interact with ip interfaces and fibs. Change-Id: I214eaebbec8d43646118df0948d0f82f923a5b43 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-06-156rd: Move to pluginOle Troan7-763/+1
- Change toplevel plugins make target. Now builds all plugins under plugins/. (Apart from sample-plugin). - Move sixrd code to plugins directory and make necessary changes to make it a plugin - Remove 6rd hooks from IP lookup code Change-Id: I447e92e3bee240cd8de01d0abac2e1708e8c27d1 Signed-off-by: Ole Troan <ot@cisco.com>
2016-06-16VPP-19: Split the lookup.h IP_LOOKUP_NEXT enum.Ole Troan11-339/+50
IP4 and IP6 nodes currently shares the adj->lookup_next_index. That has some issues, e.g. that one has to add non-functional nodes like ip4-hop-by-hop and that anyone dynamically adding nodes to any of the IP4/IP6 lookup nodes must ensure they add themselves to all relevant nodes to ensure next index consistency. This patch splits the IP_LOOKUP_NEXT into separate enums for IP4 and IP6 with a common part for next-nodes used by both. It sets up other IP nodes as siblings to avoid inconsistencies. This allows IP4 and IP6 lookup next nodes to evolve independently. The adj->lookup_next_index is still shared, assuming that an IP4 adjacency isn't used by an IP6 graph node. Change-Id: I589b8364fe54e7a10c059b7ef9d6707eb0a345cc Signed-off-by: Ole Troan <ot@cisco.com>
2016-06-16Fix hugepage leak on VM terminationShesha Sreenivasamurthy2-0/+36
When VM is terminated, the hugepages mapped should be unmapped so that the system does not run out of hugepage resources. Therefore, mapped pages are unmapped when VPP notices a disconnect. Change-Id: I7398fb20028036738ab87db0b0e79609e95d69a4 Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-06-16Fix vxlan-gpe interface state dump failureHongjun Ni1-0/+4
Correspond to HONEYCOMB-84 VxLAN GPE - Wrong operational data. Change-Id: Ia1b3c3b85e4b5435b0c690a4ce9ff93c65bfee5c Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-06-15README file for vcgnRanganathan T.S1-0/+100
Change-Id: I6bd851e4b26f0b8d6f5826a19bded3af930cbc0e Signed-off-by: Ranganathan T.S <rangan@cisco.com>
2016-06-15Delete useless field decap_next in tunnelHongjun Ni2-37/+5
Field decap_next in vxlan-gpe tunnel is not needed. Change-Id: I83cc42ca82274587a57e3c65711cf18ee8d692d3 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-06-15Fix LISP locator pair selectionFlorin Coras3-133/+227
Make sure when selecting the local and remote locator pair for a data-plane tunnel that the local locator has a route, in the FIB, to the remote one. Change-Id: Idbc8a28a8ede786c11ef98cb18eba4a78c4a228e Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-06-15Fix remote mapping CLI for unset v6 local eidFlorin Coras1-5/+12
If when configuring a remote v6 mapping the local eid is not set, configuration fails because the code expects local (default v4) and remote eids to have the same AFI. Change-Id: If791d2e8a104ea36603576f8b2797cc07bc2654b Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-06-14Add dpdk per-interface startup config parameter to support rss-flagSrivatsa Sangli3-6/+43
New parameter allows specifying rss-flag - one or more of following ipv4-frag ipv4-tcp ipv4-udp ipv4-sctp ipv4-other ipv4 ipv6-tcp-ex ipv6-udp-ex ipv6-frag ipv6-tcp ipv6-udp ipv6-sctp ipv6-other l2-payload ipv6-ex ipv6 Sample config: dpdk { dev 0000:86:00.0 { rss { ipv4 ipv4-tcp ipv4-udp } } } Change-Id: I33c047d69ef8710b8ba3c7e1a1964d5d54f6e880 Signed-off-by: Srivatsa Sangli <srivrama@cisco.com>
2016-06-14Add dpdk per-interface startup config parameter to specify worker threadsDamjan Marion2-23/+54
New parameter allows specifying which worker threads will process rx queues. Parameter arguments is list of cores and number of worker specified must be equal to the number of rx queues configured (num-rx-queues). If num-rx-queues is not specified, it will be automatically set to number of workers. Sample config: dpdk { dev 0000:86:00.0 { workers 2,3 num-rx-queues 2 } } Change-Id: I88bc381e0e542eb02def09a726c6f04de3e1ae17 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-14Reset new indirect adjacdncy template before using itDamjan Marion2-0/+4
Change-Id: Ia69ba39364d4dfa1403c8fbb77b7990226bbcb85 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-14Fix node siblingsOle Troan3-26/+4
Siblings did not work at all. Fixed by generating sibling relationships earlier in vlib_node_main_init(). Also adding a node dynamically before nodes were initialised failed for sibling nodes. Change-Id: I2fb73eb33a6f5ee216f566074e18ed495e20634d Signed-off-by: Ole Troan <ot@cisco.com>
2016-06-14Retire io threads and main-thread-io modeDamjan Marion8-995/+18
Change-Id: I64f5ec5e32f200834c63ec3b304f9f20cef332a7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-14Fix double-enqueued packet in interface-output dual-loop, fixes VPP-116Damjan Marion3-29/+47
When speculative enqueue fails and a buffer needs to be moved to a new node queue the original buffer is not correctly removed from the original queue so buffer get send for transmit and encryption at the same time. This issue will only be hit with the double loop so low throughput traffic like pings will not hit the issue. This code path is also only hit when the feature flag is enabled so will not be hit by normal traffic Patch also reorgnizes code to reduce number of branches in the interface output node loop. Change-Id: I3653400e58bdfd833e6c42823bab51586128b54b Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com> Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-15Fix name confusion for gre interface index.Hongjun Ni2-6/+6
Change from free_vxlan_tunnel_hw_if_indices to free_gre_tunnel_hw_if_indices. Change-Id: I32f04f2b6b28fcf80d2fc0c37c67e343317dce7c Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-06-13Fix NULL-pointer crash in handoff_init(...)Dave Barach1-4/+7
Change-Id: If403f83b4e918e81e7b2e90dfca14960ad2c6aa6 Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-13Add worker-handoff nodeDamjan Marion7-439/+809
worker-handoff node is universal node which taakes packets from the input node and hands them over to worker threads. Currently it supports flow hashing based on ipv4, ipv6 and mpls headers. New cli: set interface handoff <intrerface-name> workers <list> e.g. set interface handoff TenGigabitEthernet2/0/0 workers 3-6,9-10 Change-Id: Iaf0df83e69bb0e84969865e0e1cdb000b0864cf5 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-13Explicity specify IP address type for format_ip46_address functionDamjan Marion5-9/+27
Change-Id: I3379517535a98a7a5fbd3173503f288a81378821 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-13VPP-117: Fix ip4 and ip6 lookup and rewrite tracesPierre Pfister2-68/+95
Previous patch was printing wrong data since rewrite node traces an ethernet packet while other ip nodes trace an IP packet. This patch introduces different tracing functions for: - lookup node (where the fib index is valid) - rewrite node (where an ethernet frame is available) - other ip nodes (only the ip header is traced) Change-Id: I5971a2e89ae8668f5aed4a410565a5f27e01fc22 Signed-off-by: Pierre Pfister <ppfister@cisco.com> (cherry picked from commit 584b99a0120778108bd019b697639fbf3c1505d1)
2016-06-10Return 0 if no tap interfaces are readyDave Barach1-1/+1
Otherwise, if tapcli-rx manages to make it into polled-mode, it will never leave polled mode. This has been wrong since day 1, sometime in early 2013. Change-Id: I124e01a48db5abbc4eb5240c8d59f76dc562e9f2 Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-10Copy missing buffer metadata for ESP transport mode packetsDamjan Marion1-1/+4
Change-Id: I3f5113533b365366cc3f6ef87858e19879f703cf Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-09Add verbose flag for packet trace, show hexdump in verbose dpdk input traceDamjan Marion3-2/+12
Verbose trace can be enabled with: trace add dpdk-input 1 verbose Change-Id: If58cfc561143d5a44f7d11e61d54b6835692a0e3 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-09VPP-117: Add trace to ip4 and ip6 lookup nodesPierre Pfister4-19/+84
The absence of trace in ip lookup nodes is misleading to many people. This patch adds ip lookup tracing and therefore contribute to worldwide happiness. In addition, this patch makes sure sw_if_index[VLIB_TX] is considered when tracing the fib_index value. In ip4/6-rewrite, the value corresponds to the tx interface index. The formatting function is therefore modified to take that case into account. Change-Id: I5915f0446a15c45e391eedfdfcedd9057aa6a237 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-06-09VPP-106: fix performance hit due to unprefetched data readDave Barach3-6/+17
Change-Id: I1325b60b6deadcb51631e178011a31ee70c06cc7 Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-09Fix DPDK init crash if bonded interface is created by startup confJohn Lo1-7/+10
Change-Id: I4d7d4a56aba010aa868b1f4c2c4e8db0b4c21fd7 Signed-off-by: John Lo <loj@cisco.com>
2016-06-09VPP-115: Remove stale ACL CLIs which are not supportedJohn Lo2-39/+3
The old ACL CLIs still show up in CLI help which can confuse users. Change-Id: I9a3722d3d649c4370df6a09b2c07628e7e4aa0f4 Signed-off-by: John Lo <loj@cisco.com>
2016-06-07Fix missing null termination in DPDK EAL ArgsDamjan Marion1-2/+2
Change-Id: I8292628ad359a19e02ff79568d773ad2b1af51ec Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-07Adjust buffer data offset based on rte_mbuff data_offDamjan Marion1-11/+6
This commit removes assumption that all packets have data offset equal to RTE_PKTMBUF_HEADROOM. Some drivers like fm10K receive packets with different data offset. Change-Id: I0aba6296458dab9df6fff639b4b827b2084ddc3e Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-07VPP-110: vxlan encap node should never touch a deleted tunnelJohn Lo5-85/+141
Remove usage of dummy encap string for output from BD to a tunnel which has been deleted. Instead, use a node l2-outpt-del-tunnel so that if there are stale entries in the L2FIB for any deleted tunnel sw_if_index, l2-output will send packets using this entry to the l2-output-tunnel-del node which just setup the proper drop reason before sending packets to the error-drop node to drop the packet. Change-Id: I590982ee25e924ab74e2855c55c58baf29a9fad4 Signed-off-by: John Lo <loj@cisco.com>
2016-06-07Multicore support for vCGNShesha Sreenivasamurthy1-5/+91
Locks are used while populating DB, which is once once per entry. Therefore, it is not in the performance critical path. Each thread is a PMD, therefore, spin locks are used instead of mutexes. Change-Id: I4bc297f73a8f3eafebed1f00e51ec75ca24163f6 Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-06-07Fix link down issue of vxlan-gpe interfaceHongjun Ni1-26/+38
Change-Id: Iaf72e7ffb2d30799733f641d66bbc74f40a4d6e1 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-06-07IPv6 HBH: Refactor code. Separate out RFC2460 HBH handling and the more ↵Ole Troan8-568/+620
experimental IOAM code. Support dynamically adding options. By default only process HBH if explicitly configured to. Otherwise we'll just set ourselves up to be a victim of DOS. Change-Id: I41cdfdc00aeaa0cf568e4463440b89be761b6b7d Signed-off-by: Ole Troan <ot@cisco.com>
2016-06-06Add startup conf options to set per-interface descriptor ring sizeDamjan Marion3-7/+21
This patch introduces following 2 startup options: num-rx-desc num-tx-desc Which can be specified under the dpdk { dev PCI_ADDR {...} } or dpdk { dev default {...} } . "show hardware" output is extended to display what is set: TenGigabitEthernet2/0/0 5 down TenGigabitEthernet2/0/0 Ethernet address 90:e2:ba:96:d0:54 Intel 82599 carrier up full duplex speed 10000 mtu 9216 rx queues 2, rx desc 512, tx queues 2, tx desc 1024 cpu socket 0 Change-Id: Ia832885c8e5cf0eb0575367e97581e7065934753 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-05VPP-113: BVI shall filter unicast DMAC for L2 to L3 forwadingJohn Lo5-15/+26
As BVI receive a packet with unicast DMAC from the BD, including unknown unicast flood packet, the packet should not be L3 forwarded unless its DMAC matches the MAC of the BVI. Change-Id: I46e18629c901062592c8ebe3a238c5cfdc1096b4 Signed-off-by: John Lo <loj@cisco.com>
2016-06-05Add per-device startup config supportDamjan Marion5-80/+180
This change adds support for providing per-interface parameters in the startup config. Sample configuration: dpdk { dev default { num-rx-queues 3 num-tx-queues 3 } dev 0000:02:00.0 { num-rx-queues 2 num-tx-queues 2 } dev 0000:02:00.1 } Change-Id: Ia7d9ae2ac9c4fd9baaa480d061a395f8a421a722 Signed-off-by: Damjan Marion <damarion@cisco.com>