aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
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 Marion7-38/+42
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-06Add support for unix { coredump-size <size> }.Klement Sekera1-0/+22
Use setrlimit to set the core size limit if the argument is passed to vpp. Change-Id: Ie76c082b2af81337310fcb1925af915a42067f15 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-06dpdk: init.c should be under device/Damjan Marion2-1/+1
Change-Id: I80831cee062a38a0f5ab1f1e56c2dc6dcd512b9d Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-03-06SNAT: session dump last heard type fixMartin2-3/+3
Change-Id: I3323f7d4bb5da4bc2b19637964e5467ac92680cd Signed-off-by: Martin <magalik@cisco.com>
2017-03-04Fix duplicate binary API registration messages / bugsDave Barach3-6/+5
Changed vat_api_hookup(...) to <plugin-name>_api_hookup, change to static functions. Fixed the related emacs-lisp plugin skeleton. Change-Id: Id14f8fc3138751f469d48fecb26175e938f5f028 Signed-off-by: Dave Barach <dave@barachs.net>
2017-03-04Export session.api.h for out-of-tree buildsAlexander Popovsky (apopovsk)1-1/+2
session.api.h is included in src/vnet/vnet_all_api_h.h since 68b0fb0c620, as such it should be added to the 'devel' package and installed for out-of-tree builds which use binary VPP API Change-Id: Ie8ad03d8df2a96cbc6913f767500d5ff34dcc915 Signed-off-by: Alexander Popovsky (apopovsk) <apopovsk@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 Coras24-1975/+1460
- 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>
2017-03-04Evolving SRv6 (Segment Routing for IPv6)Pablo Camarillo27-5614/+8352
Implements: 1.- SR Policies with several (weighted) SID lists 2.- Binding SID 3.- SR LocalSIDs with support for the following functions - End - End.X - End.DX6 - End.DX4 - End.DX2 - End.DT6 - End.DT2 - End.B6 - End.B6.Encaps 4.- SR Steering policies (to steer a traffic through an SR Policy) - Support for IPv6 traffic (IPv6 Encapsulation / SRH insertion) - Support for IPv4 traffic (IPv6 Encapsulation) - Support for L2 traffic (T.Insert / T.Encaps) 5.- Doxygen documentation 6.- Framework (APIs) to allow the definition of new SR LocalSID behaviors by means of plugins 7.- Sample SRv6 LocalSID plugin Change-Id: I2de3d126699d4f11f54c0f7f3b71420ea41fd389 Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
2017-03-04timing wheel: avoid queueing expired timers and caching wrong earliest ↵Andrew Yourtchenko1-2/+11
expiry value This commit addresses two issues: 1) Avoid refilling the timing wheel with stale timers in rare circumstances. The timing_wheel_advance() may call advance_cpu_time_base() to update the cpu_time_base, which is used as a starting point for 32-bit offsets of events on the timer wheel. If the timing_wheel_advance() is not called for a longer period of time, then advance_cpu_time_base() is called multiple times in a loop. advance_cpu_time_base() has two parts - the first part adjusting the base for the existing event, and the second part trying to fill with the new events from the overflow queue, which now fit into the 32-bit-sized time window off the new cpu_time_base. In doing so this second part incorrectly considers the timers which have just expired (have the time index == w->current_time_index) to still be unexpired and places them onto the wheel instead of returning them as expired. For quick successive executions of timing_wheel_advance() these events result in a relatively benign late expiry - the newly placed events expire during the next call to timing_wheel_advance(). If the successive executions of timing_wheel_advance() result in multiple invocations of advance_cpu_time_base(), the Nth iteration of it may place a stale event on the timer wheel if the event time index equals to the current time index (which has been previously purged), while the N+1th iteration of it will trigger an assert violation on this stale event, resulting in a reboot. As part of the testing, two test runs were done before and after the change. Each of the test runs consisted of the following command: for i in `seq 1 300`; do ./test_timing_wheel validate events 10000 synthetic-time verbose seed $i iter 10000 wait-time 2 max-time 300; done The test runs completed identically, however they uncovered the following assert failure: vpp/src/vppinfra/test_timing_wheel.c:225 (test_timing_wheel_main) assertion `min_next_time[0] <= tm->events[i]' fails This assert is the second issue covered by this commit: 2) Inserting a new element may result in incorrect cached expiry value The w->cached_min_cpu_time_on_wheel is being updated within timing_wheel_advance() every time the elements are expired. However, it is not touched if the new elements are inserted. Assuming current time is "T" and the cached min cpu time is "T+X", if a new element is being inserted whose expiry time is "T+Y", and Y is such that Y < X, then the value w->cached_min_cpu_time_on_wheel becomes incorrect until the next expiry event, during which it is updated. The test catches this transient condition which results in the asserts seen in the runs above. The solution is to update the w->cached_min_cpu_time_on_wheel within timing_wheel_insert_helper() as necessary. Change-Id: I56a65a9a11cc2a1e0b36937a9c6d5ad10233a731 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-03-03Implement a loopback instance allocation scheme.Jon Loeliger7-19/+241
To support creating loopback interfaces with a specific instance number, a new CREATE_LOOPBACK_INSTANCE API call with flag is_specified and value user_instance is introduced. Presumably the existing CREATE_LOOPBACK API message will be obsoleted and revmoved. The VAT cli commands can now mention and format the new field as 'instance %d' data. If no instance number is named, the old call CREATE_LOOPBACK is used to maintain backward compatibility. However, if the instance is named, the new CREATE_LOOPBACK_INSTANCE message will be used. Both the dynamically allocated and user-requested instance number are tracked in a bitvector. If is_specified is 0, the next free instance will be used.. A request for a specific instance number will be granted if it is available. On error, the value ~0 is returned. Change-Id: I849815563a5da736dcd6bccd262ef49b963f6643 Signed-off-by: Jon Loeliger <jdl@netgate.com>
2017-03-03Fixed PLUGIN_DISABLE bugPablo Camarillo1-1/+1
Change-Id: I7a0ff25a8f74e6eda3a44f2cd7d2e022683accd9 Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
2017-03-03Clean up VXLAN api message handler registration issuesJohn Lo1-94/+0
Remove the duplcate VXLAN related API handlers from api.c and keep the proper ones in ./src/vnet/vxlan/vxlan_api.c. Change-Id: I3b17e17d735bb453d080243bfa2783ce0de64885 Signed-off-by: John Lo <loj@cisco.com>
2017-03-03VPP-651: Ensure sw_if_index to node mapping for L2 output path is only done ↵Andrew Yourtchenko10-88/+53
via 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. This fix was first made in stable/1701 under commit e7dcee4027854b0ad076101471afdfff67eb9011. Change-Id: I32e876ab1e1d498cf0854c19c6318dcf59a93805 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-03-03Improve api trace replay consistency checkingDave Barach3-2/+41
Change-Id: I2c4b9646d53e4c008ccbe6d09c6a683c776c1f60 Signed-off-by: Dave Barach <dave@barachs.net>
2017-03-03IPv6 RA improvementsNeale Ranns3-157/+149
1) tests for RA options 2) memleaks deleteing a ip6_radv_info_t 3) MLD prefix code refactoring Change-Id: I34db103994bd8fbdbbec50b202d72770dd145681 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-03Changing the IP table for an interface is an error if the interface already ↵Neale Ranns7-66/+110
has an address configured (VPP-601) Change-Id: I311fc264f73dd3b2b3ce9d7d1c33cd0515b36c4a Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-03python API: work towards python/vpp api separationKlement Sekera1-1/+30
This change improves vpp_papi behaviour by introducing alternate way of calling vpp APIs. The common code is the same: vpp = VPP(...) vpp.connect(...) Calling VPP API is different, instead of deprecated: vpp.show_version() # deprecated one should write vpp.api.show_version() this allows VPP messages like "connect" and "disconnect" to be used, once the old API is dropped (in 17.07). Also part of this patch is a check for name conflict, to prevent VPP object overwriting its own functionality with generated code based on json files. Change-Id: I22e573b6a45f8b2a1f0340c5c2597c194fe42ca4 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-03-02VPP-608: fix coverity warning in vppapigenDave Barach1-2/+2
Change-Id: Ic26216bb03d941c1625a61c1c3340d2d70d84bd0 Signed-off-by: Dave Barach <dave@barachs.net>
2017-03-02Fix create_vlan_subif API using sw_if_index as hw_if_indexJohn Lo1-3/+8
Also added check for bounded interface. Change-Id: I44b981d5b6fbe360e0b95c326f3f8b0e6c715468 Signed-off-by: John Lo <loj@cisco.com>
2017-03-02Clean up binary api message handler registration issuesDave Barach14-397/+81
Removed a fair number of "BUG" message handlers, due to conflicts with actual message handlers in api_format.c. Vpp itself had no business receiving certain messages, up to the point where we started building in relevant code from vpp_api_test. Eliminated all but one duplicate registration complaint. That one needs attention from the vxlan team since the duplicated handlers have diverged. Change-Id: Iafce5429d2f906270643b4ea5f0130e20beb4d1d Signed-off-by: Dave Barach <dave@barachs.net>
2017-03-02bridge domain: fix members reordered when removingEyal Bari1-1/+1
since adding support for multicast vxlan flooding (flood class tunnel master) correct flood functionality depends on the order of the memebers vector solved by using vec_delete instead of vec_del1 which swaps members before deleting the last element Change-Id: I234f218d49172b4142c567db9699a5cb274e4a66 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-03-02SNAT: user's dump and session dump of a certain snat user.magalik6-3/+288
Change-Id: If75a35dbdcb43c1ce0128b8649f2ca3970d3fff5 Signed-off-by: Martin <magalik@cisco.com>
2017-03-02Remove the unused VRF ID parameter from the IP neighbour Add/Del APINeale Ranns3-8/+0
Change-Id: Icf0d72f6af1f98c86f78e586c354515ac69804aa Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-02Determine pkt type in dpdk-input node using ethertype only (VPP-647)John Lo1-52/+22
Remove reliance on DPDK driver provided mbuf packet type in dpdk-input node as some NIC driver provide misleading information. Now using ethertype from the packet itself to determine packet type for next node. Change-Id: Ie7b514a984f9382c29f1a1e3eb423d68f817c064 Signed-off-by: John Lo <loj@cisco.com>
2017-03-02Fix LISP Coverity warningFlorin Coras1-1/+1
Change-Id: Id1c3832609859ed004bacba0ced0d07dafd6c409 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-03-02VPP-648: CLI Memory leak with invalid parameterBilly McFall3-29/+88
After VPP-635 was merged, did one more pass. While the code was waiting to be merged, a few changes were merged to master with the same issue. This is a few additional changes addressing the same issue. See VPP-635. Change-Id: I7abeac5c260c1e2e9d9d318fd1aae24cd6932efc Signed-off-by: Billy McFall <bmcfall@redhat.com>
2017-03-02BFD: command line interfaceKlement Sekera11-168/+1081
Implement command line interface to the BFD binary APIs. Add corresponding unit tests. Change-Id: Ia0542d0bc4c8d78e6f7b777a08fd94ebfe4d524f Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-03-01dpdk: be a pluginDamjan Marion43-1585/+838
Change-Id: I238258cdeb77035adc5e88903d824593d0a1da90 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-03-01vppinfra: fix issue when copying 16 bytes with clib_memcpyDamjan Marion2-0/+10
Current code wos copying same data twice when length is 16. Change-Id: I8d935b32f61672aaea9789c097a5083ae8f78cdd Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-03-01VPP-598: tcp stack initial commitDave Barach94-512/+17375
Change-Id: I49e5ce0aae6e4ff634024387ceaf7dbc432a0351 Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-03-01Fix buffer template copyDave Barach2-5/+30
Change-Id: If451c9cb68719fc816999b0330b9be3a0169176a Signed-off-by: Dave Barach <dave@barachs.net>
2017-03-01devices: vnet_get_aggregate_rx_packets should not be dpdk specificDamjan Marion10-53/+59
Change-Id: I1152db4b7d1602653d7d8b2c6cb28cf5c526c4ca Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-02-28dpdk: retire support for dpdk 16.07Damjan Marion5-58/+3
Change-Id: I8585552c026415340fe9fd0458cb8450da3c4ae2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-02-28Clear L2 output config on interface mode change to L3 (VPP-651)John Lo1-4/+11
With VPP-651, the L2 output config with L2-tag rewrite was not cleared when a sub-interface is deleted. Subsequently, when the same sw_if_index was reused for another interface, the L2 output config with L2-tag rewrite remained on the new interface. On deleting a (sub-)interface which is in L2 mode, it will be changed to L3 mode first to clear any L2 config. The L2 to L3 mode change path did address L2 input config cleanup. It is now fixed to also clear L2 output config. Change-Id: I3352a89d92e1b27340a5adcf75bbaa01a5050c29 Signed-off-by: John Lo <loj@cisco.com>
2017-02-28vlib: add buffer cloning supportDamjan Marion8-265/+256
Change-Id: I50070611af15b2b4cc29664a8bee4f821ac3c835 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-02-28Fix warning in generated codeDave Barach1-4/+14
Change-Id: Ie56fca84a8a0ed77ee480e8078e6e9b3f4cef105 Signed-off-by: Dave Barach <dave@barachs.net>
2017-02-28Trace plugin binary API message range allocationDave Barach2-8/+89
Change-Id: I544a5d2906548607b69f999567b92f802fddddbb Signed-off-by: Dave Barach <dave@barachs.net>
2017-02-27BFD: disable debug printsKlement Sekera1-1/+1
Change-Id: I356581f4bdf47b9610b9e50f4f8db9a1510872a7 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-02-27vlib: add VLIB_BUFFER_EXT_HDR_VALID flagDamjan Marion4-5/+4
Change-Id: If56c66dd12eded1cc997087de5fd1b975766c4e2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-02-27Add GPE CLI/API for setting encap modeFilip Tehlar8-4/+319
Change-Id: Id89e23fb5d275572b2356c073dfa0f55719e1a76 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-02-27fix:vxlan mcast adj - added as ucast dpo adjEyal Bari1-1/+1
Change-Id: Ic2447313075cd46f265202dffaaac894f48ddf6d Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-02-26Load plugins in alphabetical orderDave Barach1-9/+55
API traces contain absolute message numbers. Loading plugins in directory (vs. alphabetical) order makes trace replay fragile. Change-Id: I46b3a3b6a9843a383d42269fca0cf5a789486eaf Signed-off-by: Dave Barach <dave@barachs.net>
2017-02-26BFD: echo functionKlement Sekera8-318/+864
Change-Id: Ib1e301d62b687d4e42434239e7cd412065c28da0 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-02-25Add NSH to GPE decap pathFlorin Coras5-20/+56
Change-Id: I97681322fa9ca81736100b4d32eab84868886c7b Signed-off-by: Florin Coras <fcoras@cisco.com>