vpp.git
7 years agoacl-plugin: cleaner node bugfixes (VPP-675) 50/5950/2
Andrew Yourtchenko [Wed, 29 Mar 2017 14:47:10 +0000 (16:47 +0200)]
acl-plugin: cleaner node bugfixes (VPP-675)

- use the counters in a private struct rather than node error counters
- ensure the timer for the non-idle connections is restarted
- fix the deletion of conn at the current tail the list

Change-Id: I632f63574d2ced95fb75c5e7fb588c78fb3cce1c
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 097051a3bd1f63a177c0728f15375afd84a68918)

7 years agovppinfra: add spinlock inline functions 75/5875/6
Damjan Marion [Mon, 27 Mar 2017 15:08:20 +0000 (17:08 +0200)]
vppinfra: add spinlock inline functions

Change-Id: I86089e9bb604adfc260a111685001be1c897ce53
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoSR replicate mheap corruption fix VPP-672 13/5913/2
shwethab [Wed, 29 Mar 2017 11:36:37 +0000 (11:36 +0000)]
SR replicate mheap corruption fix VPP-672

Change-Id: If1c68fc63fa71fab198f2bf4f79bdd7a9841c2e8
Signed-off-by: shwethab <shwetha.bhandari@gmail.com>
Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
7 years agoVPP-673 Fix L2 steering. 15/5915/2
Pablo Camarillo [Wed, 29 Mar 2017 14:54:40 +0000 (07:54 -0700)]
VPP-673 Fix L2 steering.

Change-Id: I1eab03525f234139ceefbc9b9895a35a03a56910
Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
7 years agoVPP-669: ping: fix coverity check error 165075 + add ping testcase 56/5856/7
Andrew Yourtchenko [Fri, 24 Mar 2017 16:46:42 +0000 (17:46 +0100)]
VPP-669: ping: fix coverity check error 165075 + add ping testcase

Fix the bug and add the unit test to start with ping test coverage

Change-Id: Ibeacbed1f1660e677faa2dbb2ebe386216693e96
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoClean up more Debian packaging symbol warnings 31/5931/2
Dave Barach [Wed, 29 Mar 2017 20:59:02 +0000 (16:59 -0400)]
Clean up more Debian packaging symbol warnings

Change-Id: I6081a38af3817f0957a2faf0e3e41afa4a74f3a4
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoBRIDGE-DOMAIN:enable arp term,mac/ip learning on local ints 34/5934/2
Eyal Bari [Thu, 30 Mar 2017 00:05:06 +0000 (03:05 +0300)]
BRIDGE-DOMAIN:enable arp term,mac/ip learning on local ints

we should not suppress arps on remote interface instead we should  flood them to the local one
used shg != 0 to identify packets from remote interfaces and disable arp term l2 input feature for them

Change-Id: I701537c05df7451a25ccb5bfc9e2b03ea70cff20
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoIP lookup: remove used stack variables 25/5925/2
Neale Ranns [Wed, 22 Mar 2017 20:27:53 +0000 (13:27 -0700)]
IP lookup: remove used stack variables

Change-Id: I19b16d3e04a187ffe736fae868941957c70edf62
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoFix for dependency problem with Fedora 25 22/5922/2
Thomas F Herbert [Wed, 29 Mar 2017 14:40:16 +0000 (10:40 -0400)]
Fix for dependency problem with Fedora 25

Change-Id: I0e86f8eb6d62c6a109876b5bf35cc62ab617608e
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
7 years agoLISP: fix IID in decap 05/5905/3
Filip Tehlar [Wed, 29 Mar 2017 07:39:23 +0000 (09:39 +0200)]
LISP: fix IID in decap

Change-Id: I3f67d32d5d76069a27176deef6cba0c1a194b7ec
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoCoverity Error: logically dead code in IP unnumbered CLI 23/5923/2
Neale Ranns [Wed, 29 Mar 2017 16:34:10 +0000 (09:34 -0700)]
Coverity Error: logically dead code in IP unnumbered CLI

Change-Id: Id3398bd4b7a56c168aaab37942b92715e19d4025
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoRemove spurious client linkages against libvlib.so 18/5918/2
Dave Barach [Wed, 29 Mar 2017 15:17:45 +0000 (11:17 -0400)]
Remove spurious client linkages against libvlib.so

Change-Id: Ie77c8d57d0b0a153742d55ff0a8a9d72791d8b20
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoVXLAN:validate mcast encapsulation ip/mac 34/5834/4
Eyal Bari [Thu, 23 Mar 2017 07:53:51 +0000 (09:53 +0200)]
VXLAN:validate mcast encapsulation ip/mac

Change-Id: I399257e372f83f4d12dc7873617980af6e46a9bc
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoMAP - add the domain struct directly into the dat-path and avoid the indirectiob... 08/5708/5
Neale Ranns [Tue, 21 Feb 2017 04:29:41 +0000 (20:29 -0800)]
MAP - add the domain struct directly into the dat-path and avoid the indirectiob throught the map-DPO

Change-Id: Ifb72a1c1258440fdc4845aca8aecf2abd63526b1
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoMtrie optimisations 46/5846/5
Neale Ranns [Thu, 23 Mar 2017 13:46:01 +0000 (06:46 -0700)]
Mtrie optimisations

1 - make the default route non-special, i.e. like any other less specific route. Consequently, all buckets have a valid valid index of either a leaf or a ply. Checks for special indeices in the data-path can thus be removed.
2 - since all leaves are now 'real' i.e. they represent a real load-balance object, to tell if a ply slot is 'empty' requeirs chekcing that the prefix length of the leaf occupying the slot is slot than the minium value for that ply.
3 - when removing a leaf find the cover first, then recurse down the ply and replace the old leaf with the cover. This saves us a ply walk.

Change-Id: Idd523019e8bb1b6ef527b1f5279a5e24bcf18332
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoSub-net broadcast addresses for IPv4 95/5895/2
Neale Ranns [Sun, 26 Mar 2017 17:56:33 +0000 (10:56 -0700)]
Sub-net broadcast addresses for IPv4

Change-Id: Ib2189d01e8bc61de57404159690fb70f89c47277
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agodpdk: fix --with-dpdk-mlx5-pmd link issue 07/5907/3
Damjan Marion [Wed, 29 Mar 2017 08:50:43 +0000 (10:50 +0200)]
dpdk: fix --with-dpdk-mlx5-pmd link issue

Change-Id: I8edb927289c080929380bfbf2b760749b7984d4b
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agovhost: vhost-user component may become unusable with too many open files (VPP-668) 31/5831/4
Steven [Wed, 22 Mar 2017 19:05:19 +0000 (12:05 -0700)]
vhost: vhost-user component may become unusable with too many open files (VPP-668)

When the number of open files is reached in the system, vhost may
encounter a failure in socket call and return from vhost-user-process.
The return terminates all attempts of incoming socket connections
in the future, even if the condition is reconciled.

The fix is to not return from vhost-user-process, record the error in
the interface, spit out the error, and retry the connection every 3 seconds.

Change-Id: I806baedf13e8c9b73e7c7820c094240f39949950
Signed-off-by: Steven <sluong@cisco.com>
7 years agoBugfixing and documentation for SRv6 00/5900/2
Pablo Camarillo [Thu, 16 Mar 2017 09:43:05 +0000 (10:43 +0100)]
Bugfixing and documentation for SRv6

- Fixed three coverity issues
- Linked SRv6 docs
- Moved sample plugin to examples folder
- Fixed bug with hash. Now everything is using mhash. Potentially in the future we want to do bihash.

Change-Id: Ie03a13c8fecb1e315e67d0596cbd23220779aaf2
Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
7 years agoUnscrew builtin client 98/5898/5
Dave Barach [Tue, 28 Mar 2017 16:31:33 +0000 (12:31 -0400)]
Unscrew builtin client

"test tcp client bytes 750000" deadlocks w/ Pr={1.0}

Change-Id: Ifa56b0de7812b9f27aa5bce2874b740c46ab30bd
Signed-off-by: Dave Barach <dbarach@cisco.com>
7 years agoNAT: Test refactoring to avoid redundant code for verification and creating packet... 69/5869/3
Martin Gálik [Mon, 27 Mar 2017 13:02:47 +0000 (06:02 -0700)]
NAT: Test refactoring to avoid redundant code for verification and creating packet streams in additional test cases

Change-Id: I2265f8acfa63a7ea920a7cb981819a14806a3d58
Signed-off-by: Martin Gálik <magalik@cisco.com>
7 years agovlib: inline dispatch_node(...) (again) 92/5892/2
Damjan Marion [Tue, 28 Mar 2017 13:11:20 +0000 (15:11 +0200)]
vlib: inline dispatch_node(...) (again)

Worker main loop is now shared code with main thread
main loop so no need to export functions anymore.

Change-Id: I99ee2eee981c1b88ca31d20eabeb6c21d030a34d
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoComment out dpdk section in startup.conf 37/5837/2
Damjan Marion [Thu, 23 Mar 2017 09:48:47 +0000 (10:48 +0100)]
Comment out dpdk section in startup.conf

It is empty anyway and it is causing problems if dpdk plugin is not
loaded.

Change-Id: I7b49afec39c78cbaf0c57b50621fb3e6848e3469
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoaf_packet driver needs to check VLIB_BUFFER_NEXT_PRESENT flag is set 78/5878/2
Jim Gibson [Mon, 27 Mar 2017 19:46:12 +0000 (19:46 +0000)]
af_packet driver needs to check VLIB_BUFFER_NEXT_PRESENT flag is set
when walking  vlib_buffer_t next_buffer chain on transmit.
On buffer allocation:
- next_buffer is not and may contain a stale invalid value that
  should be ignored if not overwritten by a valid value.
- VLIB_BUFFER_NEXT_PRESENT flag is cleared and only set
  if a valid value is written to next_buffer.

Change-Id: I9b0ccdc54f4f7456f8328ce7c4a0d52d0fba8caa
Signed-off-by: Jim Gibson <gibson+fdio@cisco.com>
7 years agoImplement MAC Flush for BD or Interface from the L2FIB 79/5879/2
John Lo [Sat, 25 Mar 2017 00:11:15 +0000 (20:11 -0400)]
Implement MAC Flush for BD or Interface from the L2FIB

Allow non-static MACs in the L2FIB which is associated with an
interface or a bridge domain (BD) be flushed. MAC flush are
initiated automatically when an interface is removed from a BD
or when a BD is deleted. MAC flush can also be invoked manually
via the following CLI:
 l2fib mac-flush interface <if-name>
 l2fib mac-flush bridge-domain <bd-id>

Change-Id: Ie33243622834810a765f48ebcd22bdb8e8fc87a4
Signed-off-by: John Lo <loj@cisco.com>
7 years agoTCP/session improvements 44/5744/19
Florin Coras [Mon, 13 Mar 2017 10:49:51 +0000 (03:49 -0700)]
TCP/session improvements

- Added svm fifo flag for tracking fifo dequeue events (replaces event
  length). Updated all code to switch to the new scheme.
- More session debugging
- Fix peek index wrap
- Add a trivial socket test client
- Fast retransmit/cc fixes
- tx and rx SACK fixes and unit testing
- SRTT computation fix
- remove dupack/ack burst filters
- improve ack rx
- improved segment rx
- builtin client test code

Change-Id: Ic4eb2d5ca446eb2260ccd3ccbcdaa73c64e7f4e1
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Barach <dbarach@cisco.com>
7 years agoFix output feature processing (VPP-670) 76/5876/2
AkshayaNadahalli [Mon, 27 Mar 2017 17:21:05 +0000 (17:21 +0000)]
Fix output feature processing (VPP-670)

Addressed comments.

Change-Id: Ic7d863ea4126f5046986b661db45d26bcce2068f
Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
7 years agoPython API: Fixup of debian package after cFFI changes. 99/5799/6
Ole Troan [Mon, 20 Mar 2017 20:38:37 +0000 (21:38 +0100)]
Python API: Fixup of debian package after cFFI changes.

Change-Id: I4c2a1a818f28d4c6cf52af45f3b7dbfa41d77ccb
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agomake test: properly propagate exit status 49/5849/4
Klement Sekera [Fri, 24 Mar 2017 03:29:06 +0000 (04:29 +0100)]
make test: properly propagate exit status

Change-Id: Ie9f48a0d5e0a9cd08eb8f07d49149eee40f04131
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoMcast rewrite no memcpy 53/5753/3
Neale Ranns [Wed, 15 Mar 2017 11:22:25 +0000 (04:22 -0700)]
Mcast rewrite no memcpy

use a 32bit mask in the adjacency to AND with the IP address and OR into the rewrite.

Change-Id: I80b0f246c18fd74f3e43c5d49e25833412f34665
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoCheck for missing deps on bootstrap target for Centos and Fedora. 98/5798/3
Thomas F Herbert [Mon, 20 Mar 2017 23:19:51 +0000 (19:19 -0400)]
Check for missing deps on  bootstrap target for Centos and Fedora.

Change-Id: I823a066417fb6205d1e6b0fdf1de17b054f6d312
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
7 years agoFix output feature processing (VPP-670) 66/5866/4
AkshayaNadahalli [Mon, 27 Mar 2017 09:17:41 +0000 (14:47 +0530)]
Fix output feature processing (VPP-670)

Change-Id: Ia9bab28fb5341712a7d984bb343074ca22d05aab
Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
7 years agoPython-API: debian packaging now depends on python-all (for pybuild) 60/5860/2
Ole Troan [Sat, 25 Mar 2017 18:25:05 +0000 (19:25 +0100)]
Python-API: debian packaging now depends on python-all (for pybuild)

Change-Id: I6b1dd6bdf03fa506c4b114d15800d9fe03e36395
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoRename "show interfaces" -> "show interface" 61/5861/1
Dave Barach [Sun, 26 Mar 2017 23:36:18 +0000 (19:36 -0400)]
Rename "show interfaces" -> "show interface"

To line up with "show interface placement," recently added. Otherwise,
"show int" refers only to "show interface placement," which tends to
annoy the cash customers...

Change-Id: Iea9e3681aeb051e2b0e1ecbf06706d98af9a3abf
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agog2, c2cpel, and cpeldump: scale to 8M event log files 59/5859/1
Dave Barach [Sat, 25 Mar 2017 12:20:22 +0000 (08:20 -0400)]
g2, c2cpel, and cpeldump: scale to 8M event log files

Change-Id: I7d7748c9c44132d033a9aff1687112ffcb44c460
Signed-off-by: Dave Barach <dbarach@cisco.com>
7 years agomake test: fix broken plugin paths 50/5850/2
Klement Sekera [Fri, 24 Mar 2017 04:47:15 +0000 (05:47 +0100)]
make test: fix broken plugin paths

Change-Id: I25a6882ec503fc5bb3694411fbdc2eb1f1e1fafc
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoUpdate master revision to 17.07 33/5833/1 v17.07-rc0
Ole Troan [Wed, 22 Mar 2017 20:33:10 +0000 (21:33 +0100)]
Update master revision to 17.07

Change-Id: Ieb0a5e70bc3db951e577e6ef52a4adaac9b42271
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoAdd memif - packet memory interface for intra-host communication 04/5004/18
Damjan Marion [Wed, 22 Mar 2017 09:18:13 +0000 (10:18 +0100)]
Add memif - packet memory interface for intra-host communication

Change-Id: I94c06b07a39f07ceba87bf3e7fcfc70e43231e8a
Signed-off-by: Damjan Marion <damarion@cisco.com>
Co-Authored-By: Milan Lenco <Milan.Lenco@pantheon.tech>
7 years agoUpdate MAC address kept for Bonded Interface and its Slaves 29/5829/1
John Lo [Wed, 22 Mar 2017 17:27:27 +0000 (13:27 -0400)]
Update MAC address kept for Bonded Interface and its Slaves

Change-Id: I9f7f9f840c3c1aad5e8c9a4fa1ba7a58a85cfd9e
Signed-off-by: John Lo <loj@cisco.com>
7 years agoLISP: improve DP speed 26/5826/2
Filip Tehlar [Wed, 22 Mar 2017 08:02:33 +0000 (09:02 +0100)]
LISP: improve DP speed

Change-Id: I5bd0721b70dfc240fa9225df3704774f6b0ede81
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agovlib: add description field in plugin registration 24/5824/2
Damjan Marion [Wed, 22 Mar 2017 10:08:39 +0000 (11:08 +0100)]
vlib: add description field in plugin registration

Change-Id: I88b322a5d602f3d6d3310e971479180a89430e0e
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoping: allow the user to send bursts of N packets instead of single packet 22/5822/2
Andrew Yourtchenko [Wed, 22 Mar 2017 09:51:14 +0000 (10:51 +0100)]
ping: allow the user to send bursts of N packets instead of single packet

Change-Id: I3c1d3a2db56487473123e6fec2b076a063473313
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agomake test: run all tests in test-cov target 16/5816/2
Klement Sekera [Tue, 21 Mar 2017 07:27:18 +0000 (08:27 +0100)]
make test: run all tests in test-cov target

Change-Id: I7040c1ecc8b6e5e883420c1c81aa8b70e56263e5
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agomake test: support out-of-tree plugins 13/5813/2
Klement Sekera [Tue, 21 Mar 2017 07:21:25 +0000 (08:21 +0100)]
make test: support out-of-tree plugins

usage:

env EXTERN_PLUGINS=/path/to/plugins make test

Change-Id: I8eece726dfafeff1cffd921c1e18cd3eb7eb64ed
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agomake test: support out-of-tree tests 74/5774/3
Klement Sekera [Thu, 16 Mar 2017 08:14:59 +0000 (09:14 +0100)]
make test: support out-of-tree tests

env EXTERN_TESTS="/path/to/extra/tests" make test

causes to run the default test set and tests collected from
test_*.py files under subtree specified in EXTERN_TESTS.

Change-Id: I58c5471dd6010730278a5b47d4318737d920bc28
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agodpdk: fix plugin linking with sw crypto libraries 50/5650/4
Sergio Gonzalez Monroy [Tue, 7 Mar 2017 14:39:29 +0000 (14:39 +0000)]
dpdk: fix plugin linking with sw crypto libraries

Change-Id: I3e3bf786ab3c7672ff2cc7acd221421072e3ac8b
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
7 years agovhost: support interrupt mode 64/5764/6
Steven [Thu, 16 Mar 2017 04:18:55 +0000 (21:18 -0700)]
vhost: support interrupt mode

vhost currently supports only polling mode. This patch is to add
interrupt mode. When the interface is configured for interrupt
mode, our input node does not get called unless there is a packet
in the vring.

If a particular CPU has one interface configured for polling mode
and another in interrupt, the input node is set to polling for
that CPU.

This diffs also includes two crashes in vlib's dispatch_node. One is
included in https://gerrit.fd.io/r/#/c/5516. The other crash is in
the ASSERT. The ASSERT can become true when the caller of
dispatch_node is in a loop. The first call converted the node
to polling. The second call thereafter will hit the ASSERT.

Change-Id: If17b6d48b20d7d8605c6a161459828637173cd32
Signed-off-by: Steven <sluong@cisco.com>
7 years agoSNAT: added actual delete to snat_det_map 40/5740/5
Martin [Tue, 14 Mar 2017 09:25:45 +0000 (02:25 -0700)]
SNAT: added actual delete to snat_det_map

Change-Id: I8187b43129b80fadd90ea493afb922064f79abbe
Signed-off-by: Martin <magalik@cisco.com>
7 years agopolicer: fix byte ordering in policer_details msg 07/5807/3
Marek Gradzki [Tue, 21 Mar 2017 10:51:54 +0000 (11:51 +0100)]
policer: fix byte ordering in policer_details msg

Change-Id: Id53131e8cd32bfd35739a7bd7cdbadf3a9f4d941
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoInitial draft of VPP changes to cleanup iOAM export. 03/5803/4
Vengada [Tue, 21 Mar 2017 08:04:46 +0000 (01:04 -0700)]
Initial draft of VPP changes to cleanup iOAM export.
This is needed for iOAM export for NSH.

Change-Id: I702934b2cde8b1c07ec5c299d5fcd98dce94c62c
Signed-off-by: Vengada <venggovi@cisco.com>
7 years agoACL plugin 1.2 05/5805/7
Andrew Yourtchenko [Tue, 21 Mar 2017 09:31:55 +0000 (10:31 +0100)]
ACL plugin 1.2

L3 path support, L2+L3 unified processing node, skip IPv6 EH support.

Change-Id: Iac37a466ba1c035e5c2997b03c0743bfec5c9a08
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoLISP statistics 35/5735/6
Filip Tehlar [Thu, 9 Mar 2017 15:48:39 +0000 (16:48 +0100)]
LISP statistics

Change-Id: I399cac46d279e020ba33459ef759d9d29d3ac716
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoarmv8 - fix os_cpu_clock_frequency for armv8 96/5796/2
Gabriel Ganne [Mon, 20 Mar 2017 14:13:02 +0000 (15:13 +0100)]
armv8 - fix os_cpu_clock_frequency for armv8

System timer of ARMv8 runs at a different frequency than the CPU's.
The frequency is fixed, typically in the range 1-50MHz.  It can be
read at CNTFRQ special register.

Change-Id: I6a21a6a9e2df783559df0caec63d5525c2258227
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
7 years agovnet: add device-input threadplacement infra 87/5787/3
Damjan Marion [Mon, 20 Mar 2017 15:34:15 +0000 (16:34 +0100)]
vnet: add device-input threadplacement infra

This change adds two new debug CLI command:

- "show interface placmenet" to display which
thread (main or worker) is responsible for processing
interface rx queue

vpp# show interface placement
Thread 0 (vpp_main):
  node af-packet-input:
    host-vpp1 queue 0
Thread 1 (vpp_wk_0):
  node af-packet-input:
    host-virbr0 queue 0
Thread 2 (vpp_wk_1):
  node af-packet-input:
    host-vpp2 queue 0
    host-lxcbr0 queue 0

- "set interface placmenet" to assign thread (main or worker)
which process specific interface rx queue

vpp# set interface placement host-vpp1 queue 0 main

Change-Id: Id4dd00cf2b05e10fae2125ac7cb4411b446c5e9c
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoFix bonded interface name to use instance number starting from 0 88/5788/3
John Lo [Fri, 17 Mar 2017 22:05:35 +0000 (18:05 -0400)]
Fix bonded interface name to use instance number starting from 0

With DPDK 17.02, bonded interface device_index does not start
from 0 and may vary depends on the existence of other interfaces.
Implement instance number for bonded interface so the interface
name can make use of instance number starting from 0.

Change-Id: Ia8eb7bd530446faa02ee7c7d1f6abdc22ac60b62
Signed-off-by: John Lo <loj@cisco.com>
7 years agoCheck change in unnumbered setting before updating IP enabled state 90/5790/1
Neale Ranns [Sat, 18 Mar 2017 09:57:38 +0000 (02:57 -0700)]
Check change in unnumbered setting before updating IP enabled state

Change-Id: I6424a083ec889961ba4d0cd1df8348f20436be14
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agofeatures: remove remaining .end_node 89/5789/1
Damjan Marion [Fri, 17 Mar 2017 22:58:32 +0000 (23:58 +0100)]
features: remove remaining .end_node

Change-Id: If882adb9c937f57223c524ed87453f3053f616ed
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoPNEUM: Fix Coverity error (missing unlock). 94/5694/4
Ole Troan [Thu, 9 Mar 2017 20:10:45 +0000 (21:10 +0100)]
PNEUM: Fix Coverity error (missing unlock).

Change-Id: I53433e89d06fbc95e160887517acafc1544e81b5
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoFix bonded ethernet PMD name for DPDK 17.02 86/5786/2
Alexander Popovsky (apopovsk) [Fri, 17 Mar 2017 19:08:16 +0000 (12:08 -0700)]
Fix bonded ethernet PMD name for DPDK 17.02

In DPDK 17.02 bonded PMD name is changed from rte_bond_pmd
to net_bonding.

Change-Id: I1a57a16b0ae68b5fa56a561a4f75981112228572
Signed-off-by: Alexander Popovsky (apopovsk) <apopovsk@cisco.com>
7 years ago64 bit per-thread counters 62/5762/5
Neale Ranns [Wed, 15 Mar 2017 19:41:17 +0000 (15:41 -0400)]
64 bit per-thread counters

after:
TenGigabitEthernet5/0/1-output   active             107522        17375708               0          7.22e0          161.60
TenGigabitEthernet5/0/1-tx       active             107522        17375708               0          6.93e1          161.60
ip4-input-no-checksum            active             107522        17375708               0          2.52e1          161.60
ip4-lookup                       active             107522        17375708               0          3.10e1          161.60
ip4-rewrite                      active             107522        17375708               0          2.52e1          161.60

before
TenGigabitEthernet5/0/1-output   active             433575       110995200               0          6.95e0          256.00
TenGigabitEthernet5/0/1-tx       active             433575       110995200               0          7.14e1          256.00
ip4-input-no-checksum            active             433575       110995200               0          2.66e1          256.00
ip4-lookup                       active             433575       110995200               0          3.29e1          256.00
ip4-rewrite                      active             433575       110995200               0          2.59e1          256.00

Change-Id: I46405bd22189f48a39f06e3443bb7e13f410b539
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoFix IP feature ordering. 79/5779/4
Neale Ranns [Thu, 16 Mar 2017 19:49:09 +0000 (15:49 -0400)]
Fix IP feature ordering.

Drop comes before lookup when enabled. is_first_or_last is not required when setting a feature, the anchor is added in find_config_with_features().
Don't make the PG interfaces automatically L3 enabled, this way we can have tests that check the L3 protocol disbaled behaviour.

Change-Id: Icef22a920b27ff9cec6ab2da6b05f05c532cb60f
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoMPLS performance improvments. 75/5775/4
Neale Ranns [Thu, 16 Mar 2017 11:34:55 +0000 (07:34 -0400)]
MPLS performance improvments.

 1 - Quad loop lookup and label imposition.
 2 - optimise imposition for the 1 label case
 3 - input gets TTL from header directly (no byte swap)

Change-Id: I59204c9e5d134b0df75d7afa43e360f946d1ffe7
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoAttached hosts 20/5720/6
Neale Ranns [Sat, 11 Mar 2017 13:55:21 +0000 (05:55 -0800)]
Attached hosts

allow this config to function:
  set int ip address loop0 169.254.1.1/32  (the default GW address for attached hosts)
  set int unnumbered af_packet0 use loop0  ('enable' IP on the host interface)
  ip route add 192.168.1.1/32 via af_packet0 (where to find the host)
repeat for each host and host interface.
Inter-host communication is throught the /32 routes.
To allow this:
 1 - attached host routes have the ATTACHED flag set, so the ARP code accepts then as legitimate sources
 2 - unnumbered interfaces inherit the source address from the IP interface

Change-Id: Ib66c5f0e848c528f79372813adc3a0c11b50717f
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoPython API: Fix RPM packaging (again). 83/5783/2
Ole Troan [Fri, 17 Mar 2017 08:54:51 +0000 (09:54 +0100)]
Python API: Fix RPM packaging (again).

Change-Id: I5c510cde1227a131ddda58d090cd5dbf112ce1fb
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agovlib: fix potential crash in dispatch_node ELOG_DATA call 16/5516/2
Steven [Fri, 24 Feb 2017 18:03:22 +0000 (10:03 -0800)]
vlib: fix potential crash in dispatch_node ELOG_DATA call

dispatch_node may be invoked from vlib main or worker threads. The call to
ELOG_DATA in dispatch_node passes the parameter &vm->elog_main. It works fine
when dispatch_node is invoked from the main thread. It does bad thing when it
is invoked from the worker thread.

While we are at it, make two additional enhancements to the same area.
1. Use ELOG_TRACK_DATA instead of ELOG_DATA to enhance g2 viewer presentation.
2. Since ELOG_DATA is in the data path, it could get very chatty. Make the call
to ELOG_TRACK_DATA conditional compile.

Change-Id: I80ca0eea10bc1e5d0d5549f9844dd9a34dbb65a2
Signed-off-by: Steven <sluong@cisco.com>
7 years agoCache a 'has-features' flag on the adjacency for faster access. Reclaim the node_inde... 61/5761/4
Neale Ranns [Wed, 15 Mar 2017 16:34:25 +0000 (12:34 -0400)]
Cache a 'has-features' flag on the adjacency for faster access. Reclaim the node_index memeber from the rewrite for space - this is only used for formtting

before:
  ip4-rewrite * * * *  2.66e1  256.00
after:
  ip4-rewrite * * * *  2.40e1  256.00

Change-Id: Ic397150727cad38811564777419ad6bd26b8a3a6
Signed-off-by: Neale Ranns <nranns@wasa-ucs-11.cisco.com>
7 years agoUse the feature anchor in the MPLS input arc - it performs much better 80/5780/2
Neale Ranns [Thu, 16 Mar 2017 20:12:57 +0000 (16:12 -0400)]
Use the feature anchor in the MPLS input arc - it performs much better

Change-Id: I3d64ddb248478accd4d9b3124f018c9aab63a60f
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoAdjacency refinement; check the cover's interface against the adjacency's 16/5716/2
Neale Ranns [Fri, 10 Mar 2017 19:53:27 +0000 (11:53 -0800)]
Adjacency refinement; check the cover's interface against the adjacency's

Change-Id: I3fa2f35056b74e479288bb956f2713f727a81c72
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoAdd epel-rpm-macros for CentOS/RHEL install-dep 81/5781/1
Alexander Popovsky (apopovsk) [Fri, 17 Mar 2017 01:21:14 +0000 (18:21 -0700)]
Add epel-rpm-macros for CentOS/RHEL install-dep

%py2_install is required by vpp-api-python and is not available on
bare CentOS/RHEL install, causing 'fg: no job control' error.
Added 'epel-rpm-macros' to the list of EPEL dependencies

Change-Id: I1e09d7d825d9d8db06e7385d2b8d5579c8ce748b
Signed-off-by: Alexander Popovsky (apopovsk) <apopovsk@cisco.com>
7 years agovlib: additional runtime_data checks 78/5778/2
Damjan Marion [Thu, 16 Mar 2017 16:46:41 +0000 (17:46 +0100)]
vlib: additional runtime_data checks

Change-Id: I9b6ed9741fae89bdefa6f601398eb63a21155069
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoping: Fix coverity error 163907 70/5770/2
Andrew Yourtchenko [Thu, 16 Mar 2017 12:24:24 +0000 (12:24 +0000)]
ping: Fix coverity error 163907

Return an error if the ip6_interface_first_address decides to return NULL.

Change-Id: Iea0184382b8fbe2af81a781c3671687a1fbb5b32
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoAPI:replaced all REPLY_MACRO's with api_helper_macros.h 65/5765/2
Eyal Bari [Thu, 16 Mar 2017 08:02:57 +0000 (10:02 +0200)]
API:replaced all REPLY_MACRO's with api_helper_macros.h

Change-Id: I08ab1fd0abdd1db4aff11a38c9c0134b01368e11
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agovhost: wrong value return for VHOST_USER_VRING_GET_BASE 00/5700/4
Steven [Fri, 10 Mar 2017 07:49:32 +0000 (23:49 -0800)]
vhost: wrong value return for VHOST_USER_VRING_GET_BASE

When the VM is migrated, the driver sends VHOST_USER_VRING_GET_BASE
message to the device to get the vring offset. The device is
supposed to shut down the vring, and return the current vring offset.
What the code did was to shutdown the vring, initialize the vring,
and return 0 to the driver.

The fix is to first store last_avail_idx in the message and then close
the vring.

Change-Id: I432e9f50f36d89fe53a45e050edcf5e1218caf7a
Signed-off-by: Steven <sluong@cisco.com>
7 years agovlib: make runtime_data thread-local 46/5746/9
Damjan Marion [Thu, 16 Mar 2017 10:32:09 +0000 (11:32 +0100)]
vlib: make runtime_data thread-local

Change-Id: I4aa3e7e42fb81211de1aed07dc7befee87a1e18b
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoPython API: Change from cPython to CFFI. 66/5666/14
Ole Troan [Wed, 8 Mar 2017 11:02:24 +0000 (12:02 +0100)]
Python API: Change from cPython to CFFI.

Change-Id: I03e52466fb3f909ae52b8fba601168f3eadbd972
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoNo vector allocation during buffer copy 52/5752/3
Neale Ranns [Wed, 15 Mar 2017 08:28:31 +0000 (01:28 -0700)]
No vector allocation during buffer copy

Change-Id: I7e8556af833ca0e00fadc96dcd2077ff1104541b
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoAPI: define optional base_id for REPLY_MACRO's 54/5754/2
Eyal Bari [Wed, 15 Mar 2017 12:54:19 +0000 (14:54 +0200)]
API: define optional base_id for REPLY_MACRO's

this enables sharing the api_helper_macros.h implementation

Change-Id: Ie3fc89f3b4b5a47fcfd4b5776db90e249c55dbc3
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoFix binary-api cmd/arg split logic 55/5755/1
Dave Barach [Wed, 15 Mar 2017 13:52:19 +0000 (09:52 -0400)]
Fix binary-api cmd/arg split logic

Change-Id: If3dbce830684b5eab8944519424074b03cc7d703
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoVXLAN:add hidden multicast interface check 49/5749/3
Eyal Bari [Wed, 15 Mar 2017 06:23:42 +0000 (08:23 +0200)]
VXLAN:add hidden multicast interface check

and some refactoring

Change-Id: I99e3c5e782ce65cb9779ccc3a9a3151ef1429e07
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoVPP changes to support iOAM over NSH-MD2. Separate trace data 98/5698/4
Vengada [Fri, 10 Mar 2017 06:05:02 +0000 (22:05 -0800)]
VPP changes to support iOAM over NSH-MD2. Separate trace data
structure definitions into two files to share code with NSH
plugin (iOAM)

Change-Id: I0192551f71678e4f814bc6a7d25200a1580f3033
Signed-off-by: Vengada <venggovi@cisco.com>
7 years agoFix packet trace output: dpdk_rx_trace must decode the actual ethertype 45/5745/3
Dave Barach [Tue, 14 Mar 2017 16:23:30 +0000 (12:23 -0400)]
Fix packet trace output: dpdk_rx_trace must decode the actual ethertype

As opposed to rubbish (typically) 14 octets past the ethertype.
Also fix buffer error code setup in dpdk-input node single loop.

Change-Id: Ide7c4097d3bb91e62749ed4e1d69a7b4b90225de
Signed-off-by: Dave Barach <dbarach@cisco.com>
Signed-off-by: John Lo <loj@cisco.com>
7 years agoAPI:support hidden sw interfaces 41/5741/3
Eyal Bari [Tue, 14 Mar 2017 12:39:51 +0000 (14:39 +0200)]
API:support hidden sw interfaces

validate interfaces - added check for hidden interfaces
interface dump - dont send hidden interfaces
set_unnumbered - test for hidden

vl_api_create_vlan_subif_t_handler, vl_api_create_subif_t_handler - fixed potential memory leak

some other minor refactors to make code clearer and shorter

Change-Id: Icce6b724336b7d1536fbd07a74bf7abe4916d2c0
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoTry again: __COVERITY__ vs __COVERITY 43/5743/2
Dave Barach [Tue, 14 Mar 2017 13:44:11 +0000 (09:44 -0400)]
Try again: __COVERITY__ vs __COVERITY

Hate it when that happens...

Change-Id: I725c8539d6349755e9d75ae05f2703c83ea704be
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoClean up dead API client reaper callack scheme 42/5742/1
Dave Barach [Tue, 14 Mar 2017 13:10:56 +0000 (09:10 -0400)]
Clean up dead API client reaper callack scheme

Change-Id: Iec3df234ca9f717d87787cefc76b73ed9ad42332
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoNasm > 2.11.06 required for sw_crypto. 23/5723/2
Thomas F Herbert [Sat, 11 Mar 2017 20:26:36 +0000 (15:26 -0500)]
Nasm > 2.11.06 required for sw_crypto.

Change-Id: I7583d3074478579a841c7827a12a4a8fc74d9d61
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
7 years agoioam: ip6 hop by hop ext header and SR header co-existence 90/5690/3
shwethab [Thu, 9 Mar 2017 16:58:26 +0000 (16:58 +0000)]
ioam: ip6 hop by hop ext header and SR header co-existence

1. Fix finding sr extension header
2. Fix for assert checks for space for sr header in packet headroom
3. ioam build warnings
4. Fix for SR header removal in presence of hbh ext header
   clib_memcpy with overlapping src/dst was failing

Change-Id: I8576204eb571d1d4725a4e6976e18fe61cd1cd35
Signed-off-by: shwethab <shwetha.bhandari@gmail.com>
7 years agovlib: poll pre_input nodes only on main thread 38/5738/2
Damjan Marion [Tue, 14 Mar 2017 10:10:00 +0000 (11:10 +0100)]
vlib: poll pre_input nodes only on main thread

Change-Id: I61464fd1610a9754693f31edd72f9fa1b6926511
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoioam: fix warnings 39/5739/2
Damjan Marion [Tue, 14 Mar 2017 10:53:15 +0000 (11:53 +0100)]
ioam: fix warnings

Change-Id: I0148f82cee56eaf0f6485294c8c70793266f1ed6
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoIOAM Coverity fix 14/5714/7
AkshayaNadahalli [Fri, 10 Mar 2017 18:38:13 +0000 (18:38 +0000)]
IOAM Coverity fix

Coverity IDs - 163911, 163910, 163909, 163908, 163905, 163904, 163896, 161957, 161955

Change-Id: Ida822fa45c6936240f61282e2280541d7e6427b3
Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
7 years agoUpdate CSIT tests 170302 -> 170313 27/5727/2
Jan Gelety [Mon, 13 Mar 2017 08:16:32 +0000 (09:16 +0100)]
Update CSIT tests 170302 -> 170313

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

Change-Id: I1a312a4a3085930c0019ec6832cb9f482174eea3
Signed-off-by: Jan Gelety <jgelety@cisco.com>
7 years agoVPP-659 Improve tcp/session debugging and testing 25/5725/7
Florin Coras [Tue, 7 Mar 2017 18:06:24 +0000 (10:06 -0800)]
VPP-659 Improve tcp/session debugging and testing

- event-logging support for tcp and session layer
- improvements to uri test code
- builtin_server on port 1234
- use the CLOSEWAIT timer when we rx FIN in FIN_WAIT_2 state

Change-Id: Ibc445f164b2086b20323bf89c77cffd3059f570f
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Barach <dbarach@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoVPP-279: Document changes for vnet/vnet/devices 15/5715/2
Billy McFall [Fri, 10 Mar 2017 19:49:15 +0000 (14:49 -0500)]
VPP-279: Document changes for vnet/vnet/devices

Add doxygen documentation for DPDK crypto CLI command.

The move of DPDK to a plugin invalidated the local dir.dox. So moved
dpdk/dir.dox to dpdk/device/dir.dox to fix.

Change-Id: I229e2921c4b0cdd380021adb520cd2089a376afa
Signed-off-by: Billy McFall <bmcfall@redhat.com>
7 years agoAdd MAC address check in ethernet-input node if interface in L3 mode 18/5718/10
John Lo [Fri, 10 Mar 2017 22:15:22 +0000 (17:15 -0500)]
Add MAC address check in ethernet-input node if interface in L3 mode

Interface can be in promiscuous mode if more than one of its sub-
interface is in L2 mode. In promiscuous mode, L3 interface need to
verify DMAC of packet to match that of the interface and drop if not.
This check was done on sub-interface only and now also added to main
interface path.

Fix incorrect MAC addresses in the flow-per-pkt plugin test, which
caused it to fail.

Fix MAC address usage in BFD tests.

Change-Id: I12a17ec05c7ab298ad10d400c90d082c97eca521
Signed-off-by: John Lo <loj@cisco.com>
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoACL plugin rejects ICMP messages (VPP-624) 58/5058/15
Pavel Kotucek [Thu, 2 Mar 2017 14:22:47 +0000 (15:22 +0100)]
ACL plugin rejects ICMP messages (VPP-624)

Change-Id: I95113a277b94cce5ff332fcf9f57ec6f385acec0
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
7 years agoRefactor SNAT ICMP code 89/5689/3
Juraj Sloboda [Wed, 22 Feb 2017 13:16:06 +0000 (05:16 -0800)]
Refactor SNAT ICMP code

Change-Id: I07de08ef111011694638a8ebe7a13c240714ce7e
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
7 years agoRetire vpp_lite 91/5691/8
Damjan Marion [Thu, 9 Mar 2017 19:38:15 +0000 (20:38 +0100)]
Retire vpp_lite

vpp_lite platform is not needed anymore as same efect can be
achieved with following startup.conf config:

plugins {
plugin dpdk_plugin.so { disable }
}

Change-Id: I690ea8ceb1c6e1fe32e01e7da54e9958019a93bf
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agovlib: deduplicatee code in main and worker main loop 86/5686/3
Damjan Marion [Thu, 9 Mar 2017 14:42:26 +0000 (15:42 +0100)]
vlib: deduplicatee code in main and worker main loop

Change-Id: Id18d59c9442602633a6310b2001a95bce8b6b232
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoVPP-659 TCP improvements 24/5624/14
Florin Coras [Sat, 4 Mar 2017 13:37:52 +0000 (05:37 -0800)]
VPP-659 TCP improvements

- builtin test echo server
- fix SYN-ACK retransmit canceling
- avoid sending spurious ACK if in LAST_ACK
- improved client dummy test app
- renamed tx fifo dequeuing and sending functions to avoid confusion
- improved RST handling

Change-Id: Ia14aad3df319540dcf6e6a4e18a9f8d423a4b83b
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agogmon: fix code commented out by mistake 93/5693/5
Damjan Marion [Thu, 9 Mar 2017 19:54:43 +0000 (20:54 +0100)]
gmon: fix code commented out by mistake

Change-Id: If540787e2443330673ad6721094c4765c32ef59b
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoLISP: fix Proxy-ETR show command, VPP-660 05/5705/2
Filip Tehlar [Fri, 10 Mar 2017 12:18:02 +0000 (13:18 +0100)]
LISP: fix Proxy-ETR show command, VPP-660

Change-Id: I8b7dc3bf631bd228db23679534e04b8af7ac4ec7
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>