summaryrefslogtreecommitdiffstats
path: root/vnet
AgeCommit message (Collapse)AuthorFilesLines
2016-06-02VPP-92 Fixup some srv6 issuesChris Luke2-60/+70
Some small fixes to the srv6 code to bring it toward conformance with draft-previdi-6man-segment-routing-header-05. - The first segment needs to remain in the segment list. - The segment list template needs a space for the ultimate destination. - The ultimate destination needs to be inserted into that space when adding the SRH. Change-Id: I66db6912e0128da084f14ceca20918ef67ccff79 Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-06-02VPP-91 fix sr tunnel add_del collision checkChris Luke1-58/+85
The add_del function was not properly checking if a tunnel already existed; instead it was checking if the given tunnel name existed. If no tunnel name was given it flat out refused to add a tunnel even though that is optional. Cleanup the add/del parameter validation to "do what I expect" it to do: When adding a tunnel: - If a "name" is given, it must not exist. - The "key" is always checked, and must not exist. When deleting a tunnel: - If the "name" is given, and it exists, then use it. - If the "name" is not given, use the "key". - If the "name" and the "key" are given, then both must point to the same thing. Change-Id: I9b48ae0203f9664cf8af0f7dc49bf480ddec10d5 Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-06-02VPP-100: Fix IPv4 local handling of IP fragmented packetsJohn Lo1-3/+7
Before VPP is enhenced to do IP reassembly of local packets, just set the protocol path to "experimental" for now so they will be error-punted as unknow IP protocol. Change-Id: I2ffefb0b4205357653ba24d80c722cafd5972fba Signed-off-by: John Lo <loj@cisco.com>
2016-06-01VPP-98 Dedicated storage for VXLAN over IPv6 hash keysChris Luke3-53/+66
When creating VXLAN over IPv6 the code was using storage for the hash key that could later be moved. Since the key is larger than the word size this was being referenced as a pointer; when the storage moves that breaks the hash. Instead allocate dedicated storage for the key. This patch also includes other minor cleanups, including using clib_memcpy in places it should be used and some whitespace fixes. Change-Id: I579f2cb515853ef56dedcca350fcad08aa6111a9 Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-05-31VPP-102: vHost reconnect to previously used sockets on VPP restartJohn Lo1-0/+8
Change-Id: Ida11bddb52268e0e8513b7b379eeed6103bd48f1 Signed-off-by: John Lo <loj@cisco.com>
2016-05-31VPP97: Flooding of pkts with multiple buffers in BD with BVI crashes VPPJohn Lo2-9/+3
The loopback interface should use vnet_interface_output_no_flatten so follow-on buffers of a jumbo packet do not get put on the output frame and be sent back to ethernet-input or l2-input node. The replication_recycle_callback() function should not assume follow-on buffers of a jumbo packet are on the buffer free list. Change-Id: Ide646a6d9b43e82782c0581ea3022a9e70f82582 Signed-off-by: John Lo <loj@cisco.com>
2016-05-31Fix hash table bogus read in ip6 vxlan-gpeFlorin Coras2-13/+3
- consistent use of hash_*_mem methods. - tunnel setup copies the key from the wrong location - remove extraneous storage for keys copied from the vxlan node that is not applicable here Change-Id: I419fd30a52ba387104abe467c296de85233823d1 Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-05-31Add CLI/API for clearing all remote mappingsFilip Tehlar2-24/+81
Change-Id: I5aef12d3a9c8daefff52e5f958c504f5d2ff9fd0 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-05-31ONE-15: Fix duplicate locator, refactoring locatorAndrej Kozemcak2-244/+154
Check duplication locator and clean after locator when remove it. Refactoring locator_set code. Change-Id: Ib83cbcddc7a363a60fa5b6a366203d0dc0ea7ca6 Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-05-31ONE-16: Locators are not properly cleanedFilip Tehlar1-2/+16
Change-Id: Ia6eaaa9a741e84cbd0ff957cfd9a7143a3d0a977 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-05-30Add Dump API for VxLAN-GPE tunnelHongjun Ni2-31/+10
Change-Id: I4913fe6c4b1280939147887896aea9b79a9f7f10 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-05-28VPP-84 af_packet retry on EAGAIN, count on errorsChris Luke2-9/+32
When af_packet signals the kernel that there are packets in the tx ring with sendto() the kernel sometimes responds with EAGAIN. Previously the af_packet driver would treat any error from sendto() as fatal. Whilst there's not much we can do about this, count the errors and let's try to not die on the spot or sit in a loop forever. Change-Id: Id76ba5e07b744f1ed6f348ec838a1ac506a381c9 Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-05-28VPP-96 ENID driver update for rx of jumbo pkts using muliple mbuf'sJohn Lo2-2/+2
Change-Id: I0e985b079da3224f4886e3ee2cece4d046e291eb Signed-off-by: John Lo <loj@cisco.com>
2016-05-26Add show command for LISP map resolversFilip Tehlar1-0/+21
Change-Id: I3ed6269f9a307b50b56ce04defc2576a139c6add Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-05-25Move dpdk startup config data to separate structDamjan Marion7-137/+147
This is preparation work for moving DPDK EAL and mempool initialization to vlib. Change-Id: I2dc35aa53edec0e07fc2650d630aa625831154c3 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-05-25ONE-14: Fix crash when re-enable LispAndrej Kozemcak1-4/+9
Change-Id: Ib95338d7055dea9036eddb7dff5ca7ccbcb35639 Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-05-25Add Vxlan-Gpe over IPv6Hongjun Ni5-703/+964
PatchSet4: consolidate code as per comments. PatchSet3: simplify the code using ip_udp_encap_one/two PatchSet2: consolidate comments and indent style Change-Id: Ia8b43f854a46d77e838e198566200ad28fd72472 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-05-24Fix an issue in format_vxlan_gpe_tunnelHongjun Ni1-0/+4
Change-Id: Ib283c75505b787f715e34f5b325dda8a6c2fa125 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-05-23Native VPP driver for Intel Niantic family of NICsDamjan Marion5-0/+4268
Available only in vpp_lite platform Change-Id: I09d112af5f7f4521ec25196ecdd8c02c20eedd5f Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-05-23Move rte_delay_us_override so it overrides DPDKTodd Foggoa2-42/+6
The current location in the vnet dynamic library does not override the dpdk weak function as intented. Moving this function to the main app allows the linker to find the non-weak symbol and override it. Change-Id: I96c6dc5af2e511cc1f84bd66419c5a4ac96a9541 Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
2016-05-23VPP-81: Print interface name after creating an interface with CLIPierre Pfister16-20/+46
When the CLI is used to create an interface, and whend the operation succeeds, the newly created interface name is printed-out. The patch includes the following interfaces types: - AF_PACKET - Vhost User - Netmap - GRE - L2TP - MPLS-GRE - Loopback Change-Id: Id518c139ec63a261eae81d2ed95c4cd1f10b5157 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-05-23Add LISP RTR supportFilip Tehlar4-43/+297
Change-Id: I8a3770f8f1cd1fde6765b81d35aacaaf4ff98b82 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-05-19Add support for multiple microarchitectures in single binaryDamjan Marion60-14/+280
* compiler -march= parameter is changed from native to corei7 so code is always genereted with instructions which are available on the Nehalem microarchitecture (up to SSE4.2) * compiler -mtune= parameter is added so code is optimized for corei7-avx which equals to Sandy Bridge microarchitecture * set of macros is added which allows run-time detection of available cpu instructions (e.g. clib_cpu_supports_avx()) * set of macros is added which allows us to clone graph node funcitons where cloned function is optmized for different microarchitecture Those macros are using following attributes: __attribute__((flatten)) __attribute__((target("arch=core-avx2))) I.e. If applied to foo_node_fn() macro will generate cloned functions foo_node_fn_avx2() and foo_node_fn_avx512() (future) It will also generate function void * foo_node_fn_multiarch_select() which detects available instruction set and returns pointer to the best matching function clone. Change-Id: I2dce0ac92a5ede95fcb56f47f3d1f3c4c040bac0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-05-18Add netmap APIMatus Fabian4-6/+17
JIRA: VPP-66 Change-Id: I421529fa8eafe5268745a34a4fcd40156defcdf8 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-05-18Rework of the old PCI codeDamjan Marion1-4/+3
* adds support for VPP native PCI drivers using standard uio_pci_generic kernel driver * adds generic PCI interrupt callback * splits code to generic PCI handling and linux specific * adds new debug cli 'show pci [all]' Change-Id: I447c2285e319e9725d70688c1b70c9dedda51fdc Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-05-17dpdk/build - 32bits compilationChristophe Fontaine3-27/+27
In vnet/vnet/devices/dpdk/device.c, post 2 event data instead of merging them into 1 u64. Change-Id: I8b1d61b894279fb6eb57bb82a05affc14360e6b8 Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-05-17dpdk/init - Add compatibility to non numa architectureChristophe Fontaine1-4/+25
On non numa aware platforms, the path "/sys/devices/system/node/node%u" does not exist: the "free_hugepages" count is available in "/sys/kernel/mm/". Change-Id: Id62018a2bd0937d267663699c620e89d02c26a72 Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-05-17Fix output feature issue where opque field is already used by previous nodeDamjan Marion2-3/+8
Change-Id: I1470993668fa8c740229149bbb227bd1e410d5ab Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-05-16VPP-61 Patch2/2 Removing NSH from VPP for move to NSH_SFCKeith Burns (alagalah)10-1038/+5
Change-Id: I76359b621b2edc599cf2e9ee845d97293a5d46f7 Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-05-16VPP-61 Patch1/2 - Remove NSH from VPPKeith Burns (alagalah)4-73/+0
- Had issues with original patch and CSIT, breaking into -- Makefile and API changes -- Follow up patch removing NSH directory Change-Id: I6c2f49a74d59b97ce4ea43799cc6f01f5cb1d5a2 Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-05-16Add configure policer APIMatus Fabian3-43/+57
JIRA: VPP-67 Change-Id: I04560d78e2eb131cd6cc31472b70b3d3e8fdd79a Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-05-16VPP-68: L2 Rewrite: Support for chained classify tablesPierre Pfister1-0/+18
The classifying capabilities are pretty limited if only a single table can be used. This patch adds support for chained classify tables to L2 Rewrite feature. Change-Id: Ib678fe2028f17b441adb75d85bf3e31185e42c59 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-05-16VPP-69: Create fib or bridge domain with arbitrary IDPierre Pfister6-3/+89
It appeared to me that it might be usefull to allow users to create fibs or bridge domains without a complete knowledge of the current used IDs. These changes define fib and bridge domain constructors when the provided ID is ~0. In such a case, an unused ID is used to create a new fib or bridge domain. Change-Id: Iaba69a023296e6d17bdde45980f9db84832a3995 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-05-15ONE-13: Add CLI/API for LISP static remote mappingsFilip Tehlar4-1/+252
Change-Id: Ic4c717af9629541bac0a0e6c65d0157619c8f578 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-05-14VPP-63: clean up config scripts, remove specific hostnamesDave Barach37-59/+45
Change-Id: Ifb77256fa691b1a90045a10448835c09b764e74f Signed-off-by: Dave Barach <dave@barachs.net>
2016-05-13ONE-7: Fix map-request encapsulationFlorin Coras1-68/+81
We now try to find the first map-resolver IP we have a route to and decide the ip lookup node according to map-resolver IP. Change-Id: I68fc12861dc1e9a203ebf6caefd4f053a741a785 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-05-13VPP43 - NSH refactoring: Added nsh-map nodesKeith Burns (alagalah)19-2440/+1672
- removed vnet/vnet/nsh-gre - removed all nsh from vnet/vnet/nsh_vxlan_gpe to vnet/vnet/nsh - moved vnet/vnet/nsh_vxlan_gpe to vnet/vnet/vxlan_gpe - added cli and binary api for VXLAN GPE tunnels - plan to move vnet/vnet/nsh to new repo (sfc_nsh) and make plugin - added cli for NSH (binary API will be done in sfc_nsh) - vnet/vnet/gre will be extended in VPP-54 Change-Id: I1d27def916532321577ccd68cb982ae0d0a07e6f Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-05-13ONE-11: Fix bugs in LISP APIAndrej Kozemcak1-1/+1
- check input variables - in locator_set dump, add support for remote locator_set Change-Id: Ib10028e83fead358f820ae45c71b6ca4dfbe2f1e Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-05-11ONE-9: Fix clang build errorsFlorin Coras2-4/+4
Change-Id: Icbf3e269471ee0fc1d21f842b2ea220328a0f891 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-05-11ONE-8: Fix adj signature issuesFlorin Coras2-29/+37
When inserting routes into ip4/6 fibs, we first added a dummy adjacency and afterwards manually updated its rewrite header to enable src/dst forwarding. The downside to this is that the adj signature is changed and therefore when deleting a route the adjacency signature is not removed from adj_index_by_signature hash resulting in crash if the same adjacency is re-inserted. This patch avoids the issue by enforcing the insertion of 'complete' adjacencies thereby obviating the need to update the rewrite header. Change-Id: Ib43bfe72a65e2cf9ef7685a99596eb1d7723e543 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-05-11ONE-6: dp is not programmed when re-enabling LISPFilip Tehlar1-6/+24
Change-Id: I4c0c5d44168da811a713943275430a378ff46929 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-05-10ONE-4: Add LISP enable/disable API/CLIFilip Tehlar4-0/+147
This patch adds an enable/disable API/CLI for control plane which calls similar functions for data plane. When re-enabling it also re-populates dataplane with tunnels and interfaces. Change-Id: Id8c3d6af90ecc0be331d502756914b1f62824046 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-05-09ONE-3: Delete dst route when src fib is emptyFlorin Coras1-1/+21
Properly check that src fib is empty. Change-Id: I4072169027a404cad66eaaa8450f7c18f1fa8073 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-05-09VPP-44: iOAM service and path verification using shamir's secret sharingShwetha Bhandari7-12/+1127
Change-Id: I445ad13f8f93cb75cacc94192c4ae85c8ca14e35 Signed-off-by: Shwetha Bhandari <shwethab@cisco.com>
2016-05-09ONE-5: Remove unused vnet_lisp_gpe_add_del_tunnel APIFlorin Coras2-46/+23
Change-Id: Ib22ec807d2b74b7c3cb37f66052cd07bc4d896db Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-05-07VPP-45 Fix crash when GRE packet received on new i/fChris Luke1-0/+3
If a GRE tunnel is created, no other interface added and the GRE tunnel is not set "up" then a crash occurs on the first packet for this tunnel because fib_index_by_sw_if_index[] does not yet have a mapping to the fib the new interface is in. The code to set this is missing from gre/interface.c Change-Id: I567ad74a2af3ea5afe4a40ed39a1d4395642f77c Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-05-06VPP-34 GRE traffic blackholes in encap directionChris Luke1-1/+12
The GRE code is missing the logic to indicate the "hardware" interface is up. The fix is to listen for admin up/down events on the "software" interface and reflect that into the hardware interface state. Change-Id: If06e4f03989b2c52c32f50c11e1943e42bb2609f Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-05-06Check IP adj_index to make sure it is valid to prevent possible crashJohn Lo2-2/+6
Change-Id: I439aac05638fd40e314bec8756e42a32c436321c Signed-off-by: John Lo <loj@cisco.com>
2016-05-05Fix vpp_lite build caused by missing definition of unlikely macroDamjan Marion1-1/+1
Change-Id: I11b34e171c1c7907dd3faec219866418b4e792f6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-05-05ONE-2: Add new LISP dump API for lisp gpeAndrej Kozemcak2-0/+14
API: lisp_gpe_enable_disable_dump Change-Id: I1c8e78f00f9a3f99c1f2f54884af565292e4ccf8 Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>