summaryrefslogtreecommitdiffstats
path: root/src/vnet
AgeCommit message (Collapse)AuthorFilesLines
2017-05-23Labelled attached paths via an MPLS tunnelNeale Ranns5-40/+69
Change-Id: Ic86617c9c3217122043656ce2ea70bb106df5b2d Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-05-23ARP/ND entries for the same address on different interfaces (VPP-848)Neale Ranns18-735/+1194
there are, intentionally, no validation checks in the ARP/ND code to prevent an ARP/ND entry from being installed for an address that is not local to the interface's sub-net. This is ok, since the adjacency/FIB code is designed to handle this case using the 'refinement' criteria - i.e. only installing a FIB entry for the address if the address 'refines' (i.e. is more specific than) the interface's sub-net. However, the refinement criteria currently operates on the FIB entry's prefix (which is a /32, so on the address) and not on the next-hop in the path. So, enter multiple ARP entries for the same address on different links, and this refinement criteria uses only the last added path, and so will remove the FIB entry should the ARP entries be added in the 'wrong' order. This fix updates the refinement criteria to work on each path of the FIB entry. The entry is installed if one of the paths refines the covers and only paths refining the cover contribute forwarding. Per-path refinement checks are stored in path-extensions. The patch is rather large as path-extension, which were previously used only for out-going MPLS labels, have been generalized. Change-Id: I00be359148cb948c32c52109e832a70537a7920a Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-05-22vhost: migrate to use device infra for worker thread assignment, rx-mode.Steven4-484/+336
and add adaptive mode support to receive queue - Migrate vhost to use device infra which does the interface/queue to worker thread assignment. - Retire vhost thread CLI and corresponding code which assigns interface/queue to worker thread. set interface placement should be used instead to customize the interface/queue to worker thread assignment. - Retire vhost interrupt/polling option when creating vhost-user interface. Instead, set interface rx-mode should be used. - Add code in vnet_device_input_unassign_thread to change the node state to interrupt if the last polling interface has left the worker thread for the device of the corresponding interface/queue. - Add adaptive mode support. The node state is set to interrupt initially. When the scheduler detects a burst of traffic, it switches the input node to polling. Then we inform the device that we don't need interrupt notification. When the traffic subsides, the scheduler switches the input node back to interrupt. Then we immediately tell the driver that we want interrupt notification again. - Remove some duplicate code in vlib/main.c Change-Id: Id19bb1b9e50e6521c6464f470f5825c26924d3a8 Signed-off-by: Steven <sluong@cisco.com>
2017-05-22LISP-GPE: add dump call for VNIs in useFilip Tehlar5-1/+74
Change-Id: I394af7c1ac9fd0177ff5d298e4008245df54b436 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-05-20API: Cleaning up message naming that does not follow the conventionsOle Troan2-52/+41
is_address_reachable - Disabled so deleted cli_request - Renamed to cli vnet_summary_stats_reply - Renamed to vnet_get_summary_stats_reply bridge_domain_sw_if_details - Deleted, incorporated in main message l2_fib_table_entry - Renamed to l2_fib_table_details Change-Id: I93b7e8769a3ba7b4989b3c270270f575f386464f Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Marek Gradzki <mgradzki@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com>
2017-05-20Improve session debuggingFlorin Coras7-85/+171
Also improves builtin client code. Change-Id: I8bca1aa632028f95c373726efb0abf2ee0eff414 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-05-20vhost: buffers leak and interface disable upon vring descriptor out of mmapSteven1-16/+9
When processing a vring descriptor which is outside of mmap, we disable the interface and spit a message to shut/no shut the interface. This is not practical as application using vhost cannot constantly checking the logs and do the recovery. The proposed fix is to log an error, like other errors that we encounter. The other bug is buffer leak in the function rewind. At the end of the while loop when b_current != b_head, we still have to give back 1 more buffer or add 1 to rx_buffers_len. Change-Id: I68c0b24f070e644cd8878f42272a7b518f14393f Signed-off-by: Steven <sluong@cisco.com>
2017-05-20VPP-849: improve vnet classifier memory allocator performanceDave Barach2-274/+450
Port the linear-scan bucket fix from bihash_template.c. Change-Id: Id8b2d1fe402401f098270ce6121c2f44f2f24c49 Signed-off-by: Dave Barach <dave@barachs.net>
2017-05-20af_packet: set mac address supportRay Kinsella1-1/+47
Added support to the interfaces mac address. Resolved an fd leak when the interface is a bridge. Change-Id: I6608c51b11a50bd0ae4aabe0dc5788c4301b5a1e Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
2017-05-19mfib CLI bugs (VPP-852)Neale Ranns3-8/+16
Change-Id: I1b71010e20742eee02693d672e24c85897e37759 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-05-19Enforce Bridge Domain ID range to match 24-bit VNI rangeJohn Lo5-9/+29
Enforce bridge domain ID range to allow a maximum value of 16M which matches the range of 24-bit VNI used for virtual overlay network ID. Fix "show bridge-domain" output to allow full 16M BD ID range to be displayed using 8-digit spaces. Change-Id: I80d9c76ea7c001bcccd3c19df1f3e55d2970f01c Signed-off-by: John Lo <loj@cisco.com>
2017-05-18Remove nop code from session_manager_add_first_segment().Dave Wallace1-2/+0
Change-Id: I071e8d78ed9312ebf8e572bf01ece447ce1a1835 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-05-18Improve sack bytes accounting and testingFlorin Coras5-37/+140
Change-Id: Iabeda0d0615b0f6fe20dd00611cb4c594d90b7eb Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-05-17VPP-719: Accept ARP replies from VRRP hw addrMatthew Smith1-7/+27
Check whether an ARP src hw addr starts with 00:00:5e:00:01 before rejecting due to a mismatch between ARP src hw addr and ethernet frame src addr. Change-Id: Ia3ecd5d6dba34876aca8d90bc622a0a1397e48fb Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2017-05-17vhost: bad packet assembled from descriptor chainingSteven1-1/+2
When the descriptor is chained via multiple parts, vhost is supposed to reassemble the different parts to form a packet prior to passing the packet to the next input node. However, bad packet was seen, having bad ethertype, source, and destination mac addresses. The problem was due to the destination pointer not being incremented as each chain is processed. THe result was the first chain is copied to the beginning of the buffer, the next chain is copied, then the last chain is also copied to the beginning of the buffer. As a result, the ethertype, source and destination mac, etc, are being overwritten by the very last chain of the descriptor. Change-Id: I78f9a91de68c85574047912576dcc311d7597e21 Signed-off-by: Steven <sluong@cisco.com>
2017-05-17Use counters on ipsec tunnel interfacesMatthew Smith3-6/+107
Increment byte & packet counters when packets are sent or received on an IPsec tunnel interface. Set counters to zero when the interface is deleted. Change-Id: Ie9584aa82778875dd4d0c931005f7720b4d5c76d Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2017-05-17Add ethernet type to support NSH over ethernetHongjun Ni1-1/+1
Change-Id: I876599d6183fab989949e8ccad5c0a3ef81991be Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-05-17VPP-846: tcp perf / scale / hardeningDave Barach6-48/+106
Fix builtin server event queue handling Change-Id: I21b49c37188746cadb2fd9423291c5dc1335798c Signed-off-by: Dave Barach <dbarach@cisco.com>
2017-05-17ARP learning fixes (VPP-843)Neale Ranns3-82/+68
learn ARP peers if, 1) it's a reply to a local address, 2) we are sending a response to a request. send proxy ARP responses only in the interface the request was sent. Change-Id: I22b949c65122824233076492b7dd537daca07bc2 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-05-16Fixes to tcp active opens and receptionDave Barach2-1/+10
- Properly initialize connection index - Add new session to main hash table - Drop packets that are completely in the past with respect to the rcv wnd (e.g., retransmits due to premature timer pops) Change-Id: Ic0873018ff0a4c59e0913863dc7f0c0f822d5c34 Signed-off-by: Dave Barach <dbarach@cisco.com> Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-05-16ping command does not work when there is woker thread (VPP-844)flyingeagle231-0/+1
Change-Id: Ic896b237a7d141243e1b7d6d4fbb2a120f44363e Signed-off-by: flyingeagle23 <wang.hui56@zte.com.cn>
2017-05-15Add sw_if_index of tunnel interface to API reply for ipsec_tunnel_if_add_delMatthew Smith4-15/+36
Change-Id: If5158f6fa7344dee94548c93dace779430e0647f Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2017-05-15Add GTP-U plugin. VPP-694Hongjun Ni2-0/+4
Basic GTP-U feature Change-Id: I31226f890a92c5303ac06e112ed7820cae52d9bd Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-05-15af_packet: support changing the mtu sizeRay Kinsella1-1/+23
Added support to the af_packet device to change the MTU size. Change-Id: I9c9e1e17323721f3efccf70a10b753e12eef94d5 Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
2017-05-15Fix builtin tcp clientDave Barach4-38/+78
Change-Id: I83a1b02a73fd159f14cca04fed3993f571475a00 Signed-off-by: Dave Barach <dbarach@cisco.com>
2017-05-15L2BD/API:fix bd dump to ignore unknown bd_idEyal Bari1-19/+20
Change-Id: I417dfeba902ca8c3a080773942d4d2ce4335a9c1 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-05-15Fix vnet_interface_counters API definitionAloys Augustin1-7/+28
The api specification had u8 as data type, which caused the python binding to fail. Fixes VPP-642 Change-Id: I9ba97959740d44c8f4a12db9356d0d1bcd709a73 Signed-off-by: Aloys Augustin <aloys.augustin@polytechnique.org> Signed-off-by: Ole Troan <ot@cisco.com>
2017-05-15Fix FIB recursion loops via cover (VPP-842)Neale Ranns3-38/+81
Change-Id: Ia91c3e8cb27b9e4c1cccefc0a4857dd9995450ab Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-05-11Validate ip6 interface fib tables early onFlorin Coras1-0/+5
This should avoid random crashes due to reception of packets (multicast in particular) before ip6 addresses are configured on the interfaces. Change-Id: Ibcf1a5a2ae2fa75f8b57da1b2f09f32c081210d7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-05-11Handle RST of TCP connections in SYN-RCVD state, VPP-822Florin Coras1-8/+23
Change-Id: Ieb0c1e690d6ae082cfedb276252a31fab480e561 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-05-10vnet: introduce error state for sw interfacesDamjan Marion3-1/+13
Interfaces with error state are not allowed to go admin up Change-Id: I09fc09a5b28130aead219dccbc2e0f30ea7414cf Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-10completelly deprecate os_get_cpu_number, replace new occurencesDamjan Marion2-5/+5
Change-Id: I82c663bc0866c6c68ba354104b0bb059387f4b9d Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-10Multi-thread enablement for the debug cli http serverDave Barach3-2/+35
Change-Id: Iec1f739fe24c722d0db6c10cc81b5e8333067ea1 Signed-off-by: Dave Barach <dbarach@cisco.com>
2017-05-10Add crc32c inline function, allows compilation on 32-bit systemsDamjan Marion1-1/+1
32-bit code still can use crc32c instructions, but it operates on 32 registers Change-Id: I9bb6b0b59635d6ea6a753584676ebcf59c8f6584 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-10device: Add callback for set interface rx-modeSteven3-27/+72
- When the interface rx-mode is changed via CLI, the corresponding device may want to know about it and to reset the driver. This patch is to add the callback. - In the function vnet_hw_interface_set_rx_mode, it appears it is missing a line hw->rx_mode_by_queue[queue_id] = mode because the function is checking if the new mode is the same as hw->rx_mode_by_queue which is initialized to POLLING. So if the function is called to change the mode to interrupt, it just returns without doing anything. This is the check that I am talking about in the same function. if (hw->rx_mode_by_queue[queue_id] == mode) return 0; Change-Id: Iaca2651c43e0ae3fda6fd8dc128e247b0851cc65 Signed-off-by: Steven <sluong@cisco.com>
2017-05-10Improve TCP option handling, VPP-757Florin Coras3-15/+54
Change-Id: Ica634536387d1196366ec96c52770287fcab0768 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-05-10Builtin debug cli http serverDave Barach3-5/+646
Visit http://<vpp-ip>/show/interface or similar. Change-Id: I076b4661cf19d1b94bb01efdadb5849446be915e Signed-off-by: Dave Barach <dave@barachs.net>
2017-05-10Ignore data in RST segments, VPP-723Florin Coras2-59/+53
Change-Id: I01650b3b10b79ec549be0d5eceb0e318c06fcb50 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-05-09Fix remaining 32-bit compile issuesDamjan Marion5-18/+21
Change-Id: I9664214652229b663c3e3ba7406b4ede96bfb123 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-09API support for IPsec tunnel interface creationMatthew Smith2-1/+87
Change-Id: I8c9f886cb95e92adbe1c646844789ca0a6bb6140 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2017-05-09Add support for tcp/session buffer chainsFlorin Coras5-75/+210
Change-Id: I01c6e3dc3a1b2785df37bb66b19c4b5cbb8f3211 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-05-08L2FIB:CLI/API to flush all non-static entriesEyal Bari7-88/+157
added CLI l2fib flush-mac all added API l2fib_flush_all flushes all non static l2fib entries on all valid BDs Change-Id: Ic963c88f4bed56308c03ab43106033132a0e87be Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-05-07Remove L2 GPE interface from bridge when deleting, VPP-833Florin Coras1-0/+6
Change-Id: I32725006e9235a02cada5b0ad8974bfc4274339f Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-05-07Include TCP options in segment size computationFlorin Coras5-42/+97
Ensure that TCP data plus options does not exceed peer's advertised MSS. Change-Id: I0de824cb3619346f0394dd694942fc1cf33a82b7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-05-07Fix TCP loss recovery, VPP-745Florin Coras5-48/+72
Allows pure loss recovery retransmits only on timeout. Change-Id: I563cdbf9e7b890a6569350bdbda4f746ace0544e Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-05-06Fix mac check issue for vitual tunnel interface with no mac addressHongjun Ni1-0/+3
Change-Id: I6ce21317fcaa25781199f4329be815f076ab8b09 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-05-05Fix L2FIB learn counter and memory cleanup of mac_by_ip6 hash tableJohn Lo2-5/+16
Fix global_learn_count to be incremented or decremented by add and deletion of non-static MAC entries from L2FIB only. Without this fix, the counter may reach the threshold of 1M and stop MAC leanring even though number of MAC entries in L2FIB is less than the threshold. Cleanup indirect hash key memory used by mac_by_ip6 hash table on BD deletion. Change-Id: I13986c4e6304c7956122520dd3f83d6bb6e65a15 Signed-off-by: John Lo <loj@cisco.com>
2017-05-05ip6_to_ip4.h coverity fixMatus Fabian1-1/+1
Change-Id: Ia11fa42d1f2b21a6195e7dc890f958830f83d3a7 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-05-05First commit SR MPLSPablo Camarillo22-40/+1325
Change-Id: I961685a2a0e4c314049444c64eb6ccf877c278dd Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
2017-05-05NAT64: Move IPv6-IPv4 virtual reassembly code from MAP-T to common library ↵Matus Fabian8-1503/+1461
(VPP-708) Change-Id: I9ad636f80bf109ffac9ca1b6d80d5f2c31f2076a Signed-off-by: Matus Fabian <matfabia@cisco.com>