vpp.git
5 years agoGBP: contracts API fixed length of allowed ethertypes 09/18209/3
Neale Ranns [Tue, 12 Mar 2019 11:34:53 +0000 (04:34 -0700)]
GBP: contracts API fixed length of allowed ethertypes

VAPI does not handle two VLAs in one struct.

Change-Id: I259c998bef4398ead2bbb9e788350d50c2f05694
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoICMP46 error: Clone first buffer instead of "truncating" original buffer 83/18183/6
Ole Troan [Mon, 11 Mar 2019 12:15:54 +0000 (13:15 +0100)]
ICMP46 error: Clone first buffer instead of "truncating" original buffer

Previous code was walked buffer chain, effectively trying to "truncate" the chain, reset the
length of first buffer and reused that as the ICMP error message. That could have issues in cases
there were other users of the buffer chain. Update to clone the first buffer in chain, and
use that for the ICMP error message instead.

Change-Id: Ibc1a0bf2d854dae41874808c8297028ed93dd69d
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoVPP-1486: Unittest for stat segment file descriptor leak. 77/18177/2
Paul Vinciguerra [Mon, 11 Mar 2019 12:04:12 +0000 (05:04 -0700)]
VPP-1486: Unittest for stat segment file descriptor leak.

Verifies: https://gerrit.fd.io/r/#/c/18167/

Before patch:

    ==============================================================================
    Test Stats Client
    ==============================================================================
    Test file descriptor count - VPP-1486                                    FAIL [ temp dir used by test case: /tmp/vpp-unittest-StatsClientTestCase-EAp0e7 ]

    ==============================================================================
    FAIL: Test file descriptor count - VPP-1486
    ------------------------------------------------------------------------------
    Traceback (most recent call last):
      File "/vpp/test/test_stats_client.py", line 39, in test_client_fd_leak
        initial_fds, ending_fds))
    AssertionError: initial client side file descriptor count: 20 is not equal to ending client side file descriptor count: 120

    04:55:38,038 Symlink to failed testcase directory: /tmp/vpp-failed-unittests/vpp-unittest-StatsClientTestCase-EAp0e7-FAILED -> vpp-unittest-StatsClientTestCase-EAp0e7

    ==============================================================================
    TEST RESULTS:
         Scheduled tests: 1
          Executed tests: 1
            Passed tests: 0
                Failures: 1
    FAILURES AND ERRORS IN TESTS:
      Testcase name: Test Stats Client
        FAILURE: Test file descriptor count - VPP-1486 [test_stats_client.StatsClientTestCase.test_client_fd_leak]
    =============================================================================

After patch:

    ==============================================================================
    Test Stats Client
    ==============================================================================
    Test file descriptor count - VPP-1486                                    OK

    ==============================================================================
    TEST RESULTS:
         Scheduled tests: 1
          Executed tests: 1
            Passed tests: 1
    ==============================================================================

    Test run was successful

Change-Id: I055e473ecf0566ebfbfbadd58ec6eaf11fc77d68
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoFIB: crash when deleting default route 38/18138/3
Neale Ranns [Fri, 8 Mar 2019 12:18:40 +0000 (12:18 +0000)]
FIB: crash when deleting default route

when adding a recursive path the table is locked
so that it can be removed when the last recursive path
is removed. however, not all RR source'd prefixs use
a recursive path. so flushing the table of all RR source'd
entries is not correct.

Change-Id: Id4010774011046e66ddc443ac83cb8e9245313dd
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agobfd: register udp ports only when enabled 88/18188/2
Klement Sekera [Mon, 11 Mar 2019 13:04:19 +0000 (14:04 +0100)]
bfd: register udp ports only when enabled

Change-Id: Iffb4b314be3ded0d9c6acb77ec1c6f22778f301d
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agovpp_papi_provider: Remove more wrapper functions. 96/18196/2
Ole Troan [Mon, 11 Mar 2019 18:23:25 +0000 (19:23 +0100)]
vpp_papi_provider: Remove more wrapper functions.

Split this work up into pieces.
Please don't add new wrappers to vpp_papi_provider.py.

Change-Id: I0f8f2afc4cd2bba07ea70ddecea2d7319f7b2e10
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoldp: fix worker alloc when using eventfds 95/18195/1
Florin Coras [Mon, 11 Mar 2019 17:14:37 +0000 (10:14 -0700)]
ldp: fix worker alloc when using eventfds

Change-Id: Icfba7ae9cbf504a8966923eac06c9eb0e11899d2
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agodisable multiarch for error-drop 87/18187/1
Filip Tehlar [Mon, 11 Mar 2019 12:54:56 +0000 (05:54 -0700)]
disable multiarch for error-drop

this is a workaround that avoids building/linking other archs for error-node.
Combination error-node + avx512 arch triggers a crash in pg during
test run.

Change-Id: I6ed39fdf0a58f82d951082b1cf91ab2a57d8108c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoVPP-1533: Deleting a non-existent pre-resolved MAP next-hop causes VPP core dump 74/18174/2
Ole Troan [Mon, 11 Mar 2019 08:47:31 +0000 (09:47 +0100)]
VPP-1533: Deleting a non-existent pre-resolved MAP next-hop causes VPP core dump

Change-Id: I6f0830b786ac46c69c867f73b044aab174e6210b
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoVPP-1508: Tests: Fix vpp_api struct.error under py3. 30/18130/3
Paul Vinciguerra [Fri, 8 Mar 2019 01:55:33 +0000 (17:55 -0800)]
VPP-1508: Tests: Fix vpp_api struct.error under py3.

Fix struct.error: expected bytes object got <class 'str'>

Change-Id: I837ae6e97e44c789a9372677151b157956525334
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agodpo: migrate old MULTIARCH macros to VLIB_NODE_FN 06/18106/5
Filip Tehlar [Thu, 7 Mar 2019 09:42:11 +0000 (01:42 -0800)]
dpo: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I3043112c3e7584f61e64dc6d20d57604ebceb76a
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agomfib: migrate old MULTIARCH macros to VLIB_NODE_FN 03/18103/3
Filip Tehlar [Thu, 7 Mar 2019 08:30:03 +0000 (00:30 -0800)]
mfib: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I7114cd55ce1fc320d17b36cab731546fe4c58a72
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agotls: fixes and improvements 85/18085/8
Florin Coras [Wed, 6 Mar 2019 22:44:42 +0000 (14:44 -0800)]
tls: fixes and improvements

- disconnect sessions through session layer apis instead of directly
notifying the app worker.
- improve cli
- increase fifo sizes for tls app

Change-Id: I8a7d2865b3b00724e2a9da29fa4a906ea867da9b
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: fix ct that match global table entries 70/18170/3
Florin Coras [Mon, 11 Mar 2019 04:03:20 +0000 (21:03 -0700)]
session: fix ct that match global table entries

Change-Id: I42addcd413094a8b6e9b2858ba2a292bd295ec82
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoVPP-1486: stat segment file descriptor leak 67/18167/3
Ole Troan [Sun, 10 Mar 2019 20:26:14 +0000 (21:26 +0100)]
VPP-1486: stat segment file descriptor leak

Close the mmap file descriptor at first opportunity.

Change-Id: If8faa1de0a57dc7d8abb3eed97861813b841bd92
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoVPP-1508: Use scapy.compat to manage packet level library differences. 65/18165/3
Paul Vinciguerra [Sun, 10 Mar 2019 17:04:23 +0000 (10:04 -0700)]
VPP-1508: Use scapy.compat to manage packet level library differences.

Change-Id: Icdf6abc9e53d33b26fd1d531c7dda6be0bb9cb55
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoTests: fix time.sleep(0) # yield. Reduce sleep related log messages. 64/18164/2
Paul Vinciguerra [Sun, 10 Mar 2019 16:10:54 +0000 (09:10 -0700)]
Tests: fix time.sleep(0) # yield. Reduce sleep related log messages.

Reduce the incidence of:
20:04:23,606 unexpected time.sleep() result - slept for 2.187967e-03s instead of ~6.837845e-04s!

Change-Id: Ic576fda7f75e571c9019111588a6a936ee2cf5c2
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoTests: remote_test.py. Private member test catching dunder names. 61/18161/2
Paul Vinciguerra [Sun, 10 Mar 2019 14:03:22 +0000 (07:03 -0700)]
Tests: remote_test.py.  Private member test catching dunder names.

Private member check also catches __iter__, since it starts with '_'.

Fixes:
  Captured traceback:
  ~~~~~~~~~~~~~~~~~~
      b'Traceback (most recent call last):'
      b'  File "/vpp/test/test_memif.py", line 47, in tearDown'
      b'    remove_all_memif_vpp_config(self.remote_test)'
      b'  File "/vpp/test/vpp_memif.py", line 36, in remove_all_memif_vpp_config'
      b'    for d in dump:'
      b"TypeError: 'SerializableClassCopy' object is not iterable"
      b''

Change-Id: I6a3f3e0f2b1b2d0a2b97faa23bf542ff8f92de43
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoTests: use self.assertNotIn(). 87/18087/2
Paul Vinciguerra [Wed, 6 Mar 2019 23:11:28 +0000 (15:11 -0800)]
Tests: use self.assertNotIn().

Many tests use self.assertEqual(error.find("failed"), -1)
Use self.assertNotIn("failed", error) to provide more meaningful errors such as
AssertionError: 'Failed' not found in '' instead of 0 != -1.

Change-Id: I670acdc977b788b2cedf94cfeafc12097781463f
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoTests: 'Fix' __del__ in test/remote_test.py. 62/18162/2
Paul Vinciguerra [Sun, 10 Mar 2019 14:32:59 +0000 (07:32 -0700)]
Tests: 'Fix' __del__ in test/remote_test.py.

This is not a fix as much as supressing a warning.
__del__ is not a destructor.

test/remote_test.py:385:13: F821 undefined name 'cls'
            cls.vpp.poll()
            ^
test/remote_test.py:386:16: F821 undefined name 'cls'
            if cls.vpp.returncode is None:
               ^
test/remote_test.py:387:17: F821 undefined name 'cls'
                cls.vpp.terminate()
                ^
test/remote_test.py:388:17: F821 undefined name 'cls'
                cls.vpp.communicate()

Change-Id: I6f0ecf3ae5dee7f279a4e25994cc1c49470bca26
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoTest: Fix hook.py: AttributeError 29/18129/2
Paul Vinciguerra [Fri, 8 Mar 2019 01:30:28 +0000 (17:30 -0800)]
Test: Fix hook.py: AttributeError

  File "/vpp/test/hook.py", line 84, in on_crash
    self.testcase.vpp_bin, core_path)
AttributeError: 'PollHook' object has no attribute 'testcase'

Change-Id: I84d9d86a5c6a5769a43a91cf23ce8a1141f7cd12
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoPerf tune get_frame_size_info 60/18160/3
Dave Barach [Sun, 10 Mar 2019 13:44:51 +0000 (09:44 -0400)]
Perf tune get_frame_size_info

It turns out that for scalar sizes 0..24, frames are always the same
size. That range includes all current use-cases - and then some - so
get rid of the hash table. Old code preserved under #ifdef
VLIB_SUPPORTS_ARBITRARY_SCALAR_SIZES.

Change-Id: Ic005c7143c9639f77d1a0fadd2fc0e90dccb68c1
Signed-off-by: Dave Barach <dbarach@cisco.com>
5 years agovcl: update buf if whole buf cannot be done at once 59/18159/1
wuzhouhui [Sun, 10 Mar 2019 03:35:46 +0000 (11:35 +0800)]
vcl: update buf if whole buf cannot be done at once

Change-Id: I0d56d2cee012b46da848362f322d6f246f8bf4c2
Signed-off-by: wuzhouhui <wuzhouhui14@mails.ucas.ac.cn>
5 years agoSVS: cleanup default route on SVS disable 45/18145/2
Neale Ranns [Fri, 8 Mar 2019 13:36:56 +0000 (13:36 +0000)]
SVS: cleanup default route on SVS disable

Change-Id: Ie0680330dd619cfdcb72ae8fb7e2463f732cff8c
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotcp: fix rcv_wnd computation 95/18095/3
Florin Coras [Thu, 7 Mar 2019 05:16:26 +0000 (21:16 -0800)]
tcp: fix rcv_wnd computation

Change-Id: I3cecffae2e30233d4725bd3eaf5ff4a8ff194fae
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession/tcp/vcl: fixes and optimizations 94/18094/5
Florin Coras [Thu, 7 Mar 2019 05:13:42 +0000 (21:13 -0800)]
session/tcp/vcl: fixes and optimizations

Change-Id: Idc7dfe743399dd8dee0f6b3ec83f194f3fca580b
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: fix window probes in fin-wait-1 88/18088/4
Florin Coras [Thu, 7 Mar 2019 00:51:58 +0000 (16:51 -0800)]
tcp: fix window probes in fin-wait-1

Change-Id: Idf060f385f4d9b2f42fdab6a1d372727beb8b19e
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: reorganize session fields 82/18082/4
Florin Coras [Wed, 6 Mar 2019 20:04:24 +0000 (12:04 -0800)]
session: reorganize session fields

Change-Id: I7f3b015ea6750c9773e4285bb63b0d44fa2177b9
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoupdates now that flags are supported on the API 31/18131/2
Neale Ranns [Fri, 8 Mar 2019 08:14:21 +0000 (00:14 -0800)]
updates now that flags are supported on the API

Change-Id: I9c45f390a6454c114f12f9c46c3a93fcecffa73f
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoparse ethernet header in ct6_in2out 27/18127/2
Dave Barach [Thu, 7 Mar 2019 21:18:55 +0000 (16:18 -0500)]
parse ethernet header in ct6_in2out

fix a debug CLI scripting bug: cp_ip6_address_add_del_command_function
ate any subsequent commands, yielding indigestion.

Change-Id: Iaca7bed5687759da36ae91dc658e758549b71796
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoTests: Refactor payload_to_info() 81/18081/5
Paul Vinciguerra [Wed, 6 Mar 2019 19:58:06 +0000 (11:58 -0800)]
Tests: Refactor payload_to_info()

All callers of payload_to_info were required to wrap payload with str().
Refactor to call scapy's payload.load for raw payloads or specify the
specific fieldname.

Change-Id: I1c80599d4df8dc129dbb8274733afaad406d5bcf
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoVPP-1508: Python3 tests. Explicitly specify string formatting. 72/18072/5
Paul Vinciguerra [Wed, 6 Mar 2019 16:23:58 +0000 (08:23 -0800)]
VPP-1508: Python3 tests.  Explicitly specify string formatting.

.format() doesn't understand what to do with binary values by default.
Specify that we expect coersion to string.

Change-Id: Ic4b697f70852124dc85ab231f76b7934d0d71f4d
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoVPP-1508: test_acl_plugin vapi changes for Python3. 89/18089/7
Paul Vinciguerra [Thu, 7 Mar 2019 03:06:19 +0000 (19:06 -0800)]
VPP-1508: test_acl_plugin vapi changes for Python3.

Change-Id: I0863cefa523a6d7c11e48649b03f058130e5a4ee
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agovpp_papi: Adjust aenum import for python3. 26/18126/2
Paul Vinciguerra [Thu, 7 Mar 2019 19:26:23 +0000 (11:26 -0800)]
vpp_papi: Adjust aenum import for python3.

The stdlib introduced IntEnum in python 3.4 and IntFlag in python 3.6.

Change-Id: I3ac278a9d5a97eefa9fc4f1491f0cd030e40c3b2
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agomake-test: Python pep8 compliance for sequences 80/18080/2
Naveen Joy [Wed, 6 Mar 2019 18:41:06 +0000 (10:41 -0800)]
make-test: Python pep8 compliance for sequences

For sequences, (strings, lists, tuples), use the fact that
empty sequences are false. A tiny change towards getting
full pep8 compliance, which will look good.
Yes: if not seq:
     if seq:
No:  if len(seq):
     if not len(seq):
(https://www.python.org/dev/peps/pep-0008/)

Change-Id: I6b565bef424f81afc66aba3b0041a5029a9f8954
Signed-off-by: Naveen Joy <najoy@cisco.com>
5 years agoHonor vnet_rewrite_data_t data_bytes == 0 20/18120/2
Dave Barach [Thu, 7 Mar 2019 15:06:52 +0000 (10:06 -0500)]
Honor vnet_rewrite_data_t data_bytes == 0

Avoid the cache miss consequences of spraying [functionally harmless]
junk into un-prefetched rewrite space. As things stand, several tunnel
encap rewrites set rewrite data_bytes = 0, and take a performance hit
due to unwanted speculative copying.

Should be performance-neutral in speed-path cases, which won't execute
the added check.

Change-Id: Id83c0325e58c0f31631b4bae5a06457dfc7ed567
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoFix typo in feature arc constraint 18/18118/2
Dave Barach [Thu, 7 Mar 2019 14:28:15 +0000 (09:28 -0500)]
Fix typo in feature arc constraint

Also, increase ip6 address field width in "show ip6 conn verbose"
output

Change-Id: If7d1bcd439d94a22d1f1c6c1298cb30aba13d0a2
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoassign flood_class to vnet_sw_interface_t template in subif api handle function 98/18098/2
Joe Zhou [Thu, 7 Mar 2019 07:05:32 +0000 (23:05 -0800)]
assign flood_class to vnet_sw_interface_t template in subif api handle function

Change-Id: I352f4a4adcf8771c21530657efcaecb532416612
Signed-off-by: Joe Zhou <zhouyoucn@qq.com>
5 years agoRemove local REPLY_MACRO so that socket transport works. 12/18112/3
Ole Troan [Thu, 7 Mar 2019 12:03:26 +0000 (13:03 +0100)]
Remove local REPLY_MACRO so that socket transport works.

memif, lacp, nsh and cdp used local REPLY_MACROs.
Remove and use those in api_helper.h

Change-Id: Ib01d6ae5cff0b6f1cef90996a54b3177f0c53463
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoipsec: cli bug fixes 09/18109/2
Kingwel Xie [Thu, 7 Mar 2019 11:34:30 +0000 (06:34 -0500)]
ipsec: cli bug fixes

1. fix wrong assignemnt of lik/rik
2. keys initialized to 0, to avoid using random data
   in stack. could cause memory overlapped then crash
3. show sa->id in hex format

Change-Id: Id0430aa49bb55c27cee4f97f8c0e4ec87515dcd2
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agoAPI: Add python2.7 support for enum flags via aenum 08/18108/2
Ole Troan [Thu, 7 Mar 2019 10:28:32 +0000 (11:28 +0100)]
API: Add python2.7 support for enum flags via aenum

Change-Id: I77a43bfb37d827727c331cd65eee77536cc15953
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoBIER: trace then drop. MPLS: trace the drops 68/18068/2
Neale Ranns [Wed, 6 Mar 2019 16:07:34 +0000 (08:07 -0800)]
BIER: trace then drop. MPLS: trace the drops

Change-Id: I952e6aec6487270a79c4d92cfe828cc55d42d536
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agogdb-helper: add gdb_show_traces 16/18016/2
Kingwel Xie [Tue, 5 Mar 2019 10:06:48 +0000 (05:06 -0500)]
gdb-helper: add gdb_show_traces

gdb_show_traces() dumps buffer traces.

Ease gdb debugging when vpp crashed...

Change-Id: Ib24314832386ee4defc2d31cbb4c05d293fb3338
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agoclassify: migrate old MULTIARCH macros to VLIB_NODE_FN 61/18061/2
Filip Tehlar [Wed, 6 Mar 2019 12:50:34 +0000 (04:50 -0800)]
classify: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I01730ec9eb8033074c8710daf0848c3573293aeb
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agopolicer: migrate old MULTIARCH macros to VLIB_NODE_FN 60/18060/2
Filip Tehlar [Wed, 6 Mar 2019 12:28:32 +0000 (04:28 -0800)]
policer: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I88d2632fa451dbafbc212dd142a67fe5ec4cd610
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agovlibmemory: coverity woes 46/18046/3
Steven Luong [Wed, 6 Mar 2019 04:07:31 +0000 (20:07 -0800)]
vlibmemory: coverity woes

Coverity complains about resource leak after open when fd gets 0 with below
warning.

off_by_one: Testing whether handle tfd is strictly greater than zero is
suspicious. tfd leaks when it is zero.

It is right. 0 is a valid fd. -1 is not.

Change-Id: I22c2eb75b99bb6209921b9f874190cbbdf10e6ce
Signed-off-by: Steven Luong <sluong@cisco.com>
5 years agoAdd VAT support for LB 32/17632/8
Hongjun Ni [Mon, 18 Feb 2019 15:26:48 +0000 (23:26 +0800)]
Add VAT support for LB

Change-Id: I61d8c35f48a059968909fc8523bd313fc4799389
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
5 years agosession/tls: remove unused t_app_index field 79/18079/3
Florin Coras [Wed, 6 Mar 2019 19:01:31 +0000 (11:01 -0800)]
session/tls: remove unused t_app_index field

Change-Id: Idbf7f3a57dc399798b8dba9463daeb7d66470ab1
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoipsec: ipsec-if optimizations & bug fixes 96/18096/2
Kingwel Xie [Thu, 7 Mar 2019 06:25:32 +0000 (01:25 -0500)]
ipsec: ipsec-if optimizations & bug fixes

1. changed to vlib_buffer_enqueue_to_next
2. error counter fixes; stats added to last_sw_if_index
   when interface changed
3. udp-encap support

Change-Id: I70b0814aa37181fea4d70fa3c96c608adb5afe49
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agosession: use transport custom tx for app transports 78/18078/3
Florin Coras [Wed, 6 Mar 2019 18:44:38 +0000 (10:44 -0800)]
session: use transport custom tx for app transports

Change-Id: I675f7090fa6b2ffdfb4ee748df858bfb7e39ce5a
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: cleanup instances of deprecated io evts 76/18076/3
Florin Coras [Wed, 6 Mar 2019 18:09:04 +0000 (10:09 -0800)]
session: cleanup instances of deprecated io evts

Change-Id: Iad119e05ae5e570fbfcf66747c95822cee647c99
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years ago19.01.1 Release Notes 86/18086/1
Dave Wallace [Wed, 6 Mar 2019 20:56:36 +0000 (15:56 -0500)]
19.01.1 Release Notes

Change-Id: Id71e0ce821e84634d24a550188d0ed5ed7164849
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit cbd68cb711e496539c494ab64837995c126da69b)

5 years agotest framework: vpp_papi_provider.py - further cleanup 41/18041/2
Ole Troan [Tue, 5 Mar 2019 15:58:24 +0000 (16:58 +0100)]
test framework: vpp_papi_provider.py - further cleanup

Part of further cleanups of this file.
Removed most wrappers that don't have conflicting signature with
message API.

Change-Id: I6acd93d20291feb7731eb35ab2eb8c9f22f4632c
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agosctp chunk_len fix 77/18077/2
Sirshak das [Wed, 6 Mar 2019 14:51:02 +0000 (09:51 -0500)]
sctp chunk_len fix

total_length_not_including_first_buffer should only be used when
VLIB_BUFFER_TOTAL_LENGTH_VALID is set, if not it uses stale data
from previous session_chain_tail calculation to set data/chunk len.

Change-Id: I9802341e522cf9b18d0aef817f0047b76945782e
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
5 years agosession: use session index instead of fifo for evt 09/18009/12
Florin Coras [Mon, 4 Mar 2019 22:19:39 +0000 (14:19 -0800)]
session: use session index instead of fifo for evt

Avoids derefrencing fifo pointers whose segments could have been
unmapped.

Change-Id: Ifb0b7399e424f145f3f94b769391a6f4e31bb4e6
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoudp: migrate old MULTIARCH macros to VLIB_NODE_FN 67/18067/3
Filip Tehlar [Wed, 6 Mar 2019 15:16:08 +0000 (07:16 -0800)]
udp: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I2b324c77df2685a0bdfb617fb484022daf017d0b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agosession: use vpp to switch io events for ct sessions 05/18005/17
Florin Coras [Mon, 4 Mar 2019 18:56:23 +0000 (10:56 -0800)]
session: use vpp to switch io events for ct sessions

Instead of allocating pairs of message queues per cut-thru session and
having the applications map them, this uses vpp as an io event message
switch.

Change-Id: I51db1c7564df479a7d1a3288342394251fd188bb
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoipv6 connection tracking plugin 70/18070/2
Dave Barach [Wed, 6 Mar 2019 16:14:03 +0000 (11:14 -0500)]
ipv6 connection tracking plugin

A security feature: drop unsolicited global unicast traffic.

Change-Id: I421da7d52e08b7acf40c62a1f6e2a6caac349e7e
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agotcp: migrate old MULTIARCH macros to VLIB_NODE_FN 59/18059/6
Filip Tehlar [Wed, 6 Mar 2019 08:06:56 +0000 (00:06 -0800)]
tcp: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: Ifd9fa30eed343e2c5d40582b3e3aa589b070637d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoipsec: esp-encrypt and esp-decrypt cleanup 65/18065/3
Damjan Marion [Wed, 6 Mar 2019 13:05:01 +0000 (14:05 +0100)]
ipsec: esp-encrypt and esp-decrypt cleanup

Change-Id: I1e431aa36a282ca7565c6618a940d591674b8cd2
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoGBP: use sclass in the DP for policy 28/17928/7
Neale Ranns [Thu, 28 Feb 2019 11:11:39 +0000 (11:11 +0000)]
GBP: use sclass in the DP for policy

Change-Id: I154e18f22ec7708127b8ade98e80546ab1dcd05b
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoTests: Example duplicate code refactoring. 69/17969/3
Paul Vinciguerra [Fri, 1 Mar 2019 16:46:29 +0000 (08:46 -0800)]
Tests: Example duplicate code refactoring.

Refactor of duplicate methods in test/test_reassembly.py.

Change-Id: I46f880da6a0ced2acae1fa33c6892d0148b26139
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agointerface: migrate old MULTIARCH macros to VLIB_NODE_FN 02/18002/7
Filip Tehlar [Mon, 4 Mar 2019 11:33:32 +0000 (03:33 -0800)]
interface: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: Ib92e338d0becbfbc38e6b9f34f262df76b63eead
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agocop: migrate old MULTIARCH macros to VLIB_NODE_FN 12/18012/2
Filip Tehlar [Tue, 5 Mar 2019 09:22:04 +0000 (01:22 -0800)]
cop: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: Ic0c9c50376ceb0ff4e2d5e52e13b6506e68adf4b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agovxlan*: migrate old MULTIARCH macros to VLIB_NODE_FN 17/18017/2
Filip Tehlar [Tue, 5 Mar 2019 11:01:43 +0000 (03:01 -0800)]
vxlan*: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: Ide23bb3d82024118214902850821a8184fe65dfc
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agovmbus: fix bug that breaks multiple netvsc vdevs 06/18006/2
Matthew Smith [Mon, 4 Mar 2019 15:43:45 +0000 (09:43 -0600)]
vmbus: fix bug that breaks multiple netvsc vdevs

VPP supports two DPDK drivers for managing netvsc devices on
Azure/Hyper-V. The new netvsc PMD looks a lot like other PCI-based
PMDs but it requires recently added kernel support (>=4.17). The
older vdev_netvsc is an abstraction that manages the mlx4 VF
and tap device underlying the netvsc interface using the failsafe PMD.
Distros with older kernels (e.g. RHEL/CentOS 7.x) have to use vdev_netvsc.

At startup, netvsc devices are processed and an attempt is made to
initialize them for management by the netvsc PMD. If that fails, then
vlib_vmbus_bind_to_uio() returns early and the device can be initialized
for management by vdev_netvsc.

The operation that is supposed to fail if the netvsc PMD cannot be used
is registration of the netvsc device type ID with the uio_hv_generic
driver. This operation is attempted exactly once so it does not fail
for netvsc devices processed after the first one and they end up in a
state where they cannot be initialized for use by vdev_netvsc.

Only unset uio_new_id_needed if uio_hv_generic registration succeeds.

Change-Id: I6be925d422b87ed24e0f4611304cc3a6b07a34fd
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agospan: migrate old MULTIARCH macros to VLIB_NODE_FN 19/18019/2
Filip Tehlar [Tue, 5 Mar 2019 11:46:40 +0000 (03:46 -0800)]
span: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I5c671d8af8d528eae625001d4755db8ef61f00b2
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agogeneve: migrate old MULTIARCH macros to VLIB_NODE_FN 11/18011/2
Filip Tehlar [Tue, 5 Mar 2019 08:36:04 +0000 (00:36 -0800)]
geneve: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: Ie7b201b2742e0051b249acc011f609905bc178c8
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoipip: migrate old MULTIARCH macros to VLIB_NODE_FN 24/18024/2
Filip Tehlar [Tue, 5 Mar 2019 12:50:23 +0000 (04:50 -0800)]
ipip: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I9c05225b71b60dc2b419a96daeb71d89757aef98
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agosctp: migrate old MULTIARCH macros to VLIB_NODE_FN 32/18032/2
Filip Tehlar [Tue, 5 Mar 2019 14:50:19 +0000 (06:50 -0800)]
sctp: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I7248a94977fe11bbe58db53d7ca8ae8c582e7305
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agorpm: set exec bits on plugins 31/18031/2
Matthew Smith [Tue, 5 Mar 2019 15:28:48 +0000 (09:28 -0600)]
rpm: set exec bits on plugins

Install plugin shared libraries with permissions set to 0755
instead of 0644 during RPM builds.

When building with rpmbuild, if a compiled file is not executable,
it's source files and symbols are not included in the vpp-debuginfo RPM.
This makes debugging problems with DPDK (and other plugins probably)
difficult unless you are running on the machine where the build
was generated.

Change-Id: I9cc92af855a66366ec3b81a87b82bfd9994bc180
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agoip: coverity woes 43/18043/2
Steven Luong [Tue, 5 Mar 2019 23:42:21 +0000 (15:42 -0800)]
ip: coverity woes

coverity complains about logically dead code for the statement if (error) because
error was assigned to 0 prior to the check. I believe error was meant to get the
return status of the call vnet_punt_socket_add.

Change-Id: I794167493f63cb898d3618c2c28817823f46b765
Signed-off-by: Steven Luong <sluong@cisco.com>
5 years agovlib: coverity woes 42/18042/2
Steven Luong [Tue, 5 Mar 2019 23:29:22 +0000 (15:29 -0800)]
vlib: coverity woes

Remove logically dead code to keep coverity from complaining

Change-Id: If27d6684d19ab3c8886732a67922c86e5f0b3554
Signed-off-by: Steven Luong <sluong@cisco.com>
5 years agoIPSEC: tunnel encap/decap dual loop speedups 99/17999/6
Neale Ranns [Mon, 4 Mar 2019 14:13:14 +0000 (14:13 +0000)]
IPSEC: tunnel encap/decap dual loop speedups

baseline:
 ipsec0-tx 1.27e1
 ipsec-if-input 8.19e1

this change:
 ipsec0-tx 6.17e0
 ipsec-if-input 6.39e1

this also fixes the double tunnel TX counts by removing the duplicate
from the TX node.

Change-Id: Ie4608acda08dc653b6fb9e2c85185d83625efd40
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoGBP: format EPG retention policy 48/18048/3
Neale Ranns [Wed, 6 Mar 2019 07:32:46 +0000 (07:32 +0000)]
GBP: format EPG retention policy

Change-Id: I17826cfa9a27dc241e07988bf0bbaf9eca9ae525
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoGBP: learn from ARP and L2 packets 40/18040/3
Neale Ranns [Mon, 4 Mar 2019 22:08:11 +0000 (14:08 -0800)]
GBP: learn from ARP and L2 packets

Change-Id: I8af7bca566ec7c9bd2b72529d49e04c6e649b44a
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoVOM: GBP show allowed ethertypes in contracts 49/18049/1
Neale Ranns [Wed, 6 Mar 2019 07:59:15 +0000 (23:59 -0800)]
VOM: GBP show allowed ethertypes in contracts

Change-Id: I8314f51d519966b1d9aef96318f6836ace944c9a
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agopunt.c -- coverity woes 44/18044/2
Steven Luong [Tue, 5 Mar 2019 23:57:52 +0000 (15:57 -0800)]
punt.c -- coverity woes

Coverity complains about identical code is executed for if and else branch.
Clean them up by removing the useless code.

Change-Id: Ie53f1dff055440ab2c3c3d2ea91edb1e50204b38
Signed-off-by: Steven Luong <sluong@cisco.com>
5 years agoipsec: cleanup, remove unnecessary code, 45/18045/1
Kingwel Xie [Wed, 6 Mar 2019 03:56:17 +0000 (22:56 -0500)]
ipsec: cleanup, remove unnecessary code,

ipsec_proto_main moved to ipsec.c
fix missing '\0' of backend name

Change-Id: I90760b3045973a46792c2f098d9b0b1b3d209ad0
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agoVXLAN-GBP: decap checks src,dst&VNI for unicast, then checks only dst&VNI for multicast 29/18029/3
Neale Ranns [Tue, 5 Mar 2019 14:11:57 +0000 (06:11 -0800)]
VXLAN-GBP: decap checks src,dst&VNI for unicast, then checks only dst&VNI for multicast

Change-Id: I17caf3c5a2060de497c44655b66a15a2007f716b
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoGBP: format include EPG index 33/18033/1
Neale Ranns [Tue, 5 Mar 2019 16:50:18 +0000 (08:50 -0800)]
GBP: format include EPG index

Change-Id: I1789a4ea44cfc6a11ad8750074ffcf14c4ab8712
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoTest: vpp_papi_provider. __getattr__ 21/18021/3
Paul Vinciguerra [Tue, 5 Mar 2019 12:30:04 +0000 (04:30 -0800)]
Test: vpp_papi_provider. __getattr__

Replace custom __getattr__ with custom __getattribute__.

Change-Id: Ib96176abc07eefedba305ed874621001a810eb0d
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agobier: migrate old MULTIARCH macros to VLIB_NODE_FN 18/18018/2
Filip Tehlar [Tue, 5 Mar 2019 11:34:52 +0000 (03:34 -0800)]
bier: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I561591c7d31ec66dfa0a1d7ef66bcf1d0c70f07c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoqos: migrate old MULTIARCH macros to VLIB_NODE_FN 01/18001/3
Filip Tehlar [Mon, 4 Mar 2019 16:14:07 +0000 (08:14 -0800)]
qos: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I4dc77979594de0b6a21644ea0a982085c6386010
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agompls: migrate old MULTIARCH macros to VLIB_NODE_FN 22/18022/2
Filip Tehlar [Tue, 5 Mar 2019 12:32:11 +0000 (04:32 -0800)]
mpls: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I8c5f7cda655e3343d50a96d714796ea4255588b6
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoGBP: per-group EP retention policy 23/18023/2
Neale Ranns [Tue, 5 Mar 2019 12:22:08 +0000 (04:22 -0800)]
GBP: per-group EP retention policy

Change-Id: I3ed4e2e92f74f15b07fcd3e7fbc3fa8718d5249d
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agogre: migrate old MULTIARCH macros to VLIB_NODE_FN 04/18004/2
Filip Tehlar [Mon, 4 Mar 2019 17:21:59 +0000 (09:21 -0800)]
gre: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I0f6b9f306f2323216ba64b694e8fdfa116e6cc9c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoL2: ARP term - learn but don't send response to GARPs 08/18008/2
Neale Ranns [Mon, 4 Mar 2019 22:11:25 +0000 (14:11 -0800)]
L2: ARP term - learn but don't send response to GARPs

Change-Id: I766767d27f37493dc9f2bde1297c1b620cd1e321
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotest framework: Fix wrapper functions to match API message names. 10/18010/1
Ole Troan [Mon, 4 Mar 2019 22:55:43 +0000 (23:55 +0100)]
test framework: Fix wrapper functions to match API message names.

In preparation to remove the wrappers in vpp_papi_provider.py, ensure
names used in tests match the actual API message names.

Change-Id: I230ca4eb75aa727ff68d702e085a2edbbc6b6d19
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoIPSEC: script to bounce IPSEC traffic through a pipe to test encrypt and decrpyt 97/17997/5
Neale Ranns [Mon, 4 Mar 2019 13:44:42 +0000 (13:44 +0000)]
IPSEC: script to bounce IPSEC traffic through a pipe to test encrypt and decrpyt

Change-Id: I262a9412951b5df616920a8fad16c61eae96d0cc
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoFix 2x overconsumption of debug cli input bugs 98/17998/2
Dave Barach [Mon, 4 Mar 2019 13:52:54 +0000 (08:52 -0500)]
Fix 2x overconsumption of debug cli input bugs

Change-Id: I658489dc9cf437ff43d9c69a896c9fe4e01ec38e
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agotest framework: add factory function and default parameters 46/17946/6
Ole Troan [Thu, 28 Feb 2019 19:20:47 +0000 (20:20 +0100)]
test framework: add factory function and default parameters

This is the first step to be able to remove all the API message
wrappers in vpp_papi_provider.py. This allows to remove all
functions that do not override parameters (different from zero),
and a separate dictionary for messages requiring different defaults.

The general requirement is that all new tests should use named
arguments directly. Not positional arguments through the wrapper.

Note when removing functions, the calls in vpp_papi_provider
wrappers do not necessarily follow message order.

Change-Id: If64916c07f8622c138db3a9d7c4a98b93a058e68
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agolibmemif: Connection request APIs 93/17993/2
Jakub Grajciar [Mon, 4 Mar 2019 11:42:19 +0000 (12:42 +0100)]
libmemif: Connection request APIs

Add APIs that allow changing reconnect timer and request connection.
First connection request is automatically sent once slave interface is created.

Change-Id: Ie3558b7b94a780b046755f7f0ac6c3dcf07633e4
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
5 years agodevices: migrate old MULTIARCH macros to VLIB_NODE_FN 95/17995/3
Filip Tehlar [Mon, 4 Mar 2019 11:03:13 +0000 (03:03 -0800)]
devices: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I911fb3f1c6351b37580c5dbde6939a549431a92d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoGBP: return appropriate error code if tranport mode subnet has no interface 96/17996/2
Neale Ranns [Mon, 4 Mar 2019 12:21:28 +0000 (04:21 -0800)]
GBP: return appropriate error code if tranport mode subnet has no interface

Change-Id: Ic230b332a01c36454c11d0b6515ec256bd0fd5c6
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoGBP: Global config for EP retention 94/17994/2
Neale Ranns [Mon, 4 Mar 2019 10:20:04 +0000 (02:20 -0800)]
GBP: Global config for EP retention

Change-Id: I9508c67b494b5edecb2bc393a53e7d47c2574978
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoadj: migrate old MULTIARCH macros to VLIB_NODE_FN 92/17992/3
Filip Tehlar [Mon, 4 Mar 2019 10:52:54 +0000 (02:52 -0800)]
adj: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: Iac92a6d15e1feef4d97b8db09fc60901dc9f7880
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agobuffers: support cases where numa node memory is not available 50/17950/4
Damjan Marion [Thu, 28 Feb 2019 22:16:11 +0000 (23:16 +0100)]
buffers: support cases where numa node memory is not available

Change-Id: I550ef893e41d86310d4e5af16d6100b8e557b68a
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoHash and handoff reassembly fragments 84/17984/2
Vijayabhaskar Katamreddy [Sat, 2 Mar 2019 03:57:06 +0000 (19:57 -0800)]
Hash and handoff reassembly fragments

in the following two scenarios
    1. When fragments arrive in multiple interfaces and endup in different threads
    2. When fragments arrive in same interafce but in different queues due to interface RSS doesnt have the ability to place fragments in the right queues

Change-Id: I9f9a8a4085692055ef6823d634c8e19ff3daea05
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
5 years agostats: fix crash on early init 32/17932/6
Filip Tehlar [Thu, 28 Feb 2019 12:36:10 +0000 (04:36 -0800)]
stats: fix crash on early init

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