4985 Commits

Author SHA1 Message Date
Neale Ranns
713322bd32 Integer underflow and out-of-bounds read (VPP-1442)
Change-Id: Ife2a83b9d7f733f36e0e786ef79edcd394d7c0f9
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-11 20:51:14 +00:00
Matus Fabian
33f276e0af NAT44: identity NAT fix (VPP-1441)
Change-Id: Ic4affc54d15d08b9b730f6ec6146ee053b28b4b6
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-10-11 20:40:02 +00:00
Andrew Yourtchenko
7212e61d92 acl-plugin: reduce the syslog level for debug messages (VPP-1443)
Change-Id: Ie8380cb39424548bf64cb19aee59ec20e29d1e39
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-10-11 19:35:26 +00:00
Andrew Yourtchenko
376414f4c3 vnet: complete the fix for l3_hdr_offset calculation for single loop fastpass case (VPP-1444)
20e6d36b has moved the calculation of the l3_hdr_offset into the determine_next_node()
function, with the assumption that the current_data in the buffer is at
the L3 header. This is not the case for the single loop fastpath,
where the vlib_buffer_advance() call is made after the call to
determine_next_node(), as a day1 behavior. As a result - that path
incorrectly sets the l3_hdr_offset.

Solution: move the vlib_buffer_advance() call to before determine_next_node()

Change-Id: Id5eaa084c43fb6564f8239df4a0b3dc0412b15de
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-10-11 17:48:27 +00:00
Damjan Marion
5551e41f78 Fix vpp-ext-deps package version in stable branch
Change-Id: Ifb33622b50113501f1d23ab94ba9da708678d6be
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-11 17:13:35 +00:00
Marco Varlese
90395743d3 Update .gitreview for stable 18.10 branch
Change-Id: I9f3d551acad6fd2fdd733f7f49e8c75ef43ceebc
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
v18.10-rc1
2018-10-10 09:38:07 +02:00
Sirshak Das
4f611176e9 vppinfra: Fix extendto_high aarch64 NEON api.
This fixes the l2BD and ip4 test case failures.
Fixes VPP-1432, VPP-1428, VPP-1430

Change-Id: I48b5c961bab60cc3b39fcd6db47e098c81579480
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
v19.01-rc0
2018-10-09 13:08:03 -05:00
Jakub Grajciar
7d476e03aa memif: coverity fix
Change-Id: I2b14e2a035a37b04816aac1e610146be58ad1e92
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-10-09 10:07:41 +02:00
Ole Troan
de728ac3c0 API: Spurious timeouts from timeout thread.
Change-Id: I1be1101ba4d82688a32b5ae2c39ca5d92dc244b7
Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-09 07:23:29 +00:00
Andrew Yourtchenko
20e6d36bca vnet: ethernet-input incorrectly sets l3_hdr_offset in some cases
The issue surfaced when developing the tap GSO code, with
an iteration where output path is reliant on
vnet_buffer (b0)->l3_hdr_offset being set correctly in
the input path, during performance testing.

Adding a workaround in the TX path shows that
the issue surfaces only for relatively few packets
during the test (about 100 out of 600000).

Analysis shows the issue arises if the ethernet-input
is handling two untagged packets with different sw_if_index
values - then the accelerated path punts to slow path,
before the setting of the l2.l2_len values is done,
thus resulting in them being 0, and l3_hdr_offset being
the same as l2_hdr_offset, wreaking havoc on TX path.

The solution is to move the l2_hdr_offset calculation
into a place where it is done for all the packets,
and move the l3_hdr_offset calculation into
the determine_next_node() function - as that function is
also the one setting the special-case l2.l2_len value for
tagged packets and moving the current_data for the L2 case.

Change-Id: If728c7715e011930c1887691188c98055bddde67
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-10-09 01:24:43 +00:00
Jakub Grajciar
4a0559a804 memif: socket filename add/del bugfix
Check access rights using effective user/group IDs

Change-Id: I3683258c24bcd7817024bffbd56b54b2f596fdd7
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-10-08 17:44:58 +00:00
Vijayabhaskar Katamreddy
cef5db0acd Adding Multipath support for exclusive DPO based fib path entries via rpath
Change-Id: I3c84daf046dbad972b36e48fa2548bbe20c7b338
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
2018-10-08 14:43:21 +00:00
Hongjun Ni
c210cb50e8 Fix coverity issue for NSH plugin
Change-Id: Ie99ff9aebe3c896e3e104a5a7bebd84f7766e713
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-10-08 13:40:32 +00:00
Ole Troan
3620e61dec Stats: prometheus export coverity errors.
Change-Id: Ibc0a25dcf7d734215e0cffe789b5726f23e1c3d7
Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-08 12:27:24 +00:00
Matus Fabian
e2f4e2f175 NAT44: do not create session record for identity mapping (VPP-1439)
Change-Id: I39a3146a4e4ba8eadf50af7113b9ae6b1c1d688f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-10-08 11:46:23 +00:00
Neale Ranns
2fd4b56aea replicate trace fix
Change-Id: I785ecadbf30812a500629870aa717e64f4cf0cdd
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-08 08:14:57 +00:00
Florin Coras
1502fc303b vcl: cleanup and fixes for vcl test code
- better approximate time when test finishes
- move common vcl and sock test code to vcl_test.h
- overall refactor of variable names

Change-Id: I8e6b43fc017cd05a0ddaa3891767a44fb300c09e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-07 18:17:04 +00:00
Florin Coras
58c101adf0 vcl: use want_tx_evt for ct sessions
Change-Id: Id46c651c41b1c633326081583ee3383e27ef475d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-07 12:39:47 +00:00
Steven
318de5de97 bond: active-backup mode is using the wrong load balance algo
active-backup mode is using l2 load balance algo. It should be using
active-backup. Also notice that the output is missing a character.

vpp# create bond mode active-backup
create bond mode active-backup
vpp# sh bond
sh bond
interface name   sw_if_index  mode         load balance  active slaves  slaves
BondEthernet0    6            xor          l34           2              2
BondEthernet1    9            xor          l34           1              1
BondEthernet2    10           active-backu l2            0              0
vpp#

Change-Id: If5ed0cc6c25f6c2ddabec15ff6188b34923d38e3
Signed-off-by: Steven <sluong@cisco.com>
2018-10-06 22:33:41 -07:00
Damjan Marion
b7620fdfd5 vfio: don't display error if no pci devices are assigned to container
Change-Id: I21429ce084cfd39af6a9997b4c1e459f5a6ef672
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-05 18:02:13 +00:00
Damjan Marion
16de39e1a1 bond: tx perf improvement, part trois
Introduce bond_tx_inline which takes lb as a constant for gcc to do the optimization

The number appears a tad better for 256 bytes frame.

with the patch
--------------
Thread 2 vpp_wk_1 (lcore 3)
Time 4.3, average vectors/node 224.00, last 128 main loops 40.00 per node 222.61
  vector rates in 8.4836e6, out 1.6967e7, drop 0.0000e0, punt 0.0000e0
             Name                 State         Calls          Vectors        Suspends         Clocks       Vectors/Call
BondEthernet0-output             active             141054        36109824               0          2.51e1          256.00
BondEthernet0-tx                 active             141054        36109824               0          2.55e1          256.00
TenGigabitEthernet6/0/0-output   active             141054        18055469               0          9.43e0          128.00
TenGigabitEthernet6/0/0-tx       active             141054        18055469               0          6.97e1          128.00
TenGigabitEthernet6/0/1-output   active             141054        18054355               0          9.54e0          127.99
TenGigabitEthernet6/0/1-tx       active             141054        18054355               0          7.05e1          127.99
bond-input                       active             141054        36109824               0          1.76e1          256.00
dpdk-input                       polling             70527        36109824               0          5.03e1          512.00
ethernet-input                   active             141054        36109824               0          6.12e1          256.00
ip4-input                        active             141054        36109824               0          3.26e1          256.00
ip4-lookup                       active             141054        36109824               0          2.94e1          256.00
ip4-rewrite                      active             141054        36109824               0          3.27e1          256.00

without the patch
-----------------
Thread 2 vpp_wk_1 (lcore 3)
Time 4.3, average vectors/node 224.00, last 128 main loops 40.00 per node 222.61
  vector rates in 8.4443e6, out 1.6889e7, drop 0.0000e0, punt 0.0000e0
             Name                 State         Calls          Vectors        Suspends         Clocks       Vectors/Call
BondEthernet0-output             active             142744        36542464               0          2.51e1          256.00
BondEthernet0-tx                 active             142744        36542464               0          2.67e1          256.00
TenGigabitEthernet6/0/0-output   active             142744        18270813               0          9.19e0          127.99
TenGigabitEthernet6/0/0-tx       active             142744        18270813               0          6.98e1          127.99
TenGigabitEthernet6/0/1-output   active             142744        18271651               0          9.43e0          128.00
TenGigabitEthernet6/0/1-tx       active             142744        18271651               0          7.02e1          128.00
bond-input                       active             142744        36542464               0          1.76e1          256.00
dpdk-input                       polling             71372        36542464               0          5.08e1          512.00
ethernet-input                   active             142744        36542464               0          6.15e1          256.00
ip4-input                        active             142744        36542464               0          3.23e1          256.00
ip4-lookup                       active             142744        36542464               0          2.96e1          256.00
ip4-rewrite                      active             142744        36542464               0          3.28e1          256.00

Change-Id: I9fd43eda3c735cbff680ac6d2f01ecdae81f0eda
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-05 10:00:12 -07:00
Neale Ranns
ccc70f6c6e Source VRF Select tests
Change-Id: Id6c16462fccf890eaa0e526ad048e032c9da8800
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-05 16:25:55 +00:00
Dave Barach
f9faf2420c DOC ONLY: clean up plugin documentation
The old "sample_plugin" page was stuffed with superceded autotools
build information, so it morphed into an "add a new plugin" page based
on the emacs-lisp plugin generator.

Before sending hate mail about emacs, please *look* at the new
document: you'll find running the plugin generator hard to tell from
running a shell script.

Change-Id: I84da45675e838c05faeca05c8f7be45d8c7bff13
Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-05 13:48:00 +00:00
Scott Keeler
25c4d396ea docs: add contiv vpp
Change-Id: I92227fc4968fc6a478beb7f38707b91e9f0635ec
Signed-off-by: Scott Keeler <skeeler@cisco.com>
2018-10-05 13:47:42 +00:00
Juraj Sloboda
2d24cd0272 NAT: convert remaining clib_warning to nat_log_*
Change-Id: Ie999ab852cc3775ec90820624d97be746d2590a4
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-10-05 13:32:55 +00:00
Paul Vinciguerra
98afc711c5 node_cli: Give the user a hint as to the problem.
tested with:
DBGvpp# show node foo
show node: unknown node name: 'foo'

DBGvpp# show node error-drop
node error-drop, type internal, state active, index 543
node function variants:
    ...

DBGvpp# show node error-drop bar
show node: unknown input 'bar'

Change-Id: I896cee9e60028a189dce83666fa4d32a14983a7b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-10-05 11:47:18 +00:00
Florin Coras
326b81e30e session: fix local session tagging and cleanup
Change-Id: I0d42a0c71fea7dd669fb1fe5ded7e6e944245c7d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-05 11:40:58 +00:00
Juraj Sloboda
b3f9050331 vhost_user: Add test for interface states and events
Change-Id: I2c330945bb0b07f649f574a055bfbea455e5d0b3
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-10-05 10:13:18 +02:00
John Lo
d63abff00f On interface deletion - make sure any vlan qinq table is cleared
Change-Id: Ie9bb1cfce2369b448ca55a21b2f8b8bbbb81c59c
Signed-off-by: John Lo <loj@cisco.com>
2018-10-05 06:25:32 +00:00
Ian Wells
412ecd320a Improve ip_mroute_add_del documentation
Change-Id: Ieb882cc67c37bf591b6c737234263c7c35416e6d
Signed-Off-By: Ian Wells <iawells@cisco.com>
2018-10-05 03:46:48 +00:00
Eyal Bari
efd9cf302f vxlan:ip4 decap:remove access to tunnel object
store local/remote addresses + vrf + vni in hash key
store complete decap info in hash value (sw_if_index + next_index +
error)

this removes the need to access the tunnel object when matching both
unicast and mcast.

however for mcast handling it requires 3 hash lookups:
* one failed unicast lookup (by src+dst addrs)
* lookup by mcast(dst) addr .
* unicast lookup (tunnel local ip as dst + pkt's src addr)

where previously it needed 2:
* lookup by src to find unicast tunnel + compare dst to local addr
(failing for mcast)
* lookup by mcast to find the mcast tunnel

Change-Id: I7a3485d130a54194b8f7e2df0431258db36eceeb
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-10-05 03:25:39 +00:00
Florin Coras
dc7b1aa1e3 vcl: fix test throughput computation
Change-Id: I78260cd1a412e93a5d6686888b6ea17f52245a4a
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-04 18:47:53 +00:00
Juraj Sloboda
3048b63de9 Support reassembly for fragments coming to ip4-local node
Change-Id: I3aa4708c1c3cdda344f282d56b617677080eaaa1
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-10-04 17:55:10 +00:00
Andrew Yourtchenko
6f40a8a4c5 acl-plugin: tuplemerge: avoid batch-resize of the applied entries vector - VPP-1352
If the number of rules within a given partition exceeds the limit,
the split_partition() might get called, in which we calculate
the relaxed mask, create a new partition with that mask and
attempt to reallocate some entries from the overcrowded partition.

The non-TM code was pre-expanding the vector with rules by
the number of rules in the new ACL being applied - which
caused the split_partition() to iterate over the rules
filled with zeroes. Most of the time it is benign, but
if a newly created relaxed partition is such that these
entries can be "relocated", then the code attempts to
do so, which does not end well.

Change-Id: I2dbf3ccd29ff97277b21cdb11c4424ff0915c3b7
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-10-04 17:53:44 +00:00
Florin Coras
a44d6b133b udp_echo: fix cut-through server mode
Change-Id: I20dd2071c936eb2c1870d45860553007c8e20587
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-04 17:51:30 +00:00
Neale Ranns
3e42ebe6ab MFIB-API: when programming an (S,G) fix the grp-len
Change-Id: I97052d29080501de53fe95499c860faf0765e81d
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-10-04 17:50:59 +00:00
Neale Ranns
2329e090fc clib_count_equal_*: don't read of the end of a small array and init data only if used (VPP-1429)
Change-Id: I8afa57ecca590698d3430746968aa0a5b0070469
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-04 15:28:42 +00:00
Marco Varlese
29d22c5206 VPP-1430: remove unnecessary padding
A copy/paste mistake caused to add padding to the buffer used to send
data.

Change-Id: I04d8dfec4ae195927be1675c5ce8b30230d5b376
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-10-04 12:36:04 +00:00
John Lo
06fda9cea9 Fix handling of mpls_tunnel_add_del API
Handles next_hop_weight, next_hop_preference and next_hop_table_id
properly in vl_api_mpls_tunnel_add_del_t_handler(). Also updated
vpp_api_test and custom_dump handling of related APIs.

Change-Id: I89e211bfa3b9d8ead396b24b3c46b7c7f6511f44
Signed-off-by: John Lo <loj@cisco.com>
2018-10-04 07:46:10 +00:00
Steven
744da656d3 vmxnet3: coverity woe
Coverity complains that hb might be null when !prev_b0 is true. It may be right, but not likely.
To make the code more explicit when it parses a complete packet, set got_packet = 1 and test
got_packet instead of prev_b0 which is somewhat obscure.

Use vlib_buffer_free_one rather than vlib_buffer_free_no_next in output.c which takes care of
chain buffers.

Change-Id: I6e0587605fdc622c3f55fedd74c474666631ed91
Signed-off-by: Steven <sluong@cisco.com>
2018-10-03 22:33:29 -07:00
Dave Barach
5958769b2c LISP ONLY: maintain the make-plugin.sh script
Make sure it's invoked in .../src/plugins

Change-Id: I85a05dbd863f3254c017962f635d505482548979
Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-03 17:42:20 -04:00
Dave Barach
3f2e775e45 LISP ONLY: maintain the emacs lisp plugin generator
Add a generator for CMakeLists.txt, remove autotools input generator.

Add missing extern declarations for node registrations in <plugin-name>.h.

Remove extern from the <plugin-name>_main_t declaration in
<plugin-name>.c, so it won't come up undefined at runtime.

Reposition forward node declaration relative to CLIB_MARCH_VARIANT
conditional, to avoid multiple definition / "<plugin-name>_node
changed size from X to Y" warnings.

Change-Id: I8cc00bca5c40fa3ea00549411a3a9027f97a4826
Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-03 16:10:28 -04:00
Andrew Yourtchenko
d760f79cb8 test framework: add shell-style wildcard matching to filenames
Currently, one can either use "*" to denote all filenames,
or to give the specific file name to run the tests in.
This commit adds the possibility to run all tests
matching the shell wildcard, e.g. TEST="test_acl_plugin*"
will execute all ACL plugin testcases.

Change-Id: I9048a601958947c7b757c3dfd57b19cdd8a1e3c0
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-10-03 17:39:21 +00:00
Klement Sekera
611864f4bd ipsec: add missing ipv6 ah code & ipv6 tests
Change-Id: I89e90193ded1beb6cb0950c15737f9467efac1c3
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-10-03 17:38:41 +00:00
Florin Coras
400ded3642 session: fix first segment manager cleanup
Change-Id: I750db7617ff9fd36647743094e0fa855e7dada86
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-03 17:38:14 +00:00
Juraj Sloboda
7a40133d33 memif: include interface name in logs
Change-Id: I67f58aa93c721dbd518cc2ddcea330006693662f
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-10-03 17:37:48 +00:00
Dave Barach
7cd368f7be VPP-1440: clean up coverity warnings
Change-Id: Ie315d4e83c0575d82aee0369ef50e8dd2dad6a2a
Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-03 17:10:44 +00:00
Paul Vinciguerra
3b4a6a1bb0 VPP-1426: CLI crash on 'set int feature'
Change-Id: Ib2221a43347c66940b6b5f71914a451ca4627d2f
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-10-03 16:50:07 +00:00
Florin Coras
2881dec863 sock api: fix registrations and client reads
- When clients connect, instead of returing registration indicies return
handles. By convention socket registrations will have the MSB set to 1.
This makes it easy to distinguish them from shm registrations.
- Fix client reads to allow for messages larger than 4kB (needed for the
creat reply wherein the message table is provided).

Change-Id: I7bc0a072d066dffbf2e3ad9ba3ed50291231af9d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-03 16:42:38 +00:00
Ole Troan
5bdd55831e stat_client.c coverity error.
Change-Id: Ic072beb8882981425f436936f239e8c8bf229a99
Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-03 16:08:25 +00:00