vpp.git
5 years agoFixes for buliding for 32bit targets: 97/16497/6
David Johnson [Fri, 14 Dec 2018 19:53:41 +0000 (14:53 -0500)]
Fixes for buliding for 32bit targets:
  * u32/u64/uword mismatches
  * pointer-to-int fixes
  * printf formatting issues
  * issues with incorrect "ULL" and related suffixes
  * structure alignment and padding issues

Change-Id: I70b989007758755fe8211c074f651150680f60b4
Signed-off-by: David Johnson <davijoh3@cisco.com>
5 years agoAdd microarch details to 'show cpu'. 47/16647/2
Paul Vinciguerra [Sun, 30 Dec 2018 19:07:36 +0000 (11:07 -0800)]
Add microarch details to 'show cpu'.

Change-Id: I31a3ff9e8f70468196c091027592a3aed2d09ac3
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoipsec: fix support check when using AES-GCM 89/16589/2
Matthew Smith [Fri, 21 Dec 2018 17:53:16 +0000 (11:53 -0600)]
ipsec: fix support check when using AES-GCM

When adding an IPsec SA, ipsec_check_support_cb() is called. This
invokes a callback for AH and a callback for ESP to check if the
algorithms are supported.

When using AES-GCM on an ESP SA with the DPDK IPsec backend selected,
the AH callback fails. The DPDK IPsec backend has no AH support,
so the callback for the default OpenSSL backend is invoked. This
checks whether the crypto algorithm is AES-GCM and returns failure.

Only invoke the callback to check support for the IPsec protocol
of the SA - either AH or ESP rather than doing both.

Change-Id: Ic10be6a17b580d06ffb7e82ef5866e53a4f8b525
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agoadd ipsecmb plugin 09/14909/33
Klement Sekera [Thu, 8 Nov 2018 12:25:49 +0000 (13:25 +0100)]
add ipsecmb plugin

Change-Id: I99c0737dfeeec2db267773625ddc9b55324fd237
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agoldp/vcl: epoll and shutdown cleanup 56/16656/7
Florin Coras [Mon, 31 Dec 2018 01:11:31 +0000 (17:11 -0800)]
ldp/vcl: epoll and shutdown cleanup

Change-Id: I882b4c495426551fad63372dc106496c5e8c141e
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoDefault huge page size to the regular page size 57/16657/2
Dave Barach [Tue, 1 Jan 2019 14:45:08 +0000 (09:45 -0500)]
Default huge page size to the regular page size

With this simple tweak, vpp is OK for "make test" or non-dpdk driver
operation over a kernel which doesn't support hugepages at all.

Tested on a Raspberry-pi 3B+ running the Ubuntu 18.04 64-bit server
beta image. It's amazing that such a minimal system will not only
self-compile vpp, but also run the unit tests. It's slow, but what do
you expect for that amount of money?

Change-Id: I7f080f871c828cc4b44be13809495278fadbd717
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agobuffers: remove unused code 46/16646/4
Damjan Marion [Sun, 30 Dec 2018 17:09:59 +0000 (18:09 +0100)]
buffers: remove unused code

Change-Id: If2bbfbc52994f5de0879763e0b7a7864498debb6
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agovcl/ldp: add write msg function and fine tuning 34/16634/11
Florin Coras [Thu, 27 Dec 2018 22:51:46 +0000 (14:51 -0800)]
vcl/ldp: add write msg function and fine tuning

Allows app to push data. Additionally, ensure reset/close replies are
not sent unless vcl closes the session.

Change-Id: Icbbf933cf57b55cfbcc7b802af0f83919a066f65
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agobinary api clients: wait for vpp to start 32/16632/3
Dave Barach [Thu, 27 Dec 2018 18:57:41 +0000 (13:57 -0500)]
binary api clients: wait for vpp to start

Change-Id: I740a7423327b724e88fdfa35d90cb1285e9f9746
Signed-off-by: Dave Barach <dbarach@cisco.com>
5 years agoavf: tx dequeue optimizations 37/16637/2
Damjan Marion [Fri, 28 Dec 2018 16:43:22 +0000 (17:43 +0100)]
avf: tx dequeue optimizations

Change-Id: I9d8fcf930132e832941e5678a9278a029e104dc3
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoavf: chained buffers rx support 22/16622/5
Damjan Marion [Thu, 27 Dec 2018 15:18:55 +0000 (16:18 +0100)]
avf: chained buffers rx support

Change-Id: I76ba11441f0ab3d150cdd080919cda91eac60b01
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoavf: chained buffers tx support 29/16629/4
Damjan Marion [Thu, 27 Dec 2018 10:35:40 +0000 (11:35 +0100)]
avf: chained buffers tx support

Change-Id: Ib573d45def80b4123d5623fda920e6cda1247638
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agovppinfra: add simple ring implementation 36/16636/2
Damjan Marion [Fri, 28 Dec 2018 14:46:10 +0000 (15:46 +0100)]
vppinfra: add simple ring implementation

Change-Id: I188e2dfd187d7b2ab7e0fbb11461f3db052f3224
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agosession: free session after transport and app confirm 33/16633/4
Florin Coras [Thu, 27 Dec 2018 19:53:11 +0000 (11:53 -0800)]
session: free session after transport and app confirm

In addition to that, a bit of refactoring.

Change-Id: Iea1eabc2167bcdef185ec53bc09bae087c5398e6
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovcl: handle invalid sessions in epoll 27/16627/3
Florin Coras [Thu, 27 Dec 2018 00:29:06 +0000 (16:29 -0800)]
vcl: handle invalid sessions in epoll

Change-Id: I62d37f3c05451e5667863a2c6c551872d5dac1ea
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovpp_papi: MACAddress equals fails in unittest. 26/16626/4
Paul Vinciguerra [Wed, 26 Dec 2018 23:27:10 +0000 (15:27 -0800)]
vpp_papi:  MACAddress equals fails in unittest.

Before:
    EqualsAssertionError:  :: MACAddress(11:22:33:44:55:66) != MACAddress(11:22:33:44:55:66)
    ----------------------------------------------------------------------
    Ran 1 test in 0.002s
    FAILED (failures=1)
    MACAddress(11:22:33:44:55:66) != MACAddress(11:22:33:44:55:66)

After:

    ----------------------------------------------------------------------
    Ran 1 test in 0.001s
    OK

Change-Id: I89896a823b8f8a861813dabf23e7c9207e4fabb6
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoMAP: Install lpm.h as map.h references it. 24/16624/2
Jon Loeliger [Wed, 26 Dec 2018 21:13:21 +0000 (15:13 -0600)]
MAP: Install lpm.h as map.h references it.

Change-Id: I97c6475920b7f7028c2bb1117ff9e5f629a54b44
Signed-off-by: Jon Loeliger <jdl@netgate.com>
5 years agoinstall-dep: force osleap boost dep install 31/16631/2
Florin Coras [Thu, 27 Dec 2018 17:07:32 +0000 (09:07 -0800)]
install-dep: force osleap boost dep install

Change-Id: I4a053f41eef138fc0e6db7e2650860c0ac999552
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agotcp: add more last-ack arcs 18/16618/3
Florin Coras [Tue, 25 Dec 2018 18:55:01 +0000 (10:55 -0800)]
tcp: add more last-ack arcs

Change-Id: If538bb9d6fb489906099b727a7bfdb9d9af29402
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: separate active and passive establish timers 15/16615/7
Florin Coras [Tue, 25 Dec 2018 00:54:34 +0000 (16:54 -0800)]
tcp: separate active and passive establish timers

Change-Id: Ia2241e963cf45765d8d17c65eea781edbf74d4f9
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoavf: optimize RX function 05/16605/3
Damjan Marion [Tue, 25 Dec 2018 08:41:17 +0000 (09:41 +0100)]
avf: optimize RX function

Change-Id: Icd1e9638cdb288e94196391a2c85f2eaaf65387e
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agotcp: add fin-wait-1 dispatch arcs 08/16608/2
Florin Coras [Mon, 24 Dec 2018 07:36:36 +0000 (23:36 -0800)]
tcp: add fin-wait-1 dispatch arcs

Change-Id: Ie4cb08f5d9f7fd025f1a8ae610cebb0b0c315d9f
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoGBP: fix dump and VOM populate 14/16614/2
Neale Ranns [Mon, 24 Dec 2018 15:26:47 +0000 (07:26 -0800)]
GBP: fix dump and VOM populate

Change-Id: I5440d80333190ebac46d22eac43183939805a24b
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agocrypto-input: bug fix check-op 06/16606/2
Kingwel Xie [Mon, 24 Dec 2018 04:54:19 +0000 (23:54 -0500)]
crypto-input: bug fix check-op

fix a copy-paste bug, and a typo of function name

Change-Id: Ib408522d2bb6fde7a7492de6f5d5369b461d77c9
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agoFIB: adj src assert fix part 2 11/16611/2
Neale Ranns [Sun, 23 Dec 2018 16:57:27 +0000 (08:57 -0800)]
FIB: adj src assert fix part 2

Change-Id: Ic112180e53a55993b06ba18102202d6ac5854def
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotcp: compute seq_end in tcp_input 99/16599/8
Florin Coras [Sat, 22 Dec 2018 19:39:33 +0000 (11:39 -0800)]
tcp: compute seq_end in tcp_input

syn/fin are no longer added to seq_end so they must be considered
individually in each state.

Change-Id: I5e3047194101c4fca2db9f9ad29a4a6468c397ab
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoavf: optimize rx ring refill 02/16602/3
Damjan Marion [Sun, 23 Dec 2018 12:59:20 +0000 (13:59 +0100)]
avf: optimize rx ring refill

Change-Id: Id35089d6c73b35cd25fd01e07966a2c7e2ea367e
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoFIB: remove assert from adj src 04/16604/2
Neale Ranns [Sun, 23 Dec 2018 14:49:11 +0000 (06:49 -0800)]
FIB: remove assert from adj src

this is the case when the ADJ fib is in the non-forwarding trie

Change-Id: I7bcda475b3b1e142d16363147dba3a1e2c5a07f9
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoVOM: stats 03/16603/2
Neale Ranns [Sun, 23 Dec 2018 14:38:39 +0000 (06:38 -0800)]
VOM: stats

- onnly read when connected. use bool for state
- operator<< for counter_t
- only publish stats for interfaces that have them available

Change-Id: I66a8a336a05912592851c88e3af69155d840a573
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoavf: new ethernet-input support 01/16601/1
Damjan Marion [Sun, 23 Dec 2018 11:26:52 +0000 (12:26 +0100)]
avf: new ethernet-input support

Change-Id: I5511823f38ad56161b6a538f2d9e63459eded1eb
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoavf: add option to specify interface name 00/16600/2
Damjan Marion [Sun, 23 Dec 2018 10:19:30 +0000 (11:19 +0100)]
avf: add option to specify interface name

Change-Id: I94591d5b103280f8df157819d423fef7ee89d4c8
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agovcl: fix coverity warnings 94/16594/6
Florin Coras [Sat, 22 Dec 2018 03:28:34 +0000 (19:28 -0800)]
vcl: fix coverity warnings

Change-Id: I24445b08a46041c370094ebba4243422e2342a26
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: improve waitclose in closing states 91/16591/4
Florin Coras [Fri, 21 Dec 2018 21:54:09 +0000 (13:54 -0800)]
tcp: improve waitclose in closing states

Change-Id: I90056176194cb2a144d49a3cb283653d8d30f051
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoethernet-input tagged packets optimizations 73/16173/18
Damjan Marion [Sun, 25 Nov 2018 20:19:13 +0000 (21:19 +0100)]
ethernet-input tagged packets optimizations

Change-Id: I21bdd8982d5f357590af8a2a0219bdebbaee4e74
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agodpdk: switch to in-memory mode, deprecate use of socket-mem 43/16543/2
Damjan Marion [Wed, 19 Dec 2018 11:45:18 +0000 (12:45 +0100)]
dpdk: switch to in-memory mode, deprecate use of socket-mem

Change-Id: I3896bf9d71dc300520c53dbe3c2fd8fcd1470881
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agotapv2: coverity woe 90/16590/2
Steven [Fri, 21 Dec 2018 20:42:34 +0000 (12:42 -0800)]
tapv2: coverity woe

coverity complains about fd leaking inside the if statement because there is
a goto which bypasses the statement close (fd).

The fix is to close (fd) immediately after it is no longer used.

Change-Id: Ic5035b07ec1f179ff3db77744843e47aa8067a3c
Signed-off-by: Steven <sluong@cisco.com>
5 years agocrypto-input impprovement: 95/16595/2
Kingwel Xie [Sat, 22 Dec 2018 08:17:15 +0000 (03:17 -0500)]
crypto-input impprovement:

1. multi-loop, and new style with vlib_buffer_enqueue_to_next
2. add error counter for AUTH-FAILURE
3. buffer trace changed. now it supports 'trace add dpdk-crypto-input 10'
   just like the other input nodes

Actual measurement shows >10 clocks per packets are saved, under QAT
or openssl PMD case

Change-Id: I6ea34e4ae3b08c381219ff6bc8adda2d927fbfd5
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agobapi/vat: fix socket transport for vat 92/16592/3
Florin Coras [Sat, 22 Dec 2018 00:23:09 +0000 (16:23 -0800)]
bapi/vat: fix socket transport for vat

Change-Id: I8e39df129f80c8d3d73181fc5d3ac60ae382a6b6
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agohttp server: improvements 72/16572/11
Florin Coras [Thu, 20 Dec 2018 17:50:50 +0000 (09:50 -0800)]
http server: improvements

- use http sessions to track communication with peer (as opposed to
using the raw sessions)
- for static server send ok message prior to sending data
- static server can now handle GET requests spread over multiple
packets. Good for testing http/tcp implementation.

Change-Id: I767a790de9a42e7087db5ce8eefd8efaf598c695
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoGBP: add allowed ethertypes to contracts 75/16575/6
Neale Ranns [Thu, 20 Dec 2018 20:03:59 +0000 (12:03 -0800)]
GBP: add allowed ethertypes to contracts

Change-Id: I74782d3b9b71a071bb500c34866a017b8ee15767
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoMAP: Convert from DPO to input feature. 76/16576/5
Jon Loeliger [Thu, 20 Dec 2018 17:47:30 +0000 (11:47 -0600)]
MAP: Convert from DPO to input feature.

Change-Id: I25c86aea23dff19656449b23133db27b1f062ac0
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoRevert "tests: Rework vpp config generation." 88/16588/2
Ole Troan [Fri, 21 Dec 2018 15:04:22 +0000 (16:04 +0100)]
Revert "tests: Rework vpp config generation."

This reverts commit 919efad2671993d4c6d5a0dba8eeb99d5c60edf1.

Change-Id: I5ec4fa08a03f508dac684dc1ddbd7e6b85c49b97
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoMFIB: coverity fixes 85/16585/2
Neale Ranns [Fri, 21 Dec 2018 15:00:56 +0000 (07:00 -0800)]
MFIB: coverity fixes

Change-Id: I5c1bc498f7299e175070eb288e40f8d037c9be3a
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoNAT: fix coverity error 190176 (VPP-1474) 84/16584/1
Matus Fabian [Fri, 21 Dec 2018 12:01:00 +0000 (04:01 -0800)]
NAT: fix coverity error 190176 (VPP-1474)

Change-Id: I0ee80c7bec59d3e9c69e92e6cf0af1a6864a4ec4
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoPython Tests: Make VppTestCase unit testable. 99/16499/2
Paul Vinciguerra [Sat, 15 Dec 2018 16:03:09 +0000 (08:03 -0800)]
Python Tests: Make VppTestCase unit testable.

* This allows for VppTestCase to instantiated with an empty constructor.

Change-Id: Ib71d3bfb4529e113f9b73c39de9b95f12ee9cfb4
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agotests: Rework vpp config generation. 19/16519/3
Paul Vinciguerra [Tue, 18 Dec 2018 05:43:43 +0000 (21:43 -0800)]
tests: Rework vpp config generation.

* Allows test cases to configure the VPP runtime config
  during fixture setup.

* Sample use in a TestCase:
    @classmethod
    def setUpConstants(cls):
        tempdir = cls.tempdir
        cls.config.add('punt', 'socket', '%s/socket_punt' % cls.tempdir)
        super(TestPuntSocket, cls).setUpConstants()
        # enable/disabe a plugin via:
        #cls.config.add_plugin('dpdk_plugin.so', 'disable')

* Supports the following config stanzas:
'unix',
        'acl-plugin'
        'api-queue'
        'api-trace'
        'api-segment'
        'cj'
        'cpu'
        'dns'
        'dpdk
        # currently don't support dynamic keys
        # 'heapsize'
        'l2learn'
        'l2tp'
        'mactime'
        'mc'
        'nat'
        'oam'
        'plugins'
        'punt'
        'session'
        'socksvr'
        'statseg'
        'tapcli'
        'tcp'
        'tuntap'
        'vhost-user'

Change-Id: I44f276487267d26eaa46f87e730bdd861003b234
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoRevert "Build issue after https://gerrit.fd.io/r/#/c/16508/." 79/16579/2
Ole Trøan [Fri, 21 Dec 2018 06:33:36 +0000 (06:33 +0000)]
Revert "Build issue after https://gerrit.fd.io/r/#/c/16508/."

This reverts commit 57f170bdf9967e3f8ea6e937a70c7f86187f95a2.

Change-Id: I1cab5be8b04ac881b712e67fd72ed202657fedf4
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agotcp: fix fin_wait_1 condition to send fin 77/16577/3
Florin Coras [Fri, 21 Dec 2018 02:24:49 +0000 (18:24 -0800)]
tcp: fix fin_wait_1 condition to send fin

Also add the closed-waiting session state wherein the session still
allows the transport to send oustanding data.

Change-Id: Ic47807379906ef2010934381ff0b9e53c7e631d8
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoGBP: test case hardening against timing races 70/16570/2
Neale Ranns [Thu, 20 Dec 2018 14:12:19 +0000 (06:12 -0800)]
GBP: test case hardening against timing races

Change-Id: I3b5d369a37233c7bb2113ce31479371c610977ef
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotcp: fix syn-sent reset 74/16574/1
Florin Coras [Thu, 20 Dec 2018 18:16:01 +0000 (10:16 -0800)]
tcp: fix syn-sent reset

Change-Id: I4a811672b27c70bf0e9652c175c7f4168ec40ed7
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoNAT: total users and sessions gauges (VPP-1484) 22/16522/3
Matus Fabian [Tue, 18 Dec 2018 09:08:51 +0000 (01:08 -0800)]
NAT: total users and sessions gauges (VPP-1484)

Change-Id: I41a82e21571d5c64d01af72cd88c3983afac26ed
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoFIB: encode the label stack in the FIB path during table dump 67/16567/2
Neale Ranns [Thu, 20 Dec 2018 11:01:49 +0000 (03:01 -0800)]
FIB: encode the label stack in the FIB path during table dump

Change-Id: I28e8a99b980ad343a4209e673201791b91ceab4e
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotest/vpp_ip.py: Correct usage of 'is' 08/16408/5
Paul Vinciguerra [Sun, 9 Dec 2018 16:52:14 +0000 (08:52 -0800)]
test/vpp_ip.py:  Correct usage of 'is'

  * Correct 'is' (identity) usage where equality is needed '=='.
  * Change raise 'Exception' to log message and return NotImplemented.
    (see: https://docs.python.org/3/library/constants.html#NotImplemented)
  * Remove duplicate property: bytes.
  * Remove duplicate method: __eq__.

Change-Id: Id3ae4f92f985eb7cef334e2679f19ecc971007c1
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoVPP-1508 python3 tests: raw_input 00/16500/2
Paul Vinciguerra [Sat, 15 Dec 2018 18:16:35 +0000 (10:16 -0800)]
VPP-1508 python3 tests: raw_input

'raw_input' does not exist in python3.

Change-Id: I95d916db2834fab83e5e791f35103a4513e610b8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoTests: Cleanup @skip decorator. 80/16380/3
Paul Vinciguerra [Thu, 6 Dec 2018 15:46:13 +0000 (07:46 -0800)]
Tests:  Cleanup @skip decorator.

The runnning environment is static as of module load time,
so only evalute the conditions once at module load time.

Track-by: VPP-1518
Change-Id: I73b0d17ae1ff90789e70307f168d43921829aec8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoBuild issue after https://gerrit.fd.io/r/#/c/16508/. 62/16562/3
Paul Vinciguerra [Wed, 19 Dec 2018 21:24:51 +0000 (13:24 -0800)]
Build issue after https://gerrit.fd.io/r/#/c/16508/.

CI passes without this.

Change-Id: Iba542211e7b7b0e43c87a293b63a320b511c3d40
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoTrivial: fix src/plugins/map/test.c memory leak 07/15507/2
Paul Vinciguerra [Wed, 24 Oct 2018 15:02:28 +0000 (08:02 -0700)]
Trivial: fix src/plugins/map/test.c memory leak

Change-Id: Iabc8bcddd1b30a3b14f3cfd13b3c0b77a63028d6
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agodelete policer classify repeat count drop packets when action is DROP 64/16564/2
cohu [Thu, 20 Dec 2018 03:33:07 +0000 (11:33 +0800)]
delete policer classify repeat count drop packets when action is DROP

Change-Id: Id912bc570f42b1709596a917ecf5e56c237ce192
Signed-off-by: cohu <cong.hu@tieto.com>
5 years agoreassembly: replace asserts with error counters 48/16548/2
Klement Sekera [Fri, 14 Dec 2018 16:24:13 +0000 (17:24 +0100)]
reassembly: replace asserts with error counters

Change-Id: Iaa39aea990bc04147f6a049215e990a567d30106
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agosession: add cli option to dump session elog 61/16561/4
Florin Coras [Wed, 19 Dec 2018 21:07:49 +0000 (13:07 -0800)]
session: add cli option to dump session elog

Change-Id: I1f42644f143bb65ee764c0f869b402595126adac
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: fix fin in syn-rcvd 41/16541/8
Florin Coras [Wed, 19 Dec 2018 09:38:57 +0000 (01:38 -0800)]
tcp: fix fin in syn-rcvd

Change-Id: Iba7c08c9edcf76ea24d00d5ea9e0586e9f94df4e
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: add more state machine arcs 20/16520/8
Florin Coras [Tue, 18 Dec 2018 05:31:25 +0000 (21:31 -0800)]
tcp: add more state machine arcs

This mostly adds explicit drops or resets for state and flag
combinations that would've been otherwise dropped with a warning
message.

It also adds some valid RST handlers.

Change-Id: Ib0d19a0939fe275befeb29cf072b87b1a79937ce
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoVOM: stats fixes 45/16545/4
Neale Ranns [Wed, 19 Dec 2018 10:34:59 +0000 (02:34 -0800)]
VOM: stats fixes

- double free of m_stat_data_seg
- cleanup typedefs

Change-Id: I6aeb070471b6c5c97ac4379d01bd242136f80091
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotw: fix _16t_1w_2048sl timer weel definition 58/16558/1
Florin Coras [Wed, 19 Dec 2018 16:26:31 +0000 (08:26 -0800)]
tw: fix _16t_1w_2048sl timer weel definition

Change-Id: If5c44241577bc5a42d33f1ec5a62097974d6fda8
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoVOM: VXLAN-GBP command fixes 46/16546/2
Neale Ranns [Wed, 19 Dec 2018 12:25:52 +0000 (04:25 -0800)]
VOM: VXLAN-GBP command fixes

Change-Id: Ie1c672a83bca15ce7b6b9354ede1f36f8fef8e74
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoVOM: GBP-bridge-domain fix 47/16547/2
Neale Ranns [Wed, 19 Dec 2018 12:27:15 +0000 (04:27 -0800)]
VOM: GBP-bridge-domain fix

Change-Id: I504efbf214d891f4be2f1658a90a19b13764ab37
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoMAP: Add API support for MAP input feature. 31/16531/3
Jon Loeliger [Mon, 17 Dec 2018 19:43:52 +0000 (13:43 -0600)]
MAP: Add API support for MAP input feature.

Change-Id: I336919a1d3a9d1b404e375a30575cce5e5335137
Signed-off-by: Jon Loeliger <jdl@netgate.com>
5 years agoStats: Updated wrong slot on new vector 42/16542/2
Ole Troan [Wed, 19 Dec 2018 11:28:46 +0000 (12:28 +0100)]
Stats: Updated wrong slot on new vector

Change-Id: Ibf6008fd4e780a8c6fa676c7f7ba2f1cd98e72a9
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agotcp/session: notify transport of close when tx fifo is not empty 37/16537/5
Florin Coras [Wed, 19 Dec 2018 06:44:27 +0000 (22:44 -0800)]
tcp/session: notify transport of close when tx fifo is not empty

Disconnect transport even if tx fifo is not empty and have transport
deal with the problem. In case of tcp, add timer to fin_wait_1. If it
expires and we're still in established state, cleanup but only after
waiting for session tx events to cleanup.

Change-Id: I45759a3c43dd096bb2c03daf5372416c30678d62
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: handle close before app accept reply 21/16521/3
Florin Coras [Tue, 18 Dec 2018 07:08:14 +0000 (23:08 -0800)]
session: handle close before app accept reply

Change-Id: Ic35bbf55851087d70bfacc1eab4dea4285f98c86
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovlib: support Hyper-v/Azure VMBus 11/15311/7
Stephen Hemminger [Mon, 15 Oct 2018 19:52:30 +0000 (12:52 -0700)]
vlib: support Hyper-v/Azure VMBus

This patch adds support for VMBus to the VPP infrastructure.
Since the only device that matters is the netvsc Poll Mode Driver
in DPDK, the infrastructure is much simpler than PCI.

Change-Id: Ie96c897ad9c426716c2398e4528688ce2217419b
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agoAllow the user to select master or release during the install 30/16530/2
jdenisco [Tue, 18 Dec 2018 20:29:45 +0000 (15:29 -0500)]
Allow the user to select master or release during the install

Change-Id: Ifef937c4347ba40bde55958f93f2d1720996539f
Signed-off-by: jdenisco <jdenisco@cisco.com>
5 years agodpdk plugin: blacklist PCI devices by type 33/16533/4
Dave Barach [Tue, 18 Dec 2018 21:06:36 +0000 (16:06 -0500)]
dpdk plugin: blacklist PCI devices by type

Change-Id: I89695c1ad47131ed830f35c677937ce12025a40d
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agotcp/session: drop connections if message queue is full 15/16515/10
Florin Coras [Mon, 17 Dec 2018 16:24:19 +0000 (08:24 -0800)]
tcp/session: drop connections if message queue is full

Also cleanup session table when transport closes and app didn't reply to
the close notification.

Change-Id: Ie3d518e3afff73437561561b46dbf695c24632ad
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoVPP-1508: Have test/Makefile honor PYTHON= envvar. 88/16488/2
Paul Vinciguerra [Fri, 14 Dec 2018 18:17:08 +0000 (10:17 -0800)]
VPP-1508: Have test/Makefile honor PYTHON= envvar.

Change-Id: Iff71a5982b73c97e3f546beb1cf52935a267f5f5
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoNAT44: nat44_add_del_lb_static_mapping enhancements (VPP-1514) 71/16371/2
Matus Fabian [Thu, 6 Dec 2018 11:11:09 +0000 (03:11 -0800)]
NAT44: nat44_add_del_lb_static_mapping enhancements (VPP-1514)

Change-Id: I5419e06592b0402e911e132796368800321f355a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoVAPI/VOM: Removing legacy stats tests, add string type. 27/16527/3
Ole Troan [Tue, 18 Dec 2018 11:23:13 +0000 (12:23 +0100)]
VAPI/VOM: Removing legacy stats tests, add string type.

Fix misc VAPI/VOM generation and test cases.

Change-Id: I1abf9ecdb6f8a2129f11e0a9ed1c0fe04cdf5c47
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoMAP: Add longest matching prefix (LPM) data structures 28/16528/2
Ole Troan [Tue, 18 Dec 2018 11:33:26 +0000 (12:33 +0100)]
MAP: Add longest matching prefix (LPM) data structures

In preparation for adding input feature MAP support, as opposed to
going via the FIB, add MAP's own LPM data structures.

Change-Id: Ie363f0961b0ac9dde2a0fb76cb0c58c904876974
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoMFIB: recurse resolution through an MFIB entry 12/16512/3
Neale Ranns [Mon, 17 Dec 2018 13:50:32 +0000 (05:50 -0800)]
MFIB: recurse resolution through an MFIB entry

Change-Id: I8dc261e40b8398c5c8ab6bb69ecebbd0176055d9
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agomake wipe: Clean up *.api.json files. 05/16405/3
Paul Vinciguerra [Fri, 7 Dec 2018 11:57:49 +0000 (03:57 -0800)]
make wipe:  Clean up *.api.json files.

Change-Id: I0cb1a1b5bf9003d7b5231452e85d535c9cb2b6ec
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoBuild changes required for Fedora and CentOS 62/16262/5
Thomas F Herbert [Tue, 27 Nov 2018 20:57:30 +0000 (15:57 -0500)]
Build changes required for Fedora and CentOS

VPP-1511

cmake is the dep for Fedora but cmake3 is for CentOS 7.
Centos: explicitly install epel-release on Centos.
Epel requirement is now explicit for cmake3, and ninja-build.
Remove references to Fedora 25 which is EOL.

Change-Id: I1548ddf2e5421097ac0ddc2d99abce7582d0d593
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
5 years agoPAPI: Add MACAddress object wrapper for vl_api_mac_address_t 08/16508/6
Ole Troan [Mon, 17 Dec 2018 11:02:26 +0000 (12:02 +0100)]
PAPI: Add MACAddress object wrapper for vl_api_mac_address_t

Change the definition of vl_api_mac_address_t to an aliased type.

Change-Id: I1434f316d0fad6a099592f39bceeb8faeaf1d134
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoMAP: Remove dual loop in MAP-T in preparation for refactor. 23/16523/3
Ole Troan [Tue, 18 Dec 2018 09:11:30 +0000 (10:11 +0100)]
MAP: Remove dual loop in MAP-T in preparation for refactor.

Change-Id: I3c77cadaa7b677073af00407f368bd48d703fdac
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agotcp: cleanup connections if handshake fails 06/16506/3
Florin Coras [Mon, 17 Dec 2018 05:33:00 +0000 (21:33 -0800)]
tcp: cleanup connections if handshake fails

Change-Id: If109d6772cbd58f4f2a56ae7ec593639d1fa1b96
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoRemove autotools files from extras/libmemif 13/16513/2
Mauro Sardara [Mon, 17 Dec 2018 14:59:13 +0000 (15:59 +0100)]
Remove autotools files from extras/libmemif

Change-Id: I6c5f7ab5bb6c0022746d3feedd71b5981f31c7fb
Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
5 years agopunt: additional tests for multi clients 33/16433/4
Pavel Kotucek [Tue, 11 Dec 2018 15:57:25 +0000 (16:57 +0100)]
punt: additional tests for multi clients

Change-Id: I0e25c23fc7b44b465f1b0d05a881fbe9816a0264
Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
5 years agoSTATS: add vlib_set_simple_counter (VPP-1484) 11/16511/2
Matus Fabian [Mon, 17 Dec 2018 13:29:28 +0000 (05:29 -0800)]
STATS: add vlib_set_simple_counter (VPP-1484)

Change-Id: Iacaa75c7e1c974642c1dc1e0c3cf5c36c78450d7
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoImprove perfmon json table picker 17/16517/2
Dave Barach [Mon, 17 Dec 2018 20:55:52 +0000 (15:55 -0500)]
Improve perfmon json table picker

Built a tool to chew up https://download.01.org/perfmon/mapfile.csv,
and output a table in this format:

typedef struct {
  u8 model;
  u8 stepping;
  u8 has_stepping;
  char *filename;
} file_by_model_and_stepping_t;

static const file_by_model_and_stepping_t fms_table [] =
{
 /* model, stepping, stepping valid, file */
  { 0x2E, 0x0, 0, "NehalemEX_core_V2.json" },
  { 0x1E, 0x0, 0, "NehalemEP_core_V2.json" },
<snip>
  { 0x55, 0x5, 1, "cascadelakex_core_v1.00.json" },
  { 0x55, 0x6, 1, "cascadelakex_core_v1.00.json" },
  { 0x55, 0x7, 1, "cascadelakex_core_v1.00.json" },
<snip>

Change-Id: Ie0e8a7e851799e9d060b966047745039c066ec7b
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agodocs: Add vmxmet3 driver 16/16516/2
jdenisco [Mon, 17 Dec 2018 20:45:21 +0000 (15:45 -0500)]
docs: Add vmxmet3 driver

Change-Id: I96425804c310a1ac1b7f5f12bb636e591c7bd429
Signed-off-by: jdenisco <jdenisco@cisco.com>
5 years agotcp: fix handling of broken syn options 05/16505/2
Florin Coras [Mon, 17 Dec 2018 04:57:29 +0000 (20:57 -0800)]
tcp: fix handling of broken syn options

Change-Id: Ia8b2a077ba4897ddd15cf33221b191cd7a3f1d33
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: accept rst that fail paws 02/16502/2
Florin Coras [Sun, 16 Dec 2018 19:41:45 +0000 (11:41 -0800)]
tcp: accept rst that fail paws

Change-Id: I945d1644a23b6a3d50c9beaffc732d2b6facd974
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovcl: handle reset while reading/writing data 01/16501/4
Florin Coras [Sun, 16 Dec 2018 02:30:43 +0000 (18:30 -0800)]
vcl: handle reset while reading/writing data

Change-Id: I73d1dde5b78bbb7835f3a4f0d35fc0d5e46ec103
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoVOM: IGMP only supports IPv4 14/16514/2
Neale Ranns [Mon, 17 Dec 2018 15:29:32 +0000 (07:29 -0800)]
VOM: IGMP only supports IPv4

Change-Id: Ie0a8898fa2d8ab71522686fb83fb1de959ee3098
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agostats: Deprecate old stats framework 07/15907/4
Ole Troan [Tue, 13 Nov 2018 13:04:50 +0000 (14:04 +0100)]
stats: Deprecate old stats framework

Change-Id: Iecdf0e5767115ef0570e9ea7212dc4644cf4afbd
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agomake test: add option for adding extra vpp config 21/16321/2
Klement Sekera [Mon, 3 Dec 2018 11:24:21 +0000 (12:24 +0100)]
make test: add option for adding extra vpp config

Change-Id: Ief316756635794dadf2f0f4190aa20745df5e53c
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agolibmemif: fix possible segfault on memif_get_details 82/16482/2
Koichiro Den [Fri, 14 Dec 2018 15:31:34 +0000 (00:31 +0900)]
libmemif: fix possible segfault on memif_get_details

insufficient buflen does not mean immediate return but
fallthrough by design so assigning values to these
array elements should just be skipped in that case.

Change-Id: Iaa9718db073108e44a9b05e1c8ffb0725147ff1f
Signed-off-by: Koichiro Den <den@klaipeden.com>
5 years agoFix TestIPv4FibCrud interdependencies. 04/16504/2
Paul Vinciguerra [Sun, 16 Dec 2018 22:52:36 +0000 (14:52 -0800)]
Fix TestIPv4FibCrud interdependencies.

The tests fail if run independently or out of order.
This change breaks the dependency between the tests.

ERROR: Add 1k routes
------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/vpp/test/test_ip4.py", line 514, in test_3_add_new_routes
    self.deleted_routes.remove(x)
ValueError: list.remove(x): x not in list

Change-Id: I344ceba6bd8b86556f92e50080be6c43092b9faf
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoAdded CMake building system for libmemif 36/16436/11
msardara [Tue, 11 Dec 2018 17:36:55 +0000 (18:36 +0100)]
Added CMake building system for libmemif
Added Cpack support for building libmemif DEB/RPM packages
Fixed compilation errors in libmemif test and examples

Change-Id: I59a237a4ca8eb08840857d5b0e666f3a8d74411d
Signed-off-by: msardara <msardara+fdio@cisco.com>
5 years agoString type: Not include \0 in show_version 03/16503/3
Ole Troan [Sun, 16 Dec 2018 22:44:54 +0000 (23:44 +0100)]
String type: Not include \0 in show_version

The string type does not include the \0 in strings.

Change-Id: I869f438b84880df40a018e43b4510194d84ce0fe
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agovcl/session: handle reset/disconnect before app accept 91/16491/8
Florin Coras [Fri, 14 Dec 2018 19:28:43 +0000 (11:28 -0800)]
vcl/session: handle reset/disconnect before app accept

Also further improves reset handling.

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