aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
AgeCommit message (Collapse)AuthorFilesLines
2017-03-17Fix IP feature ordering.Neale Ranns6-41/+12
Drop comes before lookup when enabled. is_first_or_last is not required when setting a feature, the anchor is added in find_config_with_features(). Don't make the PG interfaces automatically L3 enabled, this way we can have tests that check the L3 protocol disbaled behaviour. Change-Id: Icef22a920b27ff9cec6ab2da6b05f05c532cb60f Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-17MPLS performance improvments.Neale Ranns8-140/+299
1 - Quad loop lookup and label imposition. 2 - optimise imposition for the 1 label case 3 - input gets TTL from header directly (no byte swap) Change-Id: I59204c9e5d134b0df75d7afa43e360f946d1ffe7 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-17Attached hostsNeale Ranns8-18/+103
allow this config to function: set int ip address loop0 169.254.1.1/32 (the default GW address for attached hosts) set int unnumbered af_packet0 use loop0 ('enable' IP on the host interface) ip route add 192.168.1.1/32 via af_packet0 (where to find the host) repeat for each host and host interface. Inter-host communication is throught the /32 routes. To allow this: 1 - attached host routes have the ATTACHED flag set, so the ARP code accepts then as legitimate sources 2 - unnumbered interfaces inherit the source address from the IP interface Change-Id: Ib66c5f0e848c528f79372813adc3a0c11b50717f Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-17Cache a 'has-features' flag on the adjacency for faster access. Reclaim the ↵Neale Ranns12-162/+162
node_index memeber from the rewrite for space - this is only used for formtting before: ip4-rewrite * * * * 2.66e1 256.00 after: ip4-rewrite * * * * 2.40e1 256.00 Change-Id: Ic397150727cad38811564777419ad6bd26b8a3a6 Signed-off-by: Neale Ranns <nranns@wasa-ucs-11.cisco.com>
2017-03-17Use the feature anchor in the MPLS input arc - it performs much betterNeale Ranns3-7/+9
Change-Id: I3d64ddb248478accd4d9b3124f018c9aab63a60f Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-17Adjacency refinement; check the cover's interface against the adjacency'sNeale Ranns2-4/+97
Change-Id: I3fa2f35056b74e479288bb956f2713f727a81c72 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-16ping: Fix coverity error 163907Andrew Yourtchenko2-0/+6
Return an error if the ip6_interface_first_address decides to return NULL. Change-Id: Iea0184382b8fbe2af81a781c3671687a1fbb5b32 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-03-16vhost: wrong value return for VHOST_USER_VRING_GET_BASESteven1-4/+11
When the VM is migrated, the driver sends VHOST_USER_VRING_GET_BASE message to the device to get the vring offset. The device is supposed to shut down the vring, and return the current vring offset. What the code did was to shutdown the vring, initialize the vring, and return 0 to the driver. The fix is to first store last_avail_idx in the message and then close the vring. Change-Id: I432e9f50f36d89fe53a45e050edcf5e1218caf7a Signed-off-by: Steven <sluong@cisco.com>
2017-03-16vlib: make runtime_data thread-localDamjan Marion9-61/+170
Change-Id: I4aa3e7e42fb81211de1aed07dc7befee87a1e18b Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-03-15No vector allocation during buffer copyNeale Ranns1-3/+1
Change-Id: I7e8556af833ca0e00fadc96dcd2077ff1104541b Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-15VXLAN:add hidden multicast interface checkEyal Bari2-29/+25
and some refactoring Change-Id: I99e3c5e782ce65cb9779ccc3a9a3151ef1429e07 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-03-14API:support hidden sw interfacesEyal Bari1-38/+27
validate interfaces - added check for hidden interfaces interface dump - dont send hidden interfaces set_unnumbered - test for hidden vl_api_create_vlan_subif_t_handler, vl_api_create_subif_t_handler - fixed potential memory leak some other minor refactors to make code clearer and shorter Change-Id: Icce6b724336b7d1536fbd07a74bf7abe4916d2c0 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-03-14ioam: ip6 hop by hop ext header and SR header co-existenceshwethab4-72/+84
1. Fix finding sr extension header 2. Fix for assert checks for space for sr header in packet headroom 3. ioam build warnings 4. Fix for SR header removal in presence of hbh ext header clib_memcpy with overlapping src/dst was failing Change-Id: I8576204eb571d1d4725a4e6976e18fe61cd1cd35 Signed-off-by: shwethab <shwetha.bhandari@gmail.com>
2017-03-13VPP-659 Improve tcp/session debugging and testingFlorin Coras12-169/+599
- event-logging support for tcp and session layer - improvements to uri test code - builtin_server on port 1234 - use the CLOSEWAIT timer when we rx FIN in FIN_WAIT_2 state Change-Id: Ibc445f164b2086b20323bf89c77cffd3059f570f Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dbarach@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2017-03-13Add MAC address check in ethernet-input node if interface in L3 modeJohn Lo1-6/+17
Interface can be in promiscuous mode if more than one of its sub- interface is in L2 mode. In promiscuous mode, L3 interface need to verify DMAC of packet to match that of the interface and drop if not. This check was done on sub-interface only and now also added to main interface path. Fix incorrect MAC addresses in the flow-per-pkt plugin test, which caused it to fail. Fix MAC address usage in BFD tests. Change-Id: I12a17ec05c7ab298ad10d400c90d082c97eca521 Signed-off-by: John Lo <loj@cisco.com> Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-03-10Retire vpp_liteDamjan Marion4-4232/+1
vpp_lite platform is not needed anymore as same efect can be achieved with following startup.conf config: plugins { plugin dpdk_plugin.so { disable } } Change-Id: I690ea8ceb1c6e1fe32e01e7da54e9958019a93bf Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-03-10VPP-659 TCP improvementsFlorin Coras18-155/+422
- builtin test echo server - fix SYN-ACK retransmit canceling - avoid sending spurious ACK if in LAST_ACK - improved client dummy test app - renamed tx fifo dequeuing and sending functions to avoid confusion - improved RST handling Change-Id: Ia14aad3df319540dcf6e6a4e18a9f8d423a4b83b Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2017-03-10LISP: fix Proxy-ETR show command, VPP-660Filip Tehlar3-8/+38
Change-Id: I8b7dc3bf631bd228db23679534e04b8af7ac4ec7 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-03-10Fix MAP-E UT. Add functionality in MAP code to delete the pre-resolved ↵Neale Ranns1-6/+37
next-hops. UT checks for no-leftover-state now pass Change-Id: I9e980ee117c0b6aebc6c7a0fcc153a7c0eaf0c72 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-10Fix coverity CIDs 161048, 163895Pavel Kotucek2-4/+1
Change-Id: Ic206601413bb366e2a920daf00524e92a47287ef Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-03-10VPP-608 Fix LISP warningFlorin Coras1-0/+1
Change-Id: Iaa4fb2bc2230c1a99c518a37039cd91648dc19c0 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-03-09vlib_mains == 0 special cases be goneDave Barach1-5/+4
Clean up spurious binary API client link dependency on libvlib.so, which managed to hide behind vlib_mains == 0 checks reached by VLIB_xxx_FUNCTION macros. Change-Id: I5df1f8ab07dca1944250e643ccf06e60a8462325 Signed-off-by: Dave Barach <dave@barachs.net>
2017-03-09IMplementation for option to not create a FIB table entry when adding a ↵Neale Ranns6-56/+98
neighbor entry Change-Id: I952039e101031ee6a06e63f4c73d8eb359423e1a Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-09MAP pre-resolve - use FIB to track pre-resolved next-hopNeale Ranns5-55/+192
Change-Id: I9ea16881caf7aee57f0daf4ac2e8b82c672f87e9 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-09Tests to target holes in adjacency and DPO test coverageNeale Ranns1-1/+3
Change-Id: Ic6ac7e441a7b75baa02f03c1585d1ae00903a399 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-08ARP resilience in the absence of IP config on input and output interfacesNeale Ranns2-0/+21
Change-Id: Ia9c6790436f8f6337b5351e3017ef5e441a8a4e9 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 5e323329ed6ded6f6944c56069329207ad9069c0)
2017-03-08API change (only) to not create a FIB table entry when adding a neighbor entryNeale Ranns1-1/+6
Change-Id: I1a8edaf1e0fca89e5d24d57dbb186ee46801f661 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-08vhost: binary API changes for interrupt modeSteven4-10/+41
Add operation_mode for create_vhost_user_if, modify_vhost_user_if, and sw_interface_vhost_user_details. Only polling mode is supported for these APIs. Other mode is rejected and gets VNET_API_ERROR_UNIMPLEMENTED error. Change-Id: I0596f4e2c087aa2b6f78eb3e0b63910b1859641e Signed-off-by: Steven <sluong@cisco.com>
2017-03-08LISP: fix gpe sub-interface lookupFilip Tehlar1-8/+8
Change-Id: I080b90a4bc53c2595ade696c592e86790c7ca939 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-03-08BUG: multiple registrations of 'vl_api_ip6nd_proxy_details_t_handlerNeale Ranns1-7/+0
Change-Id: I70e32b2196bfc8712d270f9a4365daca2504d52d Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-08Proxy ND (RFC4389 - or a sub-set thereof). This allows the 'emulation' of ↵Neale Ranns8-62/+330
bridging. That is hosts in one sub-net reachable via differenet interfaces. Introducate a new API command: ip6 nd proxy <host-address> <interface> this indicates 2 things; 1) that host <host-address> is reachable out of interface <interface>. VPP will thus install that route. 2) NS requests sent to <host-address> will be responeded to (i.e. proxied). Change-Id: I863f967fdb5097ab3b574769c70afdbfc8d5478a Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-08LISP: add stats API/CLIFilip Tehlar5-0/+175
Change-Id: I5c5b4d680359cf3635c2d7b0088ea2ba6a428f93 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-03-07Register TCP with IP only if session is enabledFlorin Coras4-8/+44
Change-Id: I73154179e78aeae5f879125237bce593d0978fae Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-03-07fix gcc 5.4 warning: argument to 'sizeof' in 'memcpy' call is the same ↵Gabriel Ganne3-17/+15
expression as the destination warning translates as an invalid write : sizeof(u8* b_dmac) == 8 != sizeof(eth_hdr->dst_address) == 6 ~/vpp/build-data/../src/vnet/l2/l2_vtr.c: In function 'l2pbb_get': ~/vpp/build-data/../src/vnet/l2/l2_vtr.c:734:63: error: argument to 'sizeof' in 'memcpy' call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess] ~/vpp/build-data/../src/vnet/l2/l2_vtr.c:736:63: error: argument to 'sizeof' in 'memcpy' call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess] update l2pbb_get to take an ethernet header instead of two u8* pointers for source and dest mac addresses. Change-Id: Ifcf1319a9e22614d57682f940e10f0420dc6fb8c Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-03-07DHCP Multiple Servers (VPP-602, VPP-605)Neale Ranns10-176/+440
Multiple DHCP (4 and/or 6) servers can be added and removed through multiple calls to the 'set dhcp server' API. All 4/6/ discover/solicit messages will then be replicated to all servers in the list. The expectation is that the servers/system is configured in such a way that this is viable. If VSS information is providied for the clinet VRF which also has multiple servers configured, then the same VSS information is sent to each server. Likewise the source address of packets sent to from VPP to each server is the same. Change-Id: I3287cb084c84b3f612b78bc69cfcb5b9c1f8934d Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-07CLI: hide deleted interfacesEyal Bari5-5/+40
Added a new interface flag - HIDDEN Indicates that the interface does not appear in CLI/API. Added three new interface functions: vnet_sw_interface_is_api_visible - indicates if the sw_if_index should be displayed vnet_swif_is_api_visible - variant for sw_interface vnet_sw_interface_is_api_valid - tests if the given if_index exists and is visible for future use by api functions Changed the unformat function to only accept visible interfaces Changed vxlan to add the HIDDEN flag to deleted interfaces This is the first part in a series to hide deleted interfaces from the API Change-Id: Ib43cc5cf1c450856560faf4e84126eb3671038e2 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-03-07In-band OAM active probe (VPP-471)AkshayaNadahalli3-32/+63
Change-Id: Icf0ddf76ba1c8b588c79387284cd0349ebc6e45f Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
2017-03-07fix uninitialized ip6 keys within session.cGabriel Ganne1-0/+8
fix for functions: - stream_session_lookup_listener6 - stream_session_lookup6 - stream_session_lookup_transport6 - stream_session_connect_notify eg. ~/vpp/build-data/../src/vnet/session/session.c: In function 'stream_session_lookup_listener6': ~/vpp/build-data/../src/vnet/session/session.c:222:17: error: 'kv6.key[3]' is used uninitialized in this function [-Werror=uninitialized] session_kv6_t kv6; ^ ~/vpp/build-data/../src/vnet/session/session.c:222:17: error: 'kv6.key[2]' is used uninitialized in this function [-Werror=uninitialized] ~/vpp/build-data/../src/vnet/session/session.c:222:17: error: 'kv6.key[5]' is used uninitialized in this function [-Werror=uninitialized] ~/vpp/build-data/../src/vnet/session/session.c:222:17: error: 'kv6.key[4]' is used uninitialized in this function [-Werror=uninitialized] Change-Id: I221cafbaf4effa43662ffcc7bf5f9581e28f9db9 Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-03-07make per-adj counters configurableNeale Ranns4-61/+175
Change-Id: Ifdd2b204ecf7d855f1269c11224b9c825311904d Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-07Fixing loadbalancing over ECMP for recursive routesAkshayaNadahalli2-12/+10
Change-Id: Ibe1734aeb94bc17cd8d8bc6f35ca7b780aaa9599 Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
2017-03-06ioam: manycast using iOAM and SR (VPP-628)Shwetha Bhandari5-78/+172
Change-Id: I6d2afda991d771fb4a89fc3f6544f8e940a9b9f0 Signed-off-by: Shwetha Bhandari <shwethab@cisco.com>
2017-03-06BFD: documentationKlement Sekera11-91/+526
Change-Id: I06a23d24340c5527f3848177d2178bf3e55f7614 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-03-06Remove unused multicast fields from vnet_buffer_tNeale Ranns1-10/+0
Change-Id: I8db55443c0beb33a89520ab3167f703f8646ec9e Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-06features: take device-input buffer advance value directlyDamjan Marion6-34/+40
Change-Id: Ifac7d9134d03d79164ce6f06ae9413279bbaadb3 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-03-06BFD: drop rpc call if packet doesn't match sessionKlement Sekera1-1/+1
In a very unlikely scenario, during which a session is removed and replaced with a different session sharing the same session index, while a packet is in-flight during RPC call, drop that packet. Change-Id: If1c4a77fc2ab460bae2435db066a133185b98747 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-03-06BFD: remove unneeded codeKlement Sekera1-15/+0
Change-Id: I0371e8e3c94bb793e3c64d5f51aaebf19dddc4b4 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-03-06span: wrong destination interface in tracingPavel Kotucek1-28/+18
Change-Id: I9bea397e50fff4211c6e1e31503829e4dd16be42 Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-03-06Quad loop interface-output nodeDamjan Marion1-13/+48
Change-Id: I0c24d9af90241083ae56b1d52239d2d55e70b65e Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-03-04DHCPv6 - Be consistent with the use of MFIB index as the RX FIB index for ↵Neale Ranns4-20/+78
DHCPv6. For the same table ID, the unicast-FIB index is not necessarily the same value as the multicast-FIB index, since features (like LISP, SR) can create unicast-tables, and thus affect only the index of the unicast FIBs Change-Id: Ibfa334d7eda822f742c241b7ce69a6271b4753a9 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-04Cleanup URI code and TCP bugfixingFlorin Coras15-143/+537
- Add CLI/API to enable session layer, by default it's disabled - Improve rcv wnd computation - Improvements to tx path - URI code cleanup - Builtin test tcp server - Improve src port allocation Change-Id: I2ace498e76a0771d4c31a8075cc14fe33d7dfa38 Signed-off-by: Florin Coras <fcoras@cisco.com>