summaryrefslogtreecommitdiffstats
path: root/vnet
AgeCommit message (Collapse)AuthorFilesLines
2016-05-02HONEYCOMB-10: jVpp - the new java API. C code and jar file generationMarek Gradzki1-1/+5
Added comments generation for C and Java files. Change-Id: Ifb670a5592eb871bfe68804f0a8d8f9b5b14f00a Signed-off-by: Marek Gradzki <mgradzki@cisco.com> Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-05-02Netmap: typo correctMohsin Kazmi1-1/+1
There is a typo mistake in netmap. This patch corrects it. Change-Id: Id358e0de74555ac7858c93fa1335f02abd5624b5 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2016-04-30IP6 SR multicast replicatorKeith Burns (alagalah)10-38/+1124
- adds ability to name tunnel - creates policy as a collection of tunnel names - map ip6 multicast address to policy and replicate packet - adds zero memcpy for invariant portion of packet Change-Id: Icd2fe6a2cf65c09906e82ed1afbb0eae8df79452 Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-04-29Fix use of vni throughout lisp codeFlorin Coras2-32/+35
This leverages the vni LCAF support introduced in a previous patch. Change-Id: I0a1b6b9dfc8095d62ad3f4e800b9f2d04c475521 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-04-29Add indirect next hop supportDamjan Marion4-40/+156
Change-Id: I0626c2650eba7961a15b1e87a664b57bef5503a2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-29Remove unused variable in lisp decapFlorin Coras1-3/+0
Change-Id: I6aef98252e6134fd2f1a30a8407086ab98285a53 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-04-29VPP-25 Add API for GRE tunnel create/delete/show.Chris Luke2-47/+159
Add API methods to create, delete and show GRE tunnels. Also add missing CLI functionality for deleting and listing configured tunnels. Change-Id: I7565966037d94ade07938e4ff0d9333419716857 Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-04-29Fix ip-udp encap checksum for ip6Florin Coras1-0/+20
Thanks to Chris Luke for reporting. Change-Id: I4f2ac5bb0eb565738755ddb00e8c918134ff67b6 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-04-29Fix ip4 address formatting in the show ip fib ouptutDamjan Marion2-3/+6
Change-Id: I3ffb2e3cef63cbc9f2abc81bbdedabb34b9b3408 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-29Improve performance of dpdk-vhost driverShesha Sreenivasamurthy1-0/+9
By setting the flag in used table, guest is prevented from kicking the host when it adds buffers. This results in 100% performance improvement when tested throughput using iperf3. Change-Id: Iefaf5b97d1444c216bb373998732a437d333d521 Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-04-29Add TX statistics for nsh-gre tunnelHongjun Ni1-4/+77
Change-Id: I20e4abcc82c00e43dd441f1882cb6be531b6876e Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-04-29Add RX statistics for nsh-gre tunnelHongjun Ni1-1/+81
Change-Id: I045bb9d51c9a82ccba6e792485b9418bd78b8520 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-04-29Fix decap-next for ethernet format in nsh-vxlan-gpeHongjun Ni1-0/+2
Change-Id: I9f5efef4c2b821e4c7d76ed6e2c4f52c2495e512 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-04-29Add support for LCAF Instance IDFilip Tehlar10-100/+974
Change-Id: Ifce3f2bdcba099157a42d0b694f3161b9f700ed2 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-04-29Add lisp-gpe ip6 data-plane supportFlorin Coras11-755/+1679
The implementation mimics that of the ip4 data-plane. Therefore, a new lgpe-ip6-lookup lookup node is introduced for ip6 source lookups, a lisp-gpe-ip6-input node for decapsulating ip6 encapsulated packets and the tx function of the lisp-gpe interface is updated to support any mix of v4 and v6 in underlay and overlay. Change-Id: Ib3a6e339b8cd7618a940acf0dd8e61c042fd83dd Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-04-29Clean up per-thread mheap setup.Dave Barach1-2/+0
The stats thread was sharing the main mheap when we started at least one worker or I/O thread, but ran on its own mheap when we started 0 worker + io threads. Net of this change; if a VLIB_REGISTER_THREAD instance specifies a per-thread mheap, a per-thread mheap will be provided. Otherwise, threads share the main heap. The stats thread now uses the main heap. Simpler is better. Change-Id: I1fff0dd66ae8f7dfe44923f702734e2832b55b09 Signed-off-by: Dave Barach <dbarach@cisco.com>
2016-04-28LISP IPv6 control support, create IPv6 headerAndrej Kozemcak2-15/+21
Change-Id: I50d2946df8f5de0142b76f4023d8bd60ee6d2f0d Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-04-28VXLAN over IPv6.Chris Luke6-166/+628
Refactors the VXLAN node to work with both IPv4 and IPv6 transports. There is a discussion thread for this change at https://lists.fd.io/pipermail/vpp-dev/2016-March/000279.html Note that this changes the binary configuration API to support both address families; each address uses the same memory for either address type and a flag to indicate which is in use. This also includes changes to the Java API to support both address families. The CLI and VAT syntax remains unchanged; the code detects whether an IPv4 or an IPv6 address was given. Configuration examples: IPv4 CLI: create vxlan tunnel src 192.168.1.1 dst 192.168.1.2 vni 10 encap-vrf-id 0 decap-next l2 IPv6 CLI: create vxlan tunnel src 2620:124:9000::1 dst 2620:124:9000::2 vni 16 encap-vrf-id 0 decap-next l2 IPv4 VAT: vxlan_add_del_tunnel src 192.168.1.1 dst 192.168.1.2 vni 10 encap-vrf-id 0 decap-next l2 IPv6 VAT: vxlan_add_del_tunnel src 2620:124:9000::1 dst 2620:124:9000::2 vni 16 encap-vrf-id 0 decap-next l2 TODO: The encap path is not as optimal as it could be. Change-Id: I87be8bf0501e0c9cd7e401be4542bb599f1b6e47 Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-04-28Fix bug that prevented packet trace from working on multicoreBud Grise1-6/+14
The vlib_node_runtime can change after the thread starts up. Change-Id: Id5bc248c009ef9be26213b36a0115938b61cb8c4 Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-04-28Add ability to set l2_mode_noprotChristian Dechamplain (cdechamp)2-0/+36
Change-Id: I3767a1bbe55452600863e145cbc12b114d6d1024 Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-04-28Add histogram to frame queue tracingBud Grise3-32/+132
Display it via "show frame histogram" CLI. Change-Id: I436a2125f391af85d1743cf8765e5f27fa0ca809 Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-04-28Track number of ethernet vlans in a frameChris Luke8-7/+83
Adds flags to the packet buffer to track the number of VLANs in the current Ethernet frame. We use two bits to signify 0, 1 or 2 VLANs. The value 3 signififies an unknown quantity of VLANs, which includes "three or more" which is not widely supported. We place the bits in the vlib_buffer section; that is not the opaque section, so that all subordinate nodes can use it. For background, see the discussion thread at https://lists.fd.io/pipermail/vpp-dev/2016-March/000354.html The helper macro ethernet_buffer_header_size(buffer) uses these bits stored in "buffer" to calculate the Ethernet header size. The macro ethernet_buffer_set_vlan_count(buffer, count) sets the appropriate bit values based on the number in "count". By current frame we are referring to the case where a packet that arrives from the wire is carrying an encapsulated Ethernet packet. Once decapsulated that inner packet becomes the current frame. There are two places where this value is set; For most Ethernet frames this will be in the "ethernet-input" node when that node parses the Ethernet header. The second place is whenever vnet_update_l2_len() is used to update the layer 2 opaque data. Typically this function is used by nodes just before they send a packet into l2-input. These bits are zeroed in vlib_buffer_init_for_free_list() meaning that wherever the buffer comes from they have a reasonable value (eg, if ip4/ip6 generates the packet.) Primarily this VLAN counter is used by nodes below "ethernet- input" and "l2-input" to determine where the start of the current Ethernet header is. There is opaque data set by "ethernet-input" storing the offset of the current Ethernet header but, since this is opaque, it's not usable by downstream nodes. Previously several nodes have made assumptions regarding the location of the Ethernet header, including that it is always at the start of the packet buffer (incorrect when we have encapsulated packets) or that it is exactly sizeof(ethernet_header_t) away (incorrect when we have VLAN tags.) One notable case where this functionality is required is in ip6_neighbor when it generates a response to a received neighbor soliciation request; it reuses the incoming Ethernet header in-situ and thus needs to reliably know where that header begins. Also, at the suggestion of Dave Barach, this patch removes definition of HGSHM bits in the buffer flags since they are unused and unlikely to ever be. Change-Id: I00e4b9ced5ef814a776020c395d1774aba6185b3 Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-04-28Fix Bug VPP-22Florin Coras1-1/+1
Change-Id: Iaac12e63e4a5ee026276638afd5d5ba3b9503a40 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-04-27Increase the trace bufffer sizeChris Luke2-2/+2
In some cases, the packet header size with IPv6 and a tunnel can overflow the buffer used for packet tracing. This patch increases this buffer a little to avoid truncated header information in the trace. Change-Id: Ib800e3b908ebe7e80bae4428a94541a803b40b8c Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-04-27Remove historical artifacts from vnet/buffer.hDave Barach1-26/+0
Change-Id: I7f50074a4ed5b62bef4584190eb849d90e90e592 Signed-off-by: Dave Barach <dave@barachs.net>
2016-04-27VPP-18: Creating tap interface through API broken. Fixed and removed ↵Ole Troan1-138/+50
duplicate code by CLI to create TAPs. Change-Id: Ib6b30e3dc20ddad7c78d2038955df7af020f0671 Signed-off-by: Ole Troan <ot@cisco.com>
2016-04-27Fix pcap trace capture crash for packets > 512 bytesJohn Lo1-1/+2
Change-Id: I9397ac756290953a14e3adfe5b7c980ecf92bac2 Signed-off-by: John Lo <loj@cisco.com>
2016-04-27Live VM migration support for vhost-userShesha Sreenivasamurthy2-4/+63
Change-Id: I79bef6dc94b3ad688564a409d14d63ca3125a305 Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-04-26Make automake silent rules defaultDamjan Marion1-1/+1
Change-Id: Ia504ccdac1deac20f20cf7fb76f78b2d8c505474 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-26MTU: set interface mtu tapMohsin Kazmi5-33/+57
This patch introduces standard command line 'set interface mtu' for setting the MTU for tap devices. It allows user to set the mtu in between 68 to 65535 bytes aligned to what linux kernel supports for tun/tap devices. Right now tapcli set the same MTU size for each tap interface. But it should be set and configure to per interface rather than per tap instance. Change-Id: I81b7f3ad95ca56d585907ff8f51d9935a428e01b Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2016-04-26Fix compile errors reported by clangDamjan Marion9-10/+10
For using clang as a compiler it is enough to specify CC=clang in the make command line Change-Id: I06f1c1d418b68768f8119de5bdc8748c51f90c02 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-26Port glean neighbor entry support to IPv6Pierre Pfister11-73/+342
This patch is more or less a port of I71f3ba0c8192 to IPv6. In practice it allows creating a route via a neighbor which is not resolved yet. It also adds static flag to IPv6 neighbor entries. And as Damjan suggested, it formalizes ip46_address_t by using the IPv4 embedded IPv6 address format. Change-Id: Ifa7328a03380ea4ff118b7ca4897b4ab23a3e57c Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-04-26Fix decap's second-loop failure issue within nsh-vxlan-gpeHongjun Ni1-3/+3
Change-Id: I7c5c93b6490baa05b9b203b6d065d9c31f36d531 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-04-25Put back VMXNET3 driver init for DPDK 2.2.0 or older versionsJohn Lo1-0/+19
Change-Id: I3fb9441fb7272072aba9721ca729d6ce5f2c00af Signed-off-by: John Lo <loj@cisco.com>
2016-04-25Disable TSO/CSUM offloadingShesha Sreenivasamurthy1-0/+15
Enabling these features breaks L4 traffic when a VHOST interface is bridged with a hardware interface which does not support such offloading. (Eg: enic) Change-Id: Ife3d292a8860eb60b82f1473e2d0dd7329e51d5e Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-04-25Fix vpp crash in DBG modeShesha Sreenivasamurthy1-1/+2
virtio-vhost driver was specifying wrong prefetch size. This caused VPP to assert in DBG mode. Change-Id: Icbe3d5574bd2463b98dfc618a001b16198ab82be Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-04-25Add native NETMAP driverDamjan Marion10-5/+1666
This is first drop of native NETMAP driver. It is mainly tested with NETMAP pipes but also support for native interfaces should work. New CLI: create netmap [<intf name>|valeXXX:YYY] [hw-addr <mac>] [pipe] [master|slave] Following example creates NETMAP pipe where VPP acts as master: create netmap name vale00:vpp1 pipe master then NETMAP pkt-gen tool can be used to send traffic: pkt-gen -i vale00:vpp1}0 -f tx Change-Id: Ie0ddaa5facc75285b78467420e8a9f9c8dfc39e5 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-25Add APIs to access dpdk informationTodd Foggoa (tfoggoa)2-0/+62
- Add an API to get the number of DPDK mbufs - Add an API to detemrine if the io thread has been released - Add an API to get the DPKD pmd type - Add an API to get the cpu socket of a device Change-Id: I926401891fb6053c676125c9d0621cc9ed1f80bb Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-04-25Change ethernet's result within unformat_decap_nextHongjun Ni1-1/+1
Change-Id: Ib3f9d1a03930842063ebfbfcfeefca533a678416 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-04-25Convert lisp-gpe encap to interface tx nodeFlorin Coras9-531/+856
With this change, one lisp-gpe interface is created per vrf/overlay tenant and its tx node is used as encapsulator (or tunnel ingress). For all intents and purposes, the tx node inherits all functions previously performed by the lisp-gpe-encap node and it maintains said node's position in lisp-gpe's data-path graph. Chiefly, this opens the possibility to chain interface features, like IPSec, transparently with LISP. Furthermore, it brings basic data plane support for vrfs and LISP instance-ids (or virtual network instances as per RFC7364). Other changes include improvements to lisp-gpe enable and disable sequences and corresponding API/VAT fixes. Change-Id: I085500450660a976b587b1a720e282f6e728d580 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-04-25Improve mechanism for using loopback interface as BVI for BDsJohn Lo6-78/+63
When loopback interface is configured as BVI, instead of changing its output node from loopN-output to l2-input, the loopN-output node is now kept while its next tx node is changed from ethernet-input to l2-input. The packet setup previously done in bvi_to_l2 as part of l2-input is now performed in the loop output node. This change adds an extra node in the BVI output path but provides the following improvements: 1. IP address/route created on loopback prior to it being configured as BVI will still work properly. The requirement to (re)configure IP/route on loopback after it is configured as BVI is removed. 2. The output stats for loopback interfaces are always provided irrespective of their BVI configuration. 3. The loopback-BVI output stats can be batch updated outside the packet loop in output node, instead of per packet update in l2-input node, making l2-input node more efficient for BVI packets. 4. Restore original node property as implemented in node.c function vlib_node_add_next_with_slot() where next node indices stored in next slots of each node will remain unique. 5. Packet trace for BVI output includes loopN output node which provides useful packet data. Change-Id: I7f5bc72ef953a367363a179088210596881f9e73 Signed-off-by: John Lo <loj@cisco.com>
2016-04-22Add clib_memcpy macro based on DPDK rte_memcpy implementationDamjan Marion94-455/+444
Change-Id: I22cb443c4bd0bf298abb6f06e8e4ca65a44a2854 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-22Fix duplicate freeDave Barach1-1/+2
Change-Id: Ifda07e476c74da9bfd7e21f02aa09160a0212e24 Signed-off-by: Dave Barach <dbarach@cisco.com>
2016-04-22Use memory from other CPU sockets if there is no localDamjan Marion1-0/+11
This fixes crash when local socket memory is not available so rx/tx queue setup fails. Here we simply retry operation without being so picky about memory location. Change-Id: I5bae47defe3c0fe120853378ed13141893284a5a Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-20Allow L3 forwarded jumbo packets on Bonded InterfacesJohn Lo1-16/+16
Set max L3 packet size allowed to the lowest value of the slave links. Also cleanup FIXME's for VMXNET3 driver. Change-Id: Ia5cf742f2ab13b8cdc8ea6286f56464ee4f8c51d Signed-off-by: John Lo <loj@cisco.com>
2016-04-20Python-API: Inital commit of Python bindings for the VPP API.Ole Troan1-0/+141
See: https://wiki.fd.io/view/VPP/Python_API Change-Id: If135fc32208c7031787e1935b399d930e0e1ea1f Signed-off-by: Ole Troan <ot@cisco.com>
2016-04-20delete loopback interface cliAlpesh S. Patel1-0/+6
(to be consistent with other delete interface commands) Change-Id: I41f63cc5b11d9fa9489edc54b17a4d857b711b66 Signed-off-by: Alpesh S. Patel <apatel9191@hotmail.com>
2016-04-20Cleaned up formatting in device.c - no functionality changes.Keith Burns (alagalah)1-64/+64
Change-Id: Ia7d83784d50b3651117201b876464528d015edea Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-04-20Change from nsh-encap to nsh-vxlan-gpe within nsh vxlan tunnel's short_helpHongjun Ni1-1/+1
Change-Id: Ifeba2e9857a112139b7be6436b59f05858f1abf9 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-04-20Move "ethernet" debug cli commands to "set interface"Damjan Marion4-127/+78
Following two commands are changed: ethernet mtu -> set interface mtu ethernet promiscuous -> set inteface promiscuous Change-Id: I5037e021933156c06044fb723a05ad330f8162b7 Signed-off-by: Damjan Marion <damarion@cisco.com>