vpp.git
7 years agocdp/lldp: punt for no buffer (VPP-997) 01/8701/2
Steven [Thu, 28 Sep 2017 23:38:56 +0000 (16:38 -0700)]
cdp/lldp: punt for no buffer (VPP-997)

When making a call to vlib_packet_template_get_packet(), it
is possible to get back a NULL if the system runs out of buffer.
This can happen when there is buffer leaks. But don't crash
just because we run out of buffers, just punt.

Change-Id: Ie90ea41f3dda6e583d48959cbd18ff124158d7f8
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 0ff5c563d5048991dbd02a3892dccde8305a7e30)
(cherry picked from commit 1808f3c00a7bcdea7f0c004ef0613db2156c2065)

7 years agotuntap: Introduce per thread structure to suport multi-threads (VPP-1012) 02/8702/1
Steven [Thu, 5 Oct 2017 07:12:33 +0000 (00:12 -0700)]
tuntap: Introduce per thread structure to suport multi-threads (VPP-1012)

https://gerrit.fd.io/r/#/c/8551/ decoupled the global variable,
namely tm->iovecs from TX and RX. However, to support multi-threads,
we have to eliminate the use of this global variable with per thread
variable. I notice that rx_buffers must also be per thread variable.
So, we introduce per thread struct to contain rx_buffers and iovecs.
Each thread will find the per thread struct with thread_index.

Change-Id: I61abf2fdace8d722525a382ac72f0d04a173b9ce
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 4cd257667406d0500a81323ef91f5c7c8c902b25)

7 years agotun/tap: Bad packets sent to kernel via tun/tap interface 86/8686/1
Steven [Tue, 26 Sep 2017 22:58:24 +0000 (15:58 -0700)]
tun/tap: Bad packets sent to kernel via tun/tap interface

It was observed that under heavy traffic, VPP accidentally sent traffic
with the wrong source and destination to the tun/tap interface. Traffic
appears to be sent to the wrong direction. This problem is only
seen when worker thread is configured.

When worker thread is used, TX and RX may reside in different
core. Yet both TX and RX threads are sharing the same global variable,
namely iovecs without any mutex or memory barrier protection.
This creates a race condition when heavy traffic is blasted to VPP,
like 1000 pps.

We could create a mutex or memory barrier to ensure atomic memory access.
But why bother? It is a lot cheaper to just decouple the iovecs such
that TX and RX have their own iovecs.

Change-Id: I86a5a19bd8de54d54f32e1f0845bae6a81bbf686
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 4ff586d1c6fc5c40e1548cd6f221a8a7f3ad033b)
(cherry picked from commit 3fd57e67532bd55701bef7365adc17da229a44dc)

7 years agoSet MAC address needs the HW interface index 64/8664/1
Neale Ranns [Wed, 4 Oct 2017 09:29:07 +0000 (02:29 -0700)]
Set MAC address needs the HW interface index

Change-Id: I7b175d57b85e626aab00221b6dac0498aebcbeae
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit d867a7cf6baffcebbf1b6e408272ec22dc55dd68)

7 years agoUpdate L2FIB entry timestamp only if BD aging enabled (VPP-1002) 45/8645/2
John Lo [Tue, 3 Oct 2017 21:39:00 +0000 (17:39 -0400)]
Update L2FIB entry timestamp only if BD aging enabled (VPP-1002)

Change L2 learning path so it update stale timestamp in MAC entry
only if aging is enabled on the BD for the MAC entry.

Change-Id: I849154fe7ad2c6c68d6a94a66ca9345f6a98bc07
Signed-off-by: John Lo <loj@cisco.com>
7 years agoVLAN support on host(af-packet) interface. 90/8590/1
Akshaya N [Fri, 15 Sep 2017 12:07:53 +0000 (17:37 +0530)]
VLAN support on host(af-packet) interface.

On host interface if a VLAN tagged packet is received, linux kernel removes
the VLAN header from packet byte stream and adds metadata in tpacket2_hdr.
This patch explicitely checks for the presense of VLAN metadata and adds it
in VPP packet.

Change-Id: I0ba35c1e98dbc008ce18d032f22f2717d610c1aa
Signed-off-by: Akshaya N <akshaya@rtbrick.com>
(cherry picked from commit 535f0bfe0274e86c5d2e00dfd66dd632c6ae20a9)

7 years agoThe build system still builds the DPDK plugin when the option 00/8300/1 v17.07.01
Marco Varlese [Fri, 1 Sep 2017 12:47:53 +0000 (14:47 +0200)]
The build system still builds the DPDK plugin when the option
vpp_uses_dpdk is set to "no" in build-data/platforms/vpp.mk causing the
build to fail.

This patch addresses that issue.

Change-Id: Icc1aaa508e730c9b8715119e1259e4c82f974048
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
(cherry picked from commit edfa2fddf84fe102e3c134c4df312638b3a00339)

7 years agoImprove L2FIB PDR/NDR performance (VPP-963) 43/8243/2
John Lo [Wed, 30 Aug 2017 08:23:43 +0000 (04:23 -0400)]
Improve L2FIB PDR/NDR performance (VPP-963)

1. Limit MAC entry update per l2-learn call to reduce update burst
   when wall clock advance to the the next minute so all MAC time
   stamps are behind current time.
2. Optimize l2-learn node fast path code sequence.
3. Invalidate cache_key when update MAC entry.
4. Change L2 learn hit counter to L2 learn hit-update counter.
5. Increase L2FIB table memory size to 512MB to fit 4M entries
6. Set MAC learn limit at 4M entries

Change-Id: I19572f7f8a4b42a01be025a609fb03af50af16b2
Signed-off-by: John Lo <loj@cisco.com>
7 years agoacl-plugin: warning printed when acl_add_replace already applied ACLs (complete the... 47/8147/3
Andrew Yourtchenko [Fri, 18 Aug 2017 17:10:39 +0000 (19:10 +0200)]
acl-plugin: warning printed when acl_add_replace already applied ACLs (complete the fix for VPP-935)

The fix for VPP-935 missed the case that hash_acl_add() and hash_acl_delete() may be called
during the replacement of the existing applied ACL, as a result the "applied" logic needs
to be replicated for the hash acls separately, since it is a lower layer.

Change-Id: I7dcb2b120fcbdceb5e59acb5029f9eb77bd0f240
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agovl_api_sw_interface_set_mtu_t_handler: fix assert in vnet_get_hw_interface 56/8156/3
Andrew Yourtchenko [Tue, 22 Aug 2017 11:10:01 +0000 (13:10 +0200)]
vl_api_sw_interface_set_mtu_t_handler: fix assert in vnet_get_hw_interface

The handler was calling the routines with sw_if_index instead of hw_if_index,
fix that by an extra call to vnet_get_sw_interface, and check that the interface
type is VNET_SW_INTERFACE_TYPE_HARDWARE before proceeding.

Change-Id: I4a6f65f44e250ecdb2b72d2693c9d7db5a52b966
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agodpdk: define MACHINE before it is used 60/8160/1
Damjan Marion [Mon, 21 Aug 2017 20:19:04 +0000 (22:19 +0200)]
dpdk: define MACHINE before it is used

This fixes build on non-x86 platforms like arm64.

Change-Id: I7ff5df92f89e34c27889d82f35924dc28cde8c39
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 5f22f4ddded8ac41487dab3069ff8d77c3916205)

7 years agogpe: fix sub-interface hash lookup 48/8148/1
Florin Coras [Thu, 17 Aug 2017 22:57:20 +0000 (15:57 -0700)]
gpe: fix sub-interface hash lookup

Change-Id: Ice6b3818ee24c7c248bf61e4d6c1ef2a85cb8fb1
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit af8c8e5d9596b4bb1dc6edc5c3675de5304f6456)

7 years agoIncrease L2FIB MAC learn limit from 1M to 8M entries 32/8132/2
John Lo [Fri, 18 Aug 2017 23:17:52 +0000 (19:17 -0400)]
Increase L2FIB MAC learn limit from 1M to 8M entries

Change-Id: I04589d3613653c402e6628202598972c2fa59d24
Signed-off-by: John Lo <loj@cisco.com>
7 years agoPrevious version was still downloading, unpacking and building IPSEC / AES 14/8114/2
Marco Varlese [Mon, 14 Aug 2017 14:07:00 +0000 (16:07 +0200)]
Previous version was still downloading, unpacking and building IPSEC / AES
libraries.

This patch addresses the misbehaviour.

Change-Id: I41f1ece3ca21c5a8f2c95533ed3d77a535233ea6
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
7 years agodpdk: force libdir for isa-l crypto library 13/8113/3
Sergio Gonzalez Monroy [Mon, 14 Aug 2017 08:26:44 +0000 (09:26 +0100)]
dpdk: force libdir for isa-l crypto library

Depending on the OS, the default libdir might change.

RHEL/Ubuntu:
libdir={exec_prefix}/lib

OpenSUSE:
libdir={exec_prefix}/lib64

Change-Id: I5f1672e5815ad821e6ac5fff95de5232ab735b67
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
7 years agodpdk: prefetch 2nd cacheline of rte_mbuf during tx 61/7561/2
Damjan Marion [Tue, 11 Jul 2017 15:13:37 +0000 (17:13 +0200)]
dpdk: prefetch 2nd cacheline of rte_mbuf during tx

Change-Id: I0db02dd0147dbd47d4296fdb84280d0e7d321f3c
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agodpdk: cleanup unused build option *_uses_dpdk_cryptodev_sw 12/8112/2
Sergio Gonzalez Monroy [Mon, 14 Aug 2017 08:46:19 +0000 (09:46 +0100)]
dpdk: cleanup unused build option *_uses_dpdk_cryptodev_sw

Change-Id: I62939592bd3cb151e02c55a3f1ee6e7d1ce469cb
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
7 years agodpdk: only build SW crypto for x86_64 platforms 11/8111/2
Sergio Gonzalez Monroy [Wed, 19 Jul 2017 15:22:28 +0000 (16:22 +0100)]
dpdk: only build SW crypto for x86_64 platforms

Change-Id: If559747ad59c82c81d15734f27e15548eca0962b
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
7 years agoFix nasm deps for Fedora. 10/8110/2
Thomas F Herbert [Tue, 1 Aug 2017 16:46:41 +0000 (12:46 -0400)]
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>
7 years agoAdded NASM package to support SW crypto 02/8102/3
Marco Varlese [Wed, 2 Aug 2017 12:16:31 +0000 (14:16 +0200)]
Added NASM package to support SW crypto

Change-Id: Idd6614b80e456eb40c760024b563ffd0e5c313ec
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
7 years agodpdk: update build 01/8101/3
Sergio Gonzalez Monroy [Tue, 6 Jun 2017 14:29:16 +0000 (15:29 +0100)]
dpdk: update build

Current optional DPDK PMDs are:
- AESNI MB PMD (SW crypto)
- AESNI GCM PMD (SW crypto)
- MLX4 PMD
- MLX5 PMD

This change will always build DPDK SW crypto PMDs and required SW crypto
libraries, while MLX PMDs are still optional and the user has to build
required libraries.

Now the configure script detects if any of the optional DPDK PMDs were
built and link against their required libraries/dependencies.

Change-Id: I1560bebd71035d6486483f22da90042ec2ce40a1
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
7 years agoacl-plugin: time out the sessions created by main thread too (VPP-948) 66/8066/7
Andrew Yourtchenko [Wed, 16 Aug 2017 10:06:15 +0000 (12:06 +0200)]
acl-plugin: time out the sessions created by main thread too (VPP-948)

In multithread setup the main thread may send packets,
which may pass through the node with permit+reflect action.
This creates the connection in lists for thread0,
however in multithread there are no interupt handlers there.

Ensure we are not spending too much time spinning in a
tight cycle by suspending the main cleaner thread
until the current iteration of interrupts is processed.

Change-Id: Idb7346737757ee9a67b5d3e549bc9ad9aab22e89
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoFix LISP cp buffer leakage 73/7973/3
Florin Coras [Thu, 10 Aug 2017 00:50:09 +0000 (17:50 -0700)]
Fix LISP cp buffer leakage

Change-Id: Id7e0f967cc510f0b45f043f74493854083ac67ae
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoacl-plugin: add the debug CLI to show macip ACLs and where they are applied (VPP... 81/7981/2
Andrew Yourtchenko [Thu, 10 Aug 2017 14:00:20 +0000 (16:00 +0200)]
acl-plugin: add the debug CLI to show macip ACLs and where they are applied (VPP-936)

When looking at resource utilisation, it is useful to understand
the interactions between the acl-plugin and the rest of VPP.
MACIP ACLs till now could only be dumped via API,
which is tricky when debugging. Add the CLIs to see
the MACIP ACLs and where they are applied.

Change-Id: I3211901589e3dcff751697831c1cd0e19dcab1da
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoacl-plugin: match index set to first portrange element if non-first portrange matches... 83/7983/5
Andrew Yourtchenko [Thu, 10 Aug 2017 15:02:58 +0000 (17:02 +0200)]
acl-plugin: match index set to first portrange element if non-first portrange matches on the same hash key (VPP-938)

Multiple portranges that land on the same hash key will always report the match
on the first portrange - even when the subsequent portranges have matched.
Test escape, so make a corresponding test case and fix the code so it passes.

Change-Id: Idbeb8a122252ead2468f5f9dbaf72cf0e8bb78f1
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoacl-plugin: hash lookup bitmask not cleared when ACL is unapplied from interface... 80/7980/3
Andrew Yourtchenko [Thu, 10 Aug 2017 12:19:58 +0000 (14:19 +0200)]
acl-plugin: hash lookup bitmask not cleared when ACL is unapplied from interface (VPP-935)

The logic in hash ACL bitmask update was using the vector
of ACLs applied to the interface to rebuild the hash lookup mask.
However, in transient cases (like doing group manipulation with
hash ACLs), that will not hold true. Thus, make
a local copy of for which ACL indices the hash_acl_apply
was called previously, and maintain that one local
to the hash_lookup.c file logic.

Change-Id: I30187d68febce8bba2ab6ffbb1eee13b5c96a44b
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoacl-plugin: avoid crash in multithreaded setup adding/deleting ACLs with traffic... 41/7941/5
Andrew Yourtchenko [Tue, 8 Aug 2017 18:10:12 +0000 (20:10 +0200)]
acl-plugin: avoid crash in multithreaded setup adding/deleting ACLs with traffic (VPP-910/VPP-929)

The commit fixing the VPP-910 and separating the memory operations
into separate heaps has missed setting the MHEAP_FLAG_THREAD_SAFE,
which quite obviously caused the issues in the multithread setup.
Fix that.

Also, add the debug CLIs
"set acl-plugin heap {main|hash} {validate|trace} {1|0}"
to toggle the memory instrumentation, in case we ever need it
in the future.

Change-Id: I8bd4f7978613f5ea75a030cfb90674dac34ae7bf
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoacl-plugin: all TCP sessions treated as transient (VPP-932) 55/7955/2
Andrew Yourtchenko [Wed, 9 Aug 2017 09:28:02 +0000 (11:28 +0200)]
acl-plugin: all TCP sessions treated as transient (VPP-932)

The packet that was creating the session was not tracked,
consequently the TCP flags seen within the session record
never got the value for the session to get treated as
being in the established state.

Test-escape, so add the TCP tests which test the
three phases of the TCP session life and make them all pass.

Change-Id: Ib048bc30c809a7f03be2de7e8361c2c281270348
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoping: fixing wrong value when there are worker threads 43/7943/1
Mohammed Hawari [Tue, 18 Jul 2017 07:25:01 +0000 (09:25 +0200)]
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>
(cherry picked from commit 03a6213fb5022d37ea92f974a1814db1c70bcbdf)

7 years agoacl-plugin: fix a misplaced return (VPP-910) 31/7931/1
Andrew Yourtchenko [Tue, 8 Aug 2017 11:27:30 +0000 (13:27 +0200)]
acl-plugin: fix a misplaced return (VPP-910)

It was uncaught by make test because the corresponding tests are not there yet - part of 17.10 deliverables

Change-Id: I55456f1874ce5665a06ee411c7abf37cd19ed814
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoacl-plugin: rework the optimization 7383, fortify acl-plugin memory behavior (VPP... 17/7817/26
Andrew Yourtchenko [Thu, 27 Jul 2017 13:39:50 +0000 (15:39 +0200)]
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>
7 years agoacl-plugin: multicore: CSIT c100k 2-core stateful ACL test does not pass (VPP-912) 76/7676/6
Andrew Yourtchenko [Wed, 2 Aug 2017 10:36:07 +0000 (06:36 -0400)]
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>
7 years agoFix interface reuse when running multithreaded 57/7857/1
Damjan Marion [Thu, 27 Jul 2017 08:07:50 +0000 (04:07 -0400)]
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>
(cherry picked from commit c418e4ac7cf36bd64f3130c258d5f1897c245f2b)

7 years agoUse CSIT release branch for verify job 30/7830/1
Jan Gelety [Fri, 28 Jul 2017 07:02:20 +0000 (09:02 +0200)]
Use CSIT release branch for verify job

Change-Id: If68d9cda27941305fe5186c034028684b6079380
Signed-off-by: Jan Gelety <jgelety@cisco.com>
7 years agovhost: debug vhost-user command needs better error checking on the syntax (VPP-916) 12/7712/1
Steven [Fri, 21 Jul 2017 23:38:41 +0000 (16:38 -0700)]
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>
7 years agoacl-plugin: assertion failed at hash_lookup.c:226 when modifying ACLs applied as... 51/7651/2
Andrew Yourtchenko [Wed, 19 Jul 2017 17:23:59 +0000 (13:23 -0400)]
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>
7 years ago17.07 Release Note 50/7650/1 v17.07
Neale Ranns [Wed, 19 Jul 2017 15:01:10 +0000 (08:01 -0700)]
17.07 Release Note

Change-Id: Iffbfffac1c508b000451e9f0e0b688d80785f7f5
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoDHCP complete event sends mask length 40/7440/3
Neale Ranns [Thu, 6 Jul 2017 08:39:05 +0000 (01:39 -0700)]
DHCP complete event sends mask length

Change-Id: I4a529dfab5d0ce6b0bbc0ccbbd89c6b109dbf917
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoL2INPUT:fix features mask cailculation 62/7562/2
Eyal Bari [Tue, 11 Jul 2017 11:24:37 +0000 (14:24 +0300)]
L2INPUT:fix features mask cailculation

Change-Id: I84cea7530b01302a0adeef95b4924f54dc2e41ec
Signed-off-by: Eyal Bari <ebari@cisco.com>
(cherry picked from commit 8af1b2fdecc883eadfec6b91434adc6044e24cb2)

7 years agoFix crash with worker threads on 4K VXLAN/BD setup (VPP-907) 53/7553/2
John Lo [Wed, 12 Jul 2017 23:56:45 +0000 (19:56 -0400)]
Fix crash with worker threads on 4K VXLAN/BD setup (VPP-907)

Cleanup mapping of interface output node for the l2-output node
when interface is configured to L2 or L3 modes. The mapping is
now always done in the main thread as part of API/CLI processing,
instead of initiate mapping in the forwarding path which can be
in the worker threads.

Change-Id: Ia789493e7d9f5c76d68edfaf34db43f3e3f53506
Signed-off-by: John Lo <loj@cisco.com>
7 years agomemif: avoid double buffer free 43/7543/2
Damjan Marion [Tue, 11 Jul 2017 10:05:06 +0000 (12:05 +0200)]
memif: avoid double buffer free

Change-Id: I902f54618c4e1f649af11497c1cb10922e43755a
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agomemif: mask interrupts on startup if we are in the polling mode 42/7542/2
Damjan Marion [Wed, 5 Jul 2017 16:13:10 +0000 (18:13 +0200)]
memif: mask interrupts on startup if we are in the polling mode

Change-Id: Ief02eb1109a1bc463665d9747e9fa4e0c0e3d7e0
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agovlib: fix issues with PCI handling code 41/7541/2
Damjan Marion [Mon, 10 Jul 2017 13:38:21 +0000 (15:38 +0200)]
vlib: fix issues with PCI handling code

- PCI devices not properly discovered
- vlib_pci_bus_master_enable () not working

Change-Id: I7433ab1b19b890b8900635b43037b9a2017a1921
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agodpdk: add FiftyGigabitEtherenet interface support 40/7540/2
Damjan Marion [Wed, 5 Jul 2017 00:04:36 +0000 (02:04 +0200)]
dpdk: add FiftyGigabitEtherenet interface support

Change-Id: Ied8b26179cdf4add34440a9c396cb821716cfb8e
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agovppinfra: revert clib_memcpy optimization 39/7539/1
Damjan Marion [Wed, 5 Jul 2017 16:15:08 +0000 (18:15 +0200)]
vppinfra: revert clib_memcpy optimization

Looks like some compiler versions are producing wrong code when we are
copying 9-16 bytes so reverting back to the original code.

Change-Id: I74b5fa54a3b01f6288648f1cb0926030edd3b26f
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoVPP-895 multi-thread: fix vpp crash on show runtime 06/7406/4
Igor Mikhailov (imichail) [Tue, 4 Jul 2017 00:01:50 +0000 (17:01 -0700)]
VPP-895 multi-thread: fix vpp crash on show runtime

In multi-threaded model (e.g. 1 main and 1 worker threads),
after an ethernet interface is deleted (e.g. vhost-user interface),
'show runtime' command produces garbled output and sometimes
leads to vpp crash.

The reason is because vlib_node_rename() frees and reallocates node's
'n->name' vector, however the change is not propagated into copies
of the node on worker threads.

Change-Id: Ibf22422913b7f2df22f70f3b2fe8dafd34c1dd06
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
7 years agoFix vppctl error messages to handle lack off permissions 09/7509/2
Ed Warnicke [Mon, 10 Jul 2017 19:03:12 +0000 (19:03 +0000)]
Fix vppctl error messages to handle lack off permissions

Change-Id: Ia35edcb14eb8d786065ee4ab394f4f1aa52e1625
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
7 years agolldp packet transmission on a bonded interface 05/7505/2
Steve Shin [Fri, 7 Jul 2017 21:57:46 +0000 (14:57 -0700)]
lldp packet transmission on a bonded interface

LLDP packets are dropped at interface output node if each slave's link
is configured as the LLDP interface. The admin state is configured and
managed by the bonded interface, so slave link's state is down by default.
The checking for the admin state UP should be ignored for the slave link.

Change-Id: I06ca250f42fcb8cc50e0ea3a3817a2c5b56865df
Signed-off-by: Steve Shin <jonshin@cisco.com>
(cherry picked from commit 042a621b90c9f521b546cbbf724bb908e36f3b25)

7 years agoVPP-904: fixes zero length CLI parameters parse 08/7508/1
Alexander Kotov [Mon, 10 Jul 2017 15:23:31 +0000 (18:23 +0300)]
VPP-904: fixes zero length CLI parameters parse

Change-Id: I21fbc9aff2b97a8b3f4cbed202c00b6d84557a6e
Signed-off-by: Alexander Kotov <kot@yandex.ru>
(cherry picked from commit 28160f38488743b8cee0a7bd62b432a9dd8f4bfd)

7 years agoformat: Check for NaN when rendering doubles 97/7497/1
Chris Luke [Sun, 9 Jul 2017 18:30:25 +0000 (14:30 -0400)]
format: Check for NaN when rendering doubles

- The result of 0.0/0.0 was being rendered as a lot of
  zeroes in the integer portion, as in this example:

  DBGvpp# show physmem
  0: 16 objects, 576k of 582k used, 3k free, 0 reclaimed, 2k overhead,
  16380k capacity
       alloc. from small object cache: 0 hits 0 attempts (0.00%) replacements 0
       alloc. from free-list: 0 attempts, 0 hits (0.00%), 0 considered (per-attempt 0.00)
       alloc. from vector-expand: 16
       allocs: 16 73643.06 clocks/call
       frees: 0 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.00 clocks/call

- Add two macros to vppinfra/math.h that use compiler builtins to check
  for NaN and Infinity and then use them in format_float().

Change-Id: Iccc03997e6e33d6b888d1e7e20cd78df0cfd02e8
Signed-off-by: Chris Luke <chrisy@flirble.org>
(cherry picked from commit bb18ee6f1c7c172d30cb0c98153499af571777ee)

7 years agoLLDP: properly parse lldp cmds from startup config 68/7468/2
Klement Sekera [Wed, 28 Jun 2017 11:35:30 +0000 (13:35 +0200)]
LLDP: properly parse lldp cmds from startup config

Change-Id: I0e6c86bd923fcf7cf16f948b9869a5927e6d3745
Signed-off-by: Klement Sekera <ksekera@cisco.com>
(cherry picked from commit 3d62a7f0b9a4b967ad53f5990729acca932f90b4)

7 years agoAdd API support for LLDP config/interface set 69/7469/2
Steve Shin [Sat, 1 Jul 2017 04:16:20 +0000 (04:16 +0000)]
Add API support for LLDP config/interface set

Add API methods to configure LLDP and set interface to enable/disable.
Also add port description TLV for LLDP.

Change-Id: Ib959d488c2ab8a0069f143558871f41fcc43a5d3
Signed-off-by: Steve Shin <jonshin@cisco.com>
(cherry picked from commit 99a0e60eb6f6acd7eabd5a4cb7ded1e0419ccd54)

7 years agoUpdate CSIT tests 170622 -> 170706 78/7478/1
Jan Gelety [Fri, 7 Jul 2017 08:22:27 +0000 (10:22 +0200)]
Update CSIT tests 170622 -> 170706

- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I6bd86ea60f323b524f2de1a2236f1af48184a99f
Signed-off-by: Jan Gelety <jgelety@cisco.com>
7 years agoSend GARP/NA on bonded intf slave up/down if in active-backup mode 44/7444/2
John Lo [Mon, 26 Jun 2017 05:40:20 +0000 (01:40 -0400)]
Send GARP/NA on bonded intf slave up/down if in active-backup mode

If a bonded interface is in active-backup mode and configured with
IPv4 and/or IPv6 addresses, on slave interface link up/down, send
a GARP packet if configured with an IPv4 address and an unsolcited
NA if configured with an IPv6 address. These packets can help with
faster route convergence in the next hop router/switch.

Change-Id: I68ccb11a4a40cda414704fa08ee0171c952befa2
Signed-off-by: John Lo <loj@cisco.com>
(cherry picked from commit 8b81cb43359380e50d3fc216d93ff05894149939)

7 years agoVPP-902: LISP-CP: Wrong size in one_l2_arp_entries_get message. 50/7450/2
Ole Troan [Thu, 6 Jul 2017 12:25:38 +0000 (14:25 +0200)]
VPP-902: LISP-CP: Wrong size in one_l2_arp_entries_get message.

Change-Id: I56bf6b46527f9465d78ed7c08b6e216e50c135ec
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoRemove autosudo from pythonic vppctl 46/7446/1
Ed Warnicke [Thu, 6 Jul 2017 14:43:17 +0000 (07:43 -0700)]
Remove autosudo from pythonic vppctl

Change-Id: Iaea91a95d58678b8b3c56f3fceab76817e0f63ff
Signed-off-by: Ed Warnicke <eaw@cisco.com>
7 years agoBuffer name inconsistently used a cstring/vec (VPP-901) 29/7429/1
Chris Luke [Wed, 5 Jul 2017 16:57:10 +0000 (12:57 -0400)]
Buffer name inconsistently used a cstring/vec (VPP-901)

Spotted in the output of CLI command "show buffers", the name field
sometimes had trailing garbage, the hall sign of a string not being
terminated. In this case it was being inconsistently used as a cstring
or a vec.

- CLI printf needs %v to print the vec srring
- vlib_buffer_create_free_list_helper tried to use
  clib_mem_is_heap_object() to detect a vec object, wheras it should
  use clib_mem_is_vec()

Change-Id: Ib8b242a0c5a18924b8af7e8e1432784eebcf572c
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agoVPP-900: VPP is released under the Apache 2.0 License (ASL 2.0). Update RPM specfile... 23/7423/1 v17.07-rc2
Billy McFall [Wed, 5 Jul 2017 13:33:30 +0000 (09:33 -0400)]
VPP-900: VPP is released under the Apache 2.0 License (ASL 2.0). Update RPM specfile to reflect the proper license.

Change-Id: I9e8d1643ea65afd91a0cd5ad9545248575e32617
Signed-off-by: Billy McFall <bmcfall@redhat.com>
7 years agoRefactor API message handling code 10/7410/1
Klement Sekera [Fri, 9 Jun 2017 04:06:49 +0000 (06:06 +0200)]
Refactor API message handling code

This is preparation for new C API. Moving common stuff to separate
headers reduces dependency issues.

Change-Id: Ie7adb23398de72448e5eba6c1c1da4e1bc678725
Signed-off-by: Klement Sekera <ksekera@cisco.com>
(cherry picked from commit 58eb866b15a45514dc356170f28640d6c9db8034)

7 years agoacl-plugin: fix acl plugin test failing sporadically (VPP-898) 95/7395/2
Andrew Yourtchenko [Mon, 3 Jul 2017 14:25:37 +0000 (16:25 +0200)]
acl-plugin: fix acl plugin test failing sporadically (VPP-898)

The "acl_plugin" tests has one of the tests sporadically fail with the following traceback:

r.reply.decode().rstrip('\x00') UnicodeDecodeError: 'ascii' codec can't decode byte
0xd8 in position 20666: ordinal not in range(128)

This occurs in the newly added "show acl-plugin table" debug CLI.
This CLI has only the numeric outputs, so the conclusion is that it is
the incorrect termination (trailing zero) that might be most probably
causing it. The other acl-plugins show commands also
lack the zero-termination termination, so fix all of them.
The particularity of this command vs. the other acl-plugin debug CLIs
is that the accumulator is freed and allocated multiple times,
this might explain the issue is not seen with them.

Change-Id: I87b5c0d6152fbebcae9c7d0ce97155c1ae6666db
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoSNAT: fix failing test_session_limit_per_user (VPP-896) 83/7383/3
Matus Fabian [Mon, 3 Jul 2017 08:21:38 +0000 (01:21 -0700)]
SNAT: fix failing test_session_limit_per_user (VPP-896)

Change-Id: Idf46a03803125babd9bb880363686359fbcca27d
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agoacl-plugin: VPP-897: applying of large number of ACEs is slow 85/7385/2
Andrew Yourtchenko [Mon, 3 Jul 2017 10:32:44 +0000 (12:32 +0200)]
acl-plugin: VPP-897: applying of large number of ACEs is slow

When applying ACEs, in the new hash-based scheme, for each ACE
the lookup in the hash table is done, and either that ACE is added
to the end of the existing list if there is a match,
or a new list is created if there is no match.

Usually ACEs do not overlap, so this operation is fast, however,
the fragment-permit entries in case of a large number of ACLs
create a huge list which needs to be traversed for every other
ACE being added, slowing down the process dramatically.

The solution is to add an explicit flag to denote the first
element of the chain, and use the "prev" index of that
element to point to the tail element. The "next" field
of the last element is still ~0 and if we touch that
one, we do the linear search to find the first one,
but that is a relatively infrequent operation.

Change-Id: I352a3becd7854cf39aae65f0950afad7d18a70aa
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agodevices: show interface rx-placement displays the wrong information (VPP-894) 72/7372/3
Steven [Fri, 30 Jun 2017 14:15:02 +0000 (07:15 -0700)]
devices: show interface rx-placement displays the wrong information (VPP-894)

show interface rx-placement somtimes displays the wrong interface names.
This happens when there exists subinterfaces in VPP.

The problem is due to the function show_interface_rx_placement_fn is calling
format_vnet_sw_if_index_name with hw_if_index instead of sw_if_index.

VPP has the concept of sw_if_index and hw_if_index. Each serves a different
purpose. When there is no subinterfaces, both hw_if_index and sw_if_index
may happen to have the same value.But don't count on it. When the API calls
for sw_if_index, we must pass the sw_if_index although the hw_if_index has
the same type which the compiler does not catch. Passing hw_if_index for an
API which requires sw_if_index may have an unpredictable result such as
described in the VPP-894 and sometimes it may even crash if the particular
index does not exist.

Change-Id: I76c4834f79b88a1c20684fcba64f14b2da142d77
Signed-off-by: Steven <sluong@cisco.com>
7 years agoVPP-893: handle multiple simultaneous event registrations 70/7370/1
Dave Barach [Fri, 30 Jun 2017 12:46:24 +0000 (08:46 -0400)]
VPP-893: handle multiple simultaneous event registrations

Change-Id: I8cd90820624987dbef848935e2de86fa66a86c17
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoIP4/IP6 FIB: fix crash during interface delete 97/7297/2
Pavel Kotucek [Wed, 14 Jun 2017 11:56:55 +0000 (13:56 +0200)]
IP4/IP6 FIB: fix crash during interface delete

after deleting a sub interface with IP4/IP6 address vpp crash

Change-Id: Ie768ca845b9e2394f61e2a8e9722a80a788746e7
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
(cherry picked from commit 9f5a2b6310ce5c8e59c32ca6f27d8a187b0e4346)

7 years agoVPP debug image with worker threads hit assert on adding IP route with traffic (VPP... 40/7340/1
Neale Ranns [Thu, 29 Jun 2017 07:19:08 +0000 (00:19 -0700)]
VPP debug image with worker threads hit assert on adding IP route with traffic (VPP-892)

When stacking DPOs the VLIB graph is also updated to add the edge between the nodes, if this edge does not yet exist. This addition should be done with the workers stopped.

Change-Id: I327e4d7d26f0b23eb280f17e4619ff2093ff7940
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoL2-LEARN:fix l2fib entry seq num not updated on hit (VPP-888) 13/7313/4
Eyal Bari [Sun, 25 Jun 2017 11:42:33 +0000 (14:42 +0300)]
L2-LEARN:fix l2fib entry seq num not updated on hit (VPP-888)

fixed instability in l2bd_multi_instnce test - sometimes failing with extra
packets captured

it appears l2-learn was not updating hit entries but rather a copy of them.

if the ager did not have a chance to run before the test was running the
learning cycle - entries were not updated with the packet's seq num - causing
packets to flood when hitting the stale seq_num in l2-fwd - hence the extra
packets

fixed handling of filter entries

revert workaround for instability in test

Change-Id: I16d918e6310a5bf40bad5b7335b2140c2867cb71
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoVPP-889: MAP Stats API/CLI crashes when no domains. 18/7318/1
Ole Troan [Mon, 26 Jun 2017 16:12:37 +0000 (18:12 +0200)]
VPP-889: MAP Stats API/CLI crashes when no domains.

Change-Id: Ib7824bfc08cb3c8f20258379e1a1f2c159c4f687
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoAdd Maintainers for Vxlan-gpe feature 06/7306/2
Hongjun Ni [Fri, 23 Jun 2017 09:38:49 +0000 (17:38 +0800)]
Add Maintainers for Vxlan-gpe feature

Change-Id: I3f42e9bbd816a6e2192cc65eeb10a4681cf9e29a
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
(cherry picked from commit fcfa38d68007418d9460533d248adf34aca88ec1)

7 years agoVPP crash on creating vxlan gpe interface. VPP-875 05/7305/1
Hongjun Ni [Thu, 22 Jun 2017 16:18:40 +0000 (00:18 +0800)]
VPP crash on creating vxlan gpe interface. VPP-875

Change-Id: I6b19634ecb03860a7624d9408e09b52e95f47aef
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
(cherry picked from commit 04ffd0ad83b2d87edb669a9d76eee85f5c589564)

7 years ago17.07 change default branch in gitreview 83/7283/1 v17.07-rc1
Neale Ranns [Thu, 22 Jun 2017 19:04:27 +0000 (12:04 -0700)]
17.07 change default branch in gitreview

Change-Id: I7d0a27c4d103dd11561ac7ae4d59592ba77ab899
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoUpdate lisp map record default ttl to 24h 60/7260/2 v17.10-rc0
Florin Coras [Wed, 21 Jun 2017 23:27:01 +0000 (16:27 -0700)]
Update lisp map record default ttl to 24h

Change-Id: Ib8c72f8e08e89357b64f2f69ab70d60d3a7ec506
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoImprove svm fifo and tcp tx path performance (VPP-846) 93/7193/9
Florin Coras [Mon, 19 Jun 2017 16:26:09 +0000 (12:26 -0400)]
Improve svm fifo and tcp tx path performance (VPP-846)

- multiarch on svm fifo
- avoid ip lookup on tx

Change-Id: Iab0d85204a710979417bca1d692cc47877131203
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Barach <dbarach@cisco.com>
7 years agoExport and Install GTP-U API file 97/7197/5
Hongjun Ni [Tue, 20 Jun 2017 15:09:32 +0000 (23:09 +0800)]
Export and Install GTP-U API file

Change-Id: I064d22277a0334c63f3d5072b1584b93e327b331
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
7 years agoacl-plugin: clean up the code enabling/disabling acl-plugin processing on interface 77/7277/2
Andrew Yourtchenko [Thu, 22 Jun 2017 12:51:06 +0000 (14:51 +0200)]
acl-plugin: clean up the code enabling/disabling acl-plugin processing on interface

Multiple subsequent calls to vnet_feature_enable_disable() to enable the feature
cause the feature to be inserted into the processing graph multiple times in a row.
This might be argued to be a bug in that function, but enabling already enabled feature
is suboptimal anyway, so avoid that. The existing tests already catch this issue whenever
the ASSERT() part of this patch was added.

Change-Id: Ia2c06f7dc87bbe05795c2c7b7d19ea06270ce150
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoUpdate CSIT tests 170612 -> 170622 62/7262/2
Jan Gelety [Thu, 22 Jun 2017 06:06:53 +0000 (08:06 +0200)]
Update CSIT tests 170612 -> 170622

- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I5645ebfaa32599797e4edf83b2281270ea4a8376
Signed-off-by: Jan Gelety <jgelety@cisco.com>
7 years agoNAT64: documentation 70/7270/1
Matus Fabian [Thu, 22 Jun 2017 10:03:53 +0000 (03:03 -0700)]
NAT64: documentation

added CLI command documentation
added NAT64 user documentation page

Change-Id: I3df400013800fe16351e02db7762ee3f92b195ff
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agoVNET:explicitly pad l2_classify 52/7252/3
Eyal Bari [Wed, 21 Jun 2017 12:32:13 +0000 (15:32 +0300)]
VNET:explicitly pad l2_classify

Change-Id: I77412aa8c17b45b1533604e7bfe8fe052ed0f80a
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoIntroduce default rx mode for device drivers 49/7249/5
Damjan Marion [Wed, 21 Jun 2017 12:29:44 +0000 (14:29 +0200)]
Introduce default rx mode for device drivers

If interface is down and queues are not configured then we are not able
to change rx-mode. This change introducess default mode which is stored
per interface and applied if driver wants.

Change-Id: I70149c21c1530eafc148d5e4aa03fbee53dec62f
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoacl-plugin: the second and subsequent ACEs incorrect endianness when custom-dump... 25/7225/2
Andrew Yourtchenko [Tue, 20 Jun 2017 11:54:57 +0000 (13:54 +0200)]
acl-plugin: the second and subsequent ACEs incorrect endianness when custom-dump and in VAT (VPP-885)

Add the missing function to convert the entire array of rules in the respective _endian functions,
rather than just the first rule.

Change-Id: Ic057f27ff7ec20150595efca1a48b74e5850f52b
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoacl-plugin: CLI to clear all sessions 42/7242/3
Andrew Yourtchenko [Wed, 21 Jun 2017 09:24:25 +0000 (11:24 +0200)]
acl-plugin: CLI to clear all sessions

It is useful to have the CLI to clear the existing sessions.
There was a work-in-progress CLI but it did not work properly.
Fix it and split into a separate "clear acl-plugin sessions",
and add a unit test into the extended connection-oriented tests.

Change-Id: I55889165ebcee139841fdac88747390903a05394
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoacl-plugin: use ethernet_buffer_header_size() to determine the size of the ethernet... 45/7245/2
Andrew Yourtchenko [Wed, 21 Jun 2017 10:20:39 +0000 (12:20 +0200)]
acl-plugin: use ethernet_buffer_header_size() to determine the size of the ethernet header

When extracting the 5-tuple, use the ethernet_buffer_header_size() so we can correctly
handle the case of subinterfaces, etc.

Change-Id: Ied73fde98d6b313e9eeab2aff4f22daa50a6cbbf
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoacl-plugin: fix coverity issue 170476 59/7259/2
Andrew Yourtchenko [Wed, 21 Jun 2017 17:34:02 +0000 (19:34 +0200)]
acl-plugin: fix coverity issue 170476

Remove the unnecessary variable assignment which coverity detected.

Change-Id: I66ac20a8495400ac59192ddb72f16c95f6b4d03c
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoacl-plugin: fix coverity issue 166801 58/7258/1
Andrew Yourtchenko [Wed, 21 Jun 2017 17:26:59 +0000 (19:26 +0200)]
acl-plugin: fix coverity issue 166801

A typo resulted in a value being overwritten and flagged as unused, fix the typo.

Change-Id: I512ba94321afb80d12c71ebbb0eec42d9fa6f299
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoNAT64: custom prefix 55/7255/2
Matus Fabian [Wed, 21 Jun 2017 13:15:18 +0000 (06:15 -0700)]
NAT64: custom prefix

Change-Id: If397b49861468eed29b964fa64b186f80eb0eceb
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agomemif: minor changes in memif.h 53/7253/3
Damjan Marion [Wed, 21 Jun 2017 12:54:52 +0000 (14:54 +0200)]
memif: minor changes in memif.h

Change-Id: Iff550fd65f6e559b9fdfbbd53ef92d287c18166c
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoAdd option to create clib_socket with group write permissions 44/7244/2
Damjan Marion [Wed, 21 Jun 2017 10:01:37 +0000 (12:01 +0200)]
Add option to create clib_socket with group write permissions

Also allow group write as default for CLI socket connections.

Change-Id: I6af1f277f70581358cd9241bf0f5cb0752fe250f
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoAdd knob to specify effective group id (gid) for VPP process 43/7243/2
Damjan Marion [Wed, 21 Jun 2017 09:57:07 +0000 (11:57 +0200)]
Add knob to specify effective group id (gid) for VPP process

Change-Id: Icf9bd4abda058fb380f1a25d5fe3917ffb38b1c4
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoARP: ignore non-connected routes and non-interface sources when determing if source... 44/7144/5
Neale Ranns [Wed, 14 Jun 2017 13:50:08 +0000 (06:50 -0700)]
ARP: ignore non-connected routes and non-interface sources when determing if source is connected

Change-Id: I39fb0ec44cc322eaa12c0ff0700fc405d3982bfc
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoacl-plugin: fix coverity error 171135 29/7229/2
Andrew Yourtchenko [Tue, 20 Jun 2017 13:13:12 +0000 (15:13 +0200)]
acl-plugin: fix coverity error 171135

The code path which sets the sw_if_index aimed to restrict the output
did not set the flag to trigger that output.

Change-Id: I0a1a3977fdddbce9a276960df43fed745d099ca0
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoacl-plugin: vat: acl_interface_list_dump confusing/incorrect output in case n_input... 27/7227/2
Andrew Yourtchenko [Tue, 20 Jun 2017 12:40:44 +0000 (14:40 +0200)]
acl-plugin: vat: acl_interface_list_dump confusing/incorrect output in case n_input == 0

The logic to print the line " output " is wrong for the case of n_input == 0,
and the applied ACLs are printed as if they were applied on input.
One may still figure out the truth by looking at the n_input value above,
but it is confusing.

Change-Id: I7b4a4d548e569994678dd1e139eb829456548b88
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoL2-VTR: add vtr tests 23/7023/6
Eyal Bari [Tue, 6 Jun 2017 11:18:55 +0000 (14:18 +0300)]
L2-VTR: add vtr tests

re-enable l2 fib flush tests
reorder l2bd multi instance tests - move flags test as last
enabling of uu-flood will now flood when entry is stale

Change-Id: I052663ec3eb4acee5f296fb7525dd535924e0003
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agovlib: make runtime_data handling thread-local 71/7171/7
Igor Mikhailov (imichail) [Fri, 16 Jun 2017 03:47:48 +0000 (20:47 -0700)]
vlib: make runtime_data handling thread-local

Change-Id: Ic2f2dc234199a5f882846880cbacff20fc8d477b
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
7 years agoParenthesize the usage of the macro argument within vec_search() macro definition 17/7217/2
Andrew Yourtchenko [Tue, 20 Jun 2017 10:26:23 +0000 (12:26 +0200)]
Parenthesize the usage of the macro argument within vec_search() macro definition

Change-Id: I488d7c2b864c0e3661c8abf0363e4b97984d4974
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoSNAT: unknow protocol hairpinning fix 00/7200/2
Matus Fabian [Tue, 20 Jun 2017 08:45:49 +0000 (01:45 -0700)]
SNAT: unknow protocol hairpinning fix

Change-Id: I15813167e7c8529f229143de4a8f64f0fb530951
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agoVPP-879 MAP: s/u32 is_add/u8 is_add in map.api 38/7138/3
Ole Troan [Wed, 14 Jun 2017 11:12:33 +0000 (13:12 +0200)]
VPP-879 MAP: s/u32 is_add/u8 is_add in map.api

Change-Id: If35171005e409f77bed4cc16eccb66a85aae5dfb
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoL2FWD:fix seq_num overwritten + validate l2fib entries when forwarding 36/7136/6
Eyal Bari [Wed, 14 Jun 2017 10:11:20 +0000 (13:11 +0300)]
L2FWD:fix seq_num overwritten + validate l2fib entries when forwarding

l2_classify memeber table_index was overlaid over l2.l2fib_seq_num
which over written when table_index gets initialized in l2_input_classify

solved by overlaying both table_index and opaque_index as only one is used

seperated l2fib seq num from l2_input configs
for better handling of theoretical ABA issue where an entry for a deleted
interface is considered valid by the ager because a different interface with
same sw_if_index and seq_num was created before the ager got a chance to delete

Change-Id: I7b0eeded971627406f1c80834d7e02c0ebe62136
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoNAT64: change not supported multi threading behaviour 88/7188/2
Matus Fabian [Mon, 19 Jun 2017 12:28:27 +0000 (05:28 -0700)]
NAT64: change not supported multi threading behaviour

Disable CLI/API commands instead of error message on startup.

Change-Id: I313ed6e2ea009f573afb5e08b0e85ed1f9091dc3
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agomemif: add ip mode 29/7129/7
Damjan Marion [Fri, 16 Jun 2017 20:06:00 +0000 (22:06 +0200)]
memif: add ip mode

In IP mode memif interface is L3 point-to-point interfaces and
we don't pass l2 header. There is no l2 header rewrite operation and
received packets are sent straight to ip4-input / ip6-input nodes.

Change-Id: I4177f3fce3004da7ecf14d235006ae053fcf3f09
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoOverall tcp performance improvements (VPP-846) 93/7093/19
Florin Coras [Sat, 10 Jun 2017 04:07:32 +0000 (21:07 -0700)]
Overall tcp performance improvements (VPP-846)

- limit minimum rto per connection
- cleanup sack scoreboard
- switched svm fifo out-of-order data handling from absolute offsets to
  relative offsets.
- improve cwnd handling when using sacks
- add cc event debug stats
- improved uri tcp test client/server:  bugfixes and added half-duplex mode
- expanded builtin client/server
- updated uri socket client/server code to work in half-duplex
- ensure session node unsets fifo event for empty fifo
- fix session detach

Change-Id: Ia446972340e32a65e0694ee2844355167d0c170d
Signed-off-by: Florin Coras <fcoras@cisco.com>