2654 Commits

Author SHA1 Message Date
Neale Ranns
de9fbf43d2 MAC IP ACL interface list dump (as an alternative to the get/reply)
Change-Id: I2e71aef1aa745e85ad3234b0b708cdc50f335a75
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-08-08 13:18:02 +00:00
Andrew Yourtchenko
a5e614f76f acl-plugin: rework the optimization 7383, fortify acl-plugin memory behavior (VPP-910)
The further prolonged testing from testbed that reported VPP-910
has uncovered a couple of deeper issues with optimization from
7384, and the usage of subscripts rather than vec_elt_at_index()
allowed to hide a couple of further errors in the code.
Also, the current acl-plugin behavior of using the global
heap for its dynamic data is problematic - it makes
the troubleshooting much harder by potentially spreading
the problem around.

Based on this experience, this commits makes a few changes to fix
the issues seen, also improving the serviceability of the acl-plugin
code for the future:

- Use separate mheaps for any ACL-related control plane
operations and separate for the hash lookup datastructures,
to compartmentalize any memory-related issues for the ACL plugin.

- Ensure vec_elt_at_index() usage throughout the hash_lookup.c file.

- Use vectors rather than raw memory for storing the "ordinary" ACL rules.

- Rework the optimization from 7384 to use a separate tail pointer
rather than overloading the "prev" field.

- Make get_session_ptr() more conservative and adjust is_valid_session_ptr
accordingly

Change-Id: Ifda85193f361de5ed3782a4acd39622bd33c5830
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit bd9c5ffe39e9ce61db95d74d150e07d738f24da1)
2017-08-08 09:43:53 +00:00
Filip Tehlar
7048ff1e3a LISP: Map-server fallback feature
Change-Id: I1356296e1a85b5d532f45ba70572b2184ac3f6fb
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-08-07 14:53:56 +00:00
Klement Sekera
94384e4d3a make test: kill all remaining subprocesses on exit
This change introduces a wrapper script which kills all processes in
the same process group as itself (with the exception of the script).
Using this script to run the unit tests should prevent stale processes
left behind in some cases (e.g. when test framework crashes).

Change-Id: If3b9201c06b87fa6be095721436893207d09b5e4
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-08-07 14:53:17 +00:00
Filip Tehlar
5391e19c9c LISP: fix map register TTL reply handler, VPP-926
Change-Id: I0c638ad5dabc035b4b7de3b9befbe2c8ba7b0b66
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-08-05 03:07:19 +00:00
Matej Perina
63a46fc9be jvpp: provide more detailed exception logs (VPP-436)
Error descriptions provided in api_errno.h are never used,
only error tag/name and number make it to enum vnet_api_error_t
so new macro is introduced in jvpp_common.c to extract message
according to error number and passed to VppCallbackException
constuctor.

Change-Id: If2a687752807d7250d9226987583df00f151e87f
Signed-off-by: Matej Perina <mperina@cisco.com>
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-08-04 20:00:47 +00:00
Neale Ranns
5c994c15d8 don't truncate the interface name in 'sh ip arp'
Change-Id: Ifb17bae98ae1362078889d40e2369d58997bd92c
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-08-04 06:22:23 -07:00
Hongjun Ni
e1bf572999 Initialize vxlan-gpe bypass mode
Change-Id: I2a75357d49a971818c8d96d56d184c5d01fbc775
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-08-04 09:07:34 +00:00
Matus Fabian
7801ca29b8 SNAT: fix address and port allocation for multiple worker threads (VPP-925)
There is a chance to allocate the same outside address and port.
Assign a block of port numbers to each worker.

Change-Id: I6ef7dc0aab4834705f4e6097c362940d18d747e8
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-08-04 08:21:27 +00:00
Thomas F Herbert
33129bb9a3 Fix nasm deps for Fedora.
Fedora 24 and 25 distro already includes nasm 2.12 but Centos does not as yet.

Change-Id: I060ea8b7b7892ac8444d850398ed1c9100631fbc
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2017-08-04 07:12:06 +00:00
Andrew Yourtchenko
22d32d916f acl-plugin: multicore: CSIT c100k 2-core stateful ACL test does not pass (VPP-912)
Fix several threading-related issues uncovered by the CSIT scale/performance test:

- make the per-interface add/del counters per-thread

- preallocate the per-worker session pools rather than
  attempting to resize them within the datapath

- move the bihash initialization to the moment of ACL
  being applied rather than later during the connection creation

- adjust the connection cleaning logic to not require
  the signaling from workers to main thread

- make the connection lists check in the main thread robust against workers
  updating the list heads at the same time

- add more information to "show acl-plugin sessions" to aid in debugging

Change-Id: If82ef715e4993614df11db5e9afa7fa6b522d9bc
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 8e4222fc7e23a478b021930ade3cb7d20938e398)
2017-08-03 17:00:35 +00:00
Neale Ranns
808c5b21c2 DHCP Client: receive unicast ACKs
despite VPP DHCP client setting neither ciaddr nor giaddr and setting the broadcast bit (see RFC 2131 section 4.1) some DHCP servers will still send a unicast DCHPACK. So as not to drop this VPP must have both 1) a receive FIB entry for the OFFERED IP adress and 2) a 'don't drop me because of uRPF' FIB entry for the DHCP server's address.

Change-Id: I167d858deb45629318cbdccf5bf67d971730a42f
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-03 17:00:31 +00:00
John Lo
8d00fff8df Add support for API client to receive L2 MAC events
Added APIs want_l2_macs_events and l2_macs_event to allow an API
client to receive notification events from VPP for MAC learned
or aged in L2FIB. Only one API client is allowed for L2 MAC events.

The want_l2_macs_events API allow caller to specify MAC learn
limit, event scan delay and max number of MACs that can be included
in a event message. These parameters should be choosen properly as
to not have too many MAC events sent by VPP and overwhelm the API
share memory. They can all be left as 0's so VPP will setup reasonable
defaults which are: 1000 learn limit, 100 msec scan delay and 100
MACs per event message.

If want_l2_macs_events is never called, VPP learning and aging
should behave as before except that MAC entries provisioned by API
or CLI will not be aged, even if it is not set as static_mac. These
non static MACs, however, can be overwritten by MAC learning on a
MAC move as a leared MAC. Only learned MACs are subject to aging.

Change-Id: Ia3757a80cf8adb2811a089d2eafbd6439461285c
Signed-off-by: John Lo <loj@cisco.com>
2017-08-03 08:45:32 +00:00
jerryian
a825c8bf5c gtpu bypass function doesn't work (VPP-924)
Change-Id: I80183f7d984ed6ed2e3405d1bb65fe761a29bc81
Signed-off-by: jerryian <gu.jian1@zte.com.cn>
2017-08-03 08:30:30 +00:00
Filip Tehlar
1e553a0038 LISP: make TTL for map register messages configurable
Change-Id: I38e1c6a6b033e12ef3f4345a1deff73fa4adbea0
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-08-02 17:10:14 +00:00
Pavel Kotucek
5780898e5b Fix vpp crash sending arp or probing neighb (VPP-917)
VPP crash when trying to send arp message or to probe neighbor over
interface with IP address but without hw address (local0 and tunnels
- vxlan, gre, ...)

Change-Id: I08a1c97d3ea913fc11b2886cf73b2ccc31356664
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-08-02 16:06:30 +00:00
Dave Barach
ac0c96bc56 Fix ip checksum offload, move badly-placed ASSERT
Change-Id: I5e04d618c4b4987edc64f6d82fd0a81b8362dbb0
Signed-off-by: Dave Barach <dbarach@cisco.com>
2017-08-02 14:13:08 +00:00
Damjan Marion
34da892b41 memif: construct interface name out of socket file idx and intf id
Change-Id: Ib4de018a84e9c94df26a8870bf1b04e26204ace1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-08-02 13:26:38 +00:00
Marco Varlese
024e23ddd9 Added NASM package to support SW crypto
Change-Id: Idd6614b80e456eb40c760024b563ffd0e5c313ec
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-08-02 13:16:19 +00:00
Jan Gelety
83d8fdabca Update CSIT tests 170724 -> 170731
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I3ec322a71764d6d3e8aaeeabd4464fd6bde2880e
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-08-02 13:04:37 +00:00
Florin Coras
66b11318a1 Fix tcp tx buffer allocation
- Make tcp output buffer allocation macro an inline function
- Use per ip version per thread tx frames for retransmits and timer
  events
- Fix / parameterize tcp data structure preallocation
- Add a couple of gdb-callable show commands
- Fix local endpoint cleanup

Change-Id: I67b47b7570aa14cb4634b6fd93c57cd2eacbfa29
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2017-08-02 01:49:39 -07:00
Florin Coras
fdbc38249a Make ip csum configurable in vlib buffer functions
Also fixes csum computation for lisp control plane 4o6 encapsulated control
messages.

Change-Id: I991e0b5c0d16dc51e0b5bdc79e1d752270b34765
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-08-02 00:03:45 +00:00
Neale Ranns
a0a908f1df FIB path weight incorrect in dump (VPP-922)
Change-Id: I655f41878ca3595681d0255782b0faba01c9824b
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-01 21:50:15 +00:00
Neale Ranns
42e6b097e0 Tests for recursive load-balancing with no choices.
Change-Id: I90bb3369576741d03628a818ffa63cc99d6e4c98
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-01 15:36:26 +00:00
Pavel Kotucek
15ac81c16f P2P Ethernet
Change-Id: Idb97e573961b3bc2acdeef77582314590795f8c3
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-08-01 14:44:13 +00:00
Eyal Bari
5b311202b8 SPAN/API:enable L2 dump
Change-Id: Icea1dff33aae35a85ae1a7ed1900a0abb3fe4b6b
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-08-01 02:32:53 +00:00
Dave Wallace
b88566498a ssvm->name must be a vector containing a c-string.
Change-Id: I14a97a7fdd000da62d2ed4bea71f55ee34a21311
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-07-31 13:33:11 -04:00
Matej Perina
84f2882476 jvpp: moving current tests to separate folder marked as examples
Change-Id: Ib1a13e0a6cba69aba7a26e1bd52f4c55c4ccc027
Signed-off-by: Matej Perina <mperina@cisco.com>
2017-07-31 15:10:21 +00:00
Eyal Bari
942402b020 CLI:add l2 input/outut to "sh int features"
Change-Id: If608bbc7f4c8b0d5c3a237098a20279e407c82d3
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-07-31 13:10:02 +00:00
Florin Coras
91d341c260 Fix fib_path encoding (VPP-921)
Change-Id: I4c3b22c333b052d068f1a5977e9d4e38471693d6
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-07-31 08:21:08 +00:00
Eyal Bari
4a7d50ee8d SPAN/CLI:fix disable + add errors
Change-Id: I3c697615698b622a2484df43fb78980be9b7ae98
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-07-31 00:58:48 +00:00
Florin Coras
68810624f8 Make tcp active open data structures thread safe
- Cleanup half-open connections and timers on the right thread
- Ensure half-open connection and transport endpoint pools are thread safe
- Enqueue TX events to the correct vpp thread in the builtin client
- Use transport proto in transport connections instead of session type

Change-Id: Id13239a206afbff6f34a38afa510fe014e4b2049
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2017-07-30 15:04:26 +00:00
Mohammed Hawari
03a6213fb5 ping: fixing wrong value when there are worker threads
- the echo_reply_node is now notifying the cli process on the main thread/vlib_main
- the timestamp for the icmp reply is now acquired in the echo_reply_node and not in the cli process to avoid an off by 10ms error (see 【vpp-dev】delay is error in ping with multi worker thread)

Change-Id: I21d37002b0376b4f2ccab08d8f04c2f2944b9b39
Signed-off-by: Mohammed Hawari <mhawari@cisco.com>
2017-07-27 22:10:26 +00:00
Damjan Marion
c418e4ac7c Fix interface reuse when running multithreaded
Node function pointer was not set on all node runtimes causing crash if
new interface is different type.

Change-Id: I4661fe883befc6cd3fc6dfc14fd44f6fa5faf27c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-07-27 10:50:58 +00:00
Damjan Marion
6b0f589283 Thread safe internal buffer manager
Change-Id: I45845b952aa42a854e1c2c396b85f905de987020
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-07-27 10:50:34 +00:00
Steven
2ee2d57c3a vhost: debug vhost-user command needs better error checking on the syntax (VPP-916)
The syntax for debug vhost-user is
debug vhost-user <on | off>

However, currently the code does not reject the invalid command such as below
debug vhost-user
debug vhost-user on blah
debug vhost-user off blah

The fix is to enforece the correct syntax and reject the command when invalid
option is entered.

Change-Id: I1a04ae8ddb6dd299aa6d15b043362964e685ddde
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 6a4de2764d9e6cadf36af824dddb3f33c2d6dc7e)
2017-07-27 08:12:31 +00:00
Thomas F Herbert
5b75b6b73b Use relative path to vpp.service.
This change is necessary to avoid breaking builds from source rpm.

JIRA: VPP-498

Change-Id: I876572ff75f88e22bf8012cabb1bde7e6d3c925a
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2017-07-27 08:11:52 +00:00
Florin Coras
7c35f191eb Fix lisp udp checksum
Change-Id: I16c3f5a97c45e504eec94ce131e854d7da9cd0e3
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-07-26 14:43:15 +00:00
JingLiuZTE
30af5da752 VPP-905: Wrong define used in function start_workers.
Change-Id: I6a5faebb63e9360cebfcfb1bc3f3c0eb6b15e937
Signed-off-by: JingLiuZTE <liu.jing5@zte.com.cn>
2017-07-26 14:41:25 +00:00
Neale Ranns
c3fbd95660 17.07 Release Note
Change-Id: Iffbfffac1c508b000451e9f0e0b688d80785f7f5
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit f4f635e7c05a4430e834a725f611cb83a9179146)
2017-07-26 10:38:02 +00:00
John Lo
7d4a22cdea Add sample config of bonded interface in startup.conf template
Change-Id: I3985befbdd2a1a1a0e9473095034d0da7e5c32ed
Signed-off-by: John Lo <loj@cisco.com>
2017-07-25 12:46:16 +00:00
Florin Coras
04e5344a35 Cleanup/refactor session layer code
Change-Id: Ica99e8cb919fca6b069c37c969d60e8ccc2c6bf9
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-07-25 11:17:20 +00:00
Matus Fabian
f8d84901e4 SANT: fib_table unlock (VPP-918)
Change-Id: Ie0ad3671e3f4b55cd0f14601b6fed9ee2a1cbec0
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-07-25 09:11:06 +00:00
Jan Gelety
50b81e0703 Update CSIT tests 170626 -> 170724
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I5837921208bfdfe604c187c103e78b0924d802b9
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-07-24 14:19:14 +00:00
Eyal Bari
001fd406df SPAN:add l2 mirror
added span feature nodes for l2-input / l2-output

Change-Id: Ib6e0ce60d0811901b6edd70209e6a4c4a35cd8ff
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-07-24 08:21:52 +03:00
John Lo
beb0b2e346 Improve L2 Input/Output Feature Infrastructure and Usage
Simplify L2 output feature infra to unify with L2 input feature
infra using the newly improved feature bitmap mechanism.
Updated all L2 features to use the more efficient infra functions.

Change-Id: If8f463826b0af0717129befe92a27ea8cfc40449
Signed-off-by: John Lo <loj@cisco.com>
2017-07-23 14:03:41 +00:00
Dave Barach
858c06fac6 Atomic bucket lock
Change-Id: I84908b9ad30d7555024e98b69ed37b111f31c27a
Signed-off-by: Dave Barach <dbarach@cisco.com>
2017-07-23 00:55:13 +00:00
Florin Coras
6534b7aa13 Improvements to tcp rx path and debugging
- Increment rcv_nxt for fin packets
- Call tcp_segment_rcv only if buffer has data
- Parse rcv opts before deleting half-open connection
- Fix initial rcv_wnd
- Improved event logging

Change-Id: I9b83c04f432c4cec832c480b03e534deff02c3b1
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-07-21 19:20:09 -04:00
Matus Fabian
161c59c75c SNAT: in2out translation as an output feature hairpinning (VPP-913)
Change-Id: I3790739683c6090ffb2aefb4758bd4275856c09a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-07-21 03:46:47 -07:00
Andrew Yourtchenko
faee17e8b8 acl-plugin: assertion failed at hash_lookup.c:226 when modifying ACLs applied as part of many (VPP-910)
change 7385 has added the code which has the first ACE's "prev" entry within the linked list of
shadowed ACEs pointing to the last ACE, in order to avoid the frequent linear list traversal.
That change was not complete and did not update this "prev" entry whenever the last ACE was deleted.
As a result the changes within the applied ACLs which caused the calls to hash_acl_unapply/hash_acl_apply
may result in hitting assert which does the sanity check. The solution is to add the missing update logic.

Change-Id: I9cbe9a7c68b92fa3a22a8efd11b679667d38f186
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 45fe7399152f5ca511ba0b03fee3d5a3dffd1897)
2017-07-20 21:48:31 +00:00