summaryrefslogtreecommitdiffstats
path: root/vnet
AgeCommit message (Collapse)AuthorFilesLines
2017-03-02Ensure sw_if_index to node mapping for L2 output path is only done via ↵Andrew Yourtchenko3-3/+17
l2output_main.next_nodes Before this commit, several output features that happen to be the last in the list of features to be executed, send the packets directly to <interfaceName>-output. To do this, they use l2_output_dispatch, which builds a list of sw_if_index to next index mappings. When interfaces are deleted and the new interfaces are created, these mappings become stale, and cause the packets being sent to wrong interface output nodes. This patch (thanks John Lo for the brilliant idea!) adds a feature node "output", whose sole purpose is dispatching the packets to the correct interface output nodes. To do that, it uses the l2output_main.next_nodes, which is already taken care of for the case of the sw_if_index reuse, so this makes the dependent features all work correctly. Since this changes the packet path, for the features that were always the last ones it has triggered a side problem of the output feat_next_node_index not being properly initalized. These two users are l2-output-classify node and the output nodes belonging to the acl-plugin. For the first one the less invasive fix is just to initialize that field. For the acl-plugin nodes, rewrite the affected part of the code to use feat_bitmap_get_next_node_index since this is essentially what the conditional in l2_output_dispatch does, and fix the compiler warnings generated. Change-Id: If44457b1c1c3e197b78470c08555720d0872c6e5 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-02-27Clean up the L2 interface configs when creating the interfacesAndrew Yourtchenko1-0/+10
Without the cleanup in the L2 input/output configs, the creation of an interface with sw_if_index belonging to a previously deleted interface will use the stale vlan tag push-pop configuration from that interface, resulting in loss of connectivity when the host receives tagged packets but expects untagged ones. Change-Id: Ic186390ef3a41277f57847ed2962848b98379092 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-02-03vhost-user: fix missing speculative enqueue unwindSteven1-0/+4
Running trex in a VM with a bad config, trex sent a bogus pack from the VM to the Virtual interface. It caused a crash. Change-Id: I64d0197b444265553ab4c24f21e6a962e89cb587 Signed-off-by: Steven <sluong@cisco.com>
2017-01-26span: tx functionalityPavel Kotucek1-2/+2
span-output (tx) was enabled on wrong arc_name Change-Id: Ic21dfaec35c975de79abec66421b353637ac9394 Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-01-18LISP: Fix fwd adding, VPP-607Filip Tehlar1-1/+6
Change-Id: Ie48209ba6d9aab0c5cfbd7b3cce4114cf88f952c Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-01-18Fix crash on deleting activated vhost-user - VPP-603Wojciech Dec1-3/+3
Vhost-user pool getting freed prematurely Change-Id: I90b70889d2e5a01203dc7679583b7c9eff65a374 Signed-off-by: Wojciech Dec <wdec@cisco.com>
2017-01-16DHCPv6 Proxy; fix crash when DHCPv6 prxy is not configured and client packet ↵Neale Ranns1-1/+5
is received Change-Id: I0250acdee803545b8923549e2099863a95544691 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-01-10Account for pool realloc when importing FIB entries during VRF exportNeale Ranns1-4/+12
Change-Id: I8ec6d53fa9c0790f85802663f70a6b3630239f8d Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-01-09Fix ARP on unnumbered interfaces (VPP-583)Neale Ranns1-2/+15
Change-Id: Iea1e2c31c016c3bb6344f73173d082a2c548ffee Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-01-09Fix disable ip6 interface (VPP-584)Neale Ranns1-12/+3
Change-Id: I73e966f9afe866e7215fc2e57daecc4531381d92 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-01-04FIB memory leaks (VPP-578)v17.01-rc2Neale Ranns6-24/+48
1) vec_free the fe_srcs of a fib_entry_t when the fib_entry_t is itself reed 2) in the load-balance fixup if a drop path is required add this to a new vector of next-hops 'fixed_nhs'. This vector is managed by the load-balance function. The caller continues to manage its own set. The function is now const implying that the caller is safe to assume the next-hops do not change. Change-Id: I0f29203ee16b9a270f40edf237488fa99ba65320 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-01-03vxlan fix mcast tunnel deleteEyal Bari2-23/+27
Change-Id: I15f7ff1e957718e808bfad811895deaacb85d2a3 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-01-03LISP: fix EID addition (VPP-577)Filip Tehlar1-2/+5
Change-Id: I32f61ab89598a7911df3d0d8f45de1302af8aa6a Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-01-03LISP: fix fwd entry addition (VPP-576)Filip Tehlar1-1/+1
Change-Id: Ibdc9ad21cc53cf0a6d571a3f913038d61d9282a1 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-01-03VPP-574: fix VPP hang during security group configuration on a suspended VMAndrew Yourtchenko1-0/+4
The unix connect() in vhost-user driver in VPP is blocking, and a non-expedient accept() on the other side causes the entire VPP to hang. Solution: set the nonblocking flag for the socket fd before calling connect(), and set the socket back to blocking after the accept() succeeds. Change-Id: I2d535ea9b95a92922d305d79a8d860062c95faf4 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2016-12-21Support multiple VXLAN tunnels with same mcast dstEyal Bari2-74/+121
Support multiple vni's with the same group(multicast) address. Implemented by sharing local adj. and rewrite among tunnels. Change-Id: I8ca036b87af65dd6a8f1aff7da1855f72b4c8f4b Signed-off-by: Eyal Bari <ebari@cisco.com>
2016-12-21classify: add simple mechanism for automatic flow creation (VPP-338)Juraj Sloboda1-23/+5
VPP-338 Support wildcards in IPFIX flow configuration Change-Id: Ie5ab4f89d70153c3b15fc6bd8d97fa383ee842d9 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-12-20Always set start_of_ethernet_header in ethernet-input speed pathJohn Lo1-6/+10
The speed path of ethernet-input node is setting the packet context field start_of_ethernet_header for L2 only. This is also needed for L3 path because of IPv4 ARP processing which need to know the start of ethernet header of the incoming ARP packet. Change-Id: I98ee88c482f8536e4fccc0b8afcb8811d63f4435 Signed-off-by: John Lo <loj@cisco.com>
2016-12-20Decouple dependencies/assumptions in MAC changeNeale Ranns7-21/+35
Change-Id: Ic38d0e468da1ad5b56eefda471a5961146a1c372 Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-20dpdk: fix advance header for ip4-no-checksumSergio Gonzalez Monroy1-0/+1
Fixes: 78eeef747b19 ("Improve dpdk-input node to handle drivers not setting mbuf PTYPE") Change-Id: I94addcec2bf3097ab047e8d7e957bc983eab9add Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2016-12-20Improve dpdk-input node to handle drivers not setting mbuf PTYPEJohn Lo5-48/+111
For drivers that do not provide dpdk rte_mbuf PTYPE information, check ethernet header Etype to acccelerate IP4 and IP6 forwarding path. Update packet trace for dpdk-input node to provide more info from DPDK rte_mbuf offload flags and packet types. Change-Id: I207158797a155305314d002726c0af97b8cb0eb3 Signed-off-by: John Lo <loj@cisco.com>
2016-12-19l2input: remove unused code and reduce number of branchesDamjan Marion1-44/+18
Change-Id: Ic37b5740285dc0020b9fdb0d8c98bc304cee7aa8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-19dpdk: fix IV physical address in esp-decryptSergio Gonzalez Monroy1-2/+2
Change-Id: I96b74aa82231038c54e9d07b54cc16fc53efe0be Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2016-12-19dpdk: fix dpdk-crypto-input packet traceSergio Gonzalez Monroy1-3/+4
Change-Id: Ic8073215222e4800c62ac42738e73d5e990806ef Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2016-12-16Coverity fixes, VPP-486Dave Barach2-5/+8
Change-Id: I8906bb983128e8f6e2664e367d2015325c1125fb Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-16Fix dpdk-input check for VLAN packets including VLAN strip caseJohn Lo1-1/+16
For DPDK-16.11 or later, use packet_type to check packets with VLAN tags. For earlier versions of DPDK, keep using ol_flags but include PKT_RX_VLAN_STRIPPED bit as part of the VLAN tags check. Change-Id: Ic4ad8f04e44658dc0a99de0232fdc949cfa13e93 Signed-off-by: John Lo <loj@cisco.com>
2016-12-15Expand ethernet-input node speed-path for non-L2 pathsJohn Lo1-7/+22
Improve ethernet-input speed path for untagged packets to also handle L3 and other forwarding paths. In the IP4 forwarding path for untagged IP4 packets, per packet clock count in ethernet-input node is reduced to ~14 clocks from ~43 clocks. Change-Id: I8e6f121820e056d6085dff3eb95d6913fc422f99 Signed-off-by: John Lo <loj@cisco.com>
2016-12-15LISP: Fix several control plane message issues, VPP-558Filip Tehlar5-110/+215
* Fix TTL in map-regster message (defaults to 15 minutes) * Handle multiple local EID registration in a for loop * Parse multiple records in map-notifies, not only one * Parse map-notify in the worker thread instead of the main thread Change-Id: Ife68c2227bc5abf14c19f1a948a88d34de3b4af9 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-12-14Ping response in a VRF context uses correct FIB for responseNeale Ranns2-0/+17
Change-Id: I3b626a1fb9d74ebc609ded14c16c5e3d5a1655ab Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-14IP and MPLS route debug CLI fixesNeale Ranns2-2/+11
Change-Id: I1b61f36c88308c1bcf9a61a87843d1fea457d8fe Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-13LISP: Move parsing of LISP map-reply to worker thread, VPP-554Filip Tehlar2-97/+86
Change-Id: I2c3093068b97bb3ed10e1ecb067fc297013d063c Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-12-12ip4: perf optimization in the ip4-input nodeDamjan Marion2-83/+76
Change-Id: I9ddbbf8ce0d7307b9eb82ccd0c51f84e479ffd23 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-12ipsec: go straight to lookup after esp encryptSergio Gonzalez Monroy2-8/+8
Currently, IPsec tunnel traffic goes to ip4-input/ip6-input after esp-encrypt. It is not necessary to check that the new IP header is valid (if it is not valid then we have otehr issues). Instead, just send packets straight to ip4-lookup/ip6-lookup after esp-encrypt. Change-Id: I5e35d500cb0f33f418f8554ed1f4390f02b6647d Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2016-12-11MPLS Nodes Dual LoopNeale Ranns4-17/+396
Change-Id: Ic54d4cb9dec8e91446b9b4d2b40ed69a14bd4355 Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-11VRF imported FIB entry should inherit the flags from the export entry.Neale Ranns2-7/+11
Change-Id: Ie2c3d62a468315390ef2c4314a73cff0f6d3cdaf Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-09ip4: perf optimization in the ip4-rewrite nodeDamjan Marion1-13/+6
This change shows around 7% improvement in ip4 path when ip4-output features are not used. Change-Id: I81c1c4c38c99fff0ad8270d3c0df907acf1d8c58 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-09Add FIB unit test to 'make test'Neale Ranns1-22/+44
Change-Id: I57126416f57649768f3601cd715c7f5f4b9b9fad Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-09BFD: handle timing wheel prematurely firing eventsKlement Sekera4-69/+85
Improve handling of timeouts. Add a workaround for when timing wheel fires an event a tiny amount of time before it should actually be fired. Don't delete unneeded events at all from timing wheel, instead ignoring unexpected events. Enable the skipped BFD test, which passes now. Change-Id: I6ffd4fc0ba7a049ffe63bb0e5290641a7300dd6f Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-09Coding standards cleanup for vnet/vnet/ip, VPP-255Dave Barach52-7808/+9133
Change-Id: I12892fa571cc50e0541d6463a8b68e1b618edd9f Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-09VPP-547: Fix for co-existence of HbH and RH header in Segment routing:Shwetha4-107/+457
1. sr-rewrite - SR insertion in v6 : SR RH is inserted immediately after v6 header but if hbh header is present as per RFC2460 it should immediately follow v6 header. This is fixed. 2. sr-local : v6 packet destined to a sr segment is received if hbh is present it is not handed over to sr-local for processing. fixed ip6-local handling to skip hbh as there is no register handler for hbh for now. 3. sr-replicate - update in dual of sr_rewrite to handle replicate, fixes in sr-replicate to handle presence of hbh header Change-Id: I034523a42d2fedf97134761f956ab534babb8b36 Signed-off-by: Shwetha <shwethab@cisco.com>
2016-12-09DPDK HQoS: enable vpp control plane thread connection to hqos threadJasvinder Singh2-4/+10
The vpp control plane thread generates different types of packets such as ARP, DHCP client, IPv6 RA, etc. which need to go through HQoS thread associated with the output interfaces. Therefore, this patch enables vpp main thread connection with the HQoS thread through dedicated SWQ. Change-Id: Idcb759546d4bcd9b40beedaec4f12b29baae3e40 Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2016-12-09BFD: fix timing in the main loopKlement Sekera3-28/+59
Properly wakeup the main process loop only when necessary to avoid missed events. Improve BFD unit test reliability and speed. Add timestamps to logs and replace Queue with more efficient deque. Change-Id: I01255a02057d3146917b43b669ccdc74f31ef0c8 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-09Add extra validation for VXLAN packets and tunnelsJohn Lo3-90/+244
- On VXLAN packet decap, validate its DIP against VXLAN tunnel. - Add extra logic to validate and handle creation of multicast VXLAN tunnels. Change-Id: I6abdddd7be4cd9f1bcfc88d9970ba681fdd72f7c Signed-off-by: John Lo <loj@cisco.com>
2016-12-09VPP-470: Introduce VxLAN-GPE as transport for iOAM.Vengada Govindan6-61/+137
See Jira ticket for more details - New plugins created to (a) Add VxLAN-GPE as transport (b) Provide export infra for VxLAN-GPE. Change-Id: Ife50c7434f53d17a4783062310f73d063d53494c Signed-off-by: Vengada Govindan <venggovi@cisco.com>
2016-12-08BFD: improve ip header handling, fix assertKlement Sekera4-13/+37
Instead of storing a pointer, store an offset within vlib_buffer marking the start of the ip header (similar to storing start of ethernet header). Handle negative timeout in the bfd process main loop. Change-Id: I05a1ff3ac41da5bdc3b2ac6f9e03b3241994688b Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-08Fix bug in code for setting dpdk interface descriptors (VPP-552)Juraj Sloboda1-1/+1
Change-Id: I6401b745eeb402ec980e86dc179b774d341c4764 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-12-08dpdk: don't drop packets if l4 checksum is flagged as badDamjan Marion2-10/+2
Sometimes NICs are flagging checksum 0 as bad, which is not always true. Change-Id: Ibb0147c94f436966e6afa472025bdf92c41f201e Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-08vhost: fix coverity warningPierre Pfister1-1/+1
Change-Id: Ifb9f8d2528142ad9f11a2b6d5ac10ff9639dd5d6 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-12-07BFD: basic asynchronous session up/downKlement Sekera15-5/+2218
This is a work-in-progress basic BFD session handling. Only asynchronous mode is supported at the moment. Setting the session flags doesn't work. Change-Id: Idba27f721b5c35be5a66a6d202a63d23ff7ecf6f Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-07l2fib: add mac aging supportDamjan Marion6-18/+250
Change-Id: Ib617ae0f76320d596cc6c4b384da76c91d701a24 Signed-off-by: Damjan Marion <damarion@cisco.com>