vpp.git
5 years agoFix stat_segment.c issue. 29/15429/4
Paul Vinciguerra [Sat, 20 Oct 2018 21:51:14 +0000 (14:51 -0700)]
Fix stat_segment.c issue.

* using default socket name even when overridden in config.

Change-Id: I1849bf5269629873afd1dd48d2df785a491781c3
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agostats: Add wrapper for vec_free 38/15438/2
Ole Troan [Mon, 22 Oct 2018 07:41:29 +0000 (09:41 +0200)]
stats: Add wrapper for vec_free

The result vector from stat_segment_ls must be freed
by the caller. Add wrapper for non-C language bindings.

Change-Id: I7eee7f80ec98b41696d354add47b26978e12ef0f
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoipsec: split ipsec nodes into ip4/ip6 nodes 07/15207/7
Klement Sekera [Tue, 9 Oct 2018 14:05:48 +0000 (16:05 +0200)]
ipsec: split ipsec nodes into ip4/ip6 nodes

Change-Id: Ic6b27659f1fe9e8df39e80a0441305e4e952195a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agodpdk: use rte_vfio_dma_map API instead of digging for vfio fd 28/15428/6
Damjan Marion [Sat, 20 Oct 2018 21:26:46 +0000 (23:26 +0200)]
dpdk: use rte_vfio_dma_map API instead of digging for vfio fd

This is new API introduced in DPDK 18.08.

Change-Id: I66d49fe54a6abf2af621b597e8d4535e29cecec4
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agolisp-gpe: register udp port only if enabled (VPP-1468) 31/15431/2
Florin Coras [Sun, 21 Oct 2018 17:50:48 +0000 (10:50 -0700)]
lisp-gpe: register udp port only if enabled (VPP-1468)

Change-Id: I7d0930a19d927bbd7ba3fc879d5a0c8064827629
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: count first lost hole (VPP-1465) 27/15427/3
Florin Coras [Sat, 20 Oct 2018 00:49:00 +0000 (17:49 -0700)]
tcp: count first lost hole (VPP-1465)

Change-Id: I3ac136e2a10796d8fa86ddb6f0d6cabe5fa749f8
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agodpdk: add netvsc PMD 12/15312/3
Stephen Hemminger [Tue, 16 Oct 2018 00:50:46 +0000 (17:50 -0700)]
dpdk: add netvsc PMD

Teach DPDK plugin about the netvsc Poll Mode Driver.
The speed of the Netvsc device matches the speed of the external
port on the underlying vswitch. Therefore 1G, 10G, 25G, 56G and
even 100G are possible.

Change-Id: I14ab6907b7d8d350b63a083409d45fb9c348a364
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agodpdk: turn off unused DPDK components 24/15424/2
Stephen Hemminger [Fri, 19 Oct 2018 19:29:57 +0000 (12:29 -0700)]
dpdk: turn off unused DPDK components

DPDK has added a lot more drivers and config options that are not
used by current VPP code.

Change-Id: I385f8b5df02b95a31ca9abe506c79cf52e99a24c
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agoacl-plugin: use the L2 feature arc infrastructure instead of L2 classifier for plumbing 65/15165/9
Andrew Yourtchenko [Sat, 6 Oct 2018 07:26:02 +0000 (09:26 +0200)]
acl-plugin: use the L2 feature arc infrastructure instead of L2 classifier for plumbing

This makes ACL plugin use the new feature arcs, which slightly increases performance.

Since for ethertype whitelisting we were using the L2 classifier, to retain
the functionality, make a simple node doing that, and plug it into non-ip
L2 feature arc whenever needed.

Change-Id: I3add377a6c790117dd3fd056e5615cb4c4438cf4
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agopipes: fix the l2.l2_len and the l[23]_hdr_offset setting behavior of pipe-rx node... 02/15302/5
Andrew Yourtchenko [Tue, 16 Oct 2018 10:04:51 +0000 (12:04 +0200)]
pipes: fix the l2.l2_len and the l[23]_hdr_offset setting behavior of pipe-rx node to match that of ethernet-input node

Since pipe-rx is a sibling node of ethernet-input, it ought to perform similarly: set l2/l3 header offsets,
and l2.l2_len value if the interface is in the l2 mode.

The use cases of pipes do not assume the tagged traffic, so
assume the simple ethernet header.

Change-Id: I7c9b5f4f2b1402cfbd10513f76cdd59b2db7a7a6
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agodpdk: use rx/tx_offload_names to format 25/15425/2
Stephen Hemminger [Fri, 19 Oct 2018 20:20:12 +0000 (13:20 -0700)]
dpdk: use rx/tx_offload_names to format

Rather than keeping our own list of offload capabalities, use the
function in 18.08 or later to decode the value.

Also, introduce a formatter to convert to lower case because
DPDK API returns upper case names.

Change-Id: I87546fa2bec67f8a8b44288f5994514114cb6faf
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agoavf: fix crash in rss key calculation 13/15413/2
Damjan Marion [Fri, 19 Oct 2018 14:50:41 +0000 (16:50 +0200)]
avf: fix crash in rss key calculation

Change-Id: Id13a0b6ed54885babf679f05207170e36709d9fa
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agovppinfra: use memfd_create for hugepage mounts if supported 92/15392/2
Damjan Marion [Fri, 19 Oct 2018 10:54:42 +0000 (12:54 +0200)]
vppinfra: use memfd_create for hugepage mounts if supported

Starting with kernel 4.14 hugepage fd can be retrieved with
memfd_systemcall

Change-Id: I0f3bd6d0a7757ffe7b98e83763502013ac763ecb
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoNAT44: fix ICMP virtual fragmentation reassembly (VPP-1466) 93/15393/1
Matus Fabian [Fri, 19 Oct 2018 11:01:19 +0000 (04:01 -0700)]
NAT44: fix ICMP virtual fragmentation reassembly (VPP-1466)

Change-Id: I8006bca02948d9121f474a3d14f0576747bb3c51
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agovppinfra: add atomic macros for __sync builtins 81/15181/5
Sirshak Das [Wed, 3 Oct 2018 22:53:51 +0000 (22:53 +0000)]
vppinfra: add atomic macros for __sync builtins

This is first part of addition of atomic macros with only macros for
__sync builtins.

- Based on earlier patch by Damjan (https://gerrit.fd.io/r/#/c/10729/)
Additionally
- clib_atomic_release macro added and used in the absence
of any memory barrier.
- clib_atomic_bool_cmp_and_swap added

Change-Id: Ie4e48c1e184a652018d1d0d87c4be80ddd180a3b
Original-patch-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
5 years agoAdd pool_get_zero, pool_get_aligned_zero macros 81/15381/2
Dave Barach [Thu, 18 Oct 2018 19:37:49 +0000 (15:37 -0400)]
Add pool_get_zero, pool_get_aligned_zero macros

Shorthand for the pattern:

   pool_get (<pool>, ep);
   memset (ep, 0, sizeof(*ep));

Should have done this years ago.

Change-Id: Ideeb27a79ff4ca3e9a077c973b297671d1fa2d26
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agotcp: fix sacks lost bytes counting (VPP-1465) 56/15356/6
Florin Coras [Thu, 18 Oct 2018 06:34:54 +0000 (23:34 -0700)]
tcp: fix sacks lost bytes counting (VPP-1465)

Change-Id: Ie46b3a81de4ed39b7b40e3879436f7e5a2908d98
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotls: fix connection failures/interrupts at scale (VPP-1464) 53/15353/5
Florin Coras [Wed, 17 Oct 2018 21:53:11 +0000 (14:53 -0700)]
tls: fix connection failures/interrupts at scale (VPP-1464)

Change-Id: I0bc4062c1fd3202ee201acb36a2bb14fc6ee1543
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: fix cleanup of non established connections (VPP-1463) 50/15350/4
Florin Coras [Wed, 17 Oct 2018 17:41:28 +0000 (10:41 -0700)]
tcp: fix cleanup of non established connections (VPP-1463)

- fix delete of connection in syn-received
- fix delete of half-open connection

Change-Id: I72ff4b60406a2762d998328c52f41adea40d2c1b
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoPing; remove unused arrays 65/15365/2
Neale Ranns [Thu, 18 Oct 2018 09:18:06 +0000 (02:18 -0700)]
Ping; remove unused arrays

Change-Id: I104f2b4e0b1c354d3671962be3f6002f2721388d
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoPAPI: Expose API enums to tests / applications 06/15306/7
Ole Troan [Tue, 16 Oct 2018 12:42:50 +0000 (14:42 +0200)]
PAPI: Expose API enums to tests / applications

e.g:
from vpp_papi import VppEnum

VppEnum.vl_api_address_family_t.ADDRESS_IP4

Change-Id: I10c22d57234a1a06e98a889cf80b19085b468ed3
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoUpdate version (18.10) for API changes script 61/15361/1
Marco Varlese [Thu, 18 Oct 2018 07:37:17 +0000 (09:37 +0200)]
Update version (18.10) for API changes script

Change-Id: I41d22bfc87849e923628de08f922f7a541579fe1
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
5 years agovxlan:decap caching error (VPP-1462) 49/15349/1
Eyal Bari [Wed, 17 Oct 2018 14:13:42 +0000 (17:13 +0300)]
vxlan:decap caching error (VPP-1462)

Change-Id: I3ef0725684bcb8ea526abe0ce62562b35a0070f5
Signed-off-by: Eyal Bari <ebari@cisco.com>
(cherry picked from commit 0d87894bf279a4678cfca6cc438583090b166f85)

5 years agofix ip6 prefix check for tap_v2 41/15341/2
Michal Cmarada [Wed, 17 Oct 2018 11:40:32 +0000 (13:40 +0200)]
fix ip6 prefix check for tap_v2

Change-Id: Ifbb1393fc3c50c140c09e8baedcd4a92189ba56e
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
5 years agoUpdate to doxygen documentation for release 18.10 34/15334/1
Marco Varlese [Wed, 17 Oct 2018 09:21:32 +0000 (11:21 +0200)]
Update to doxygen documentation for release 18.10

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

5 years agoIP Route add/del API is MP safe 24/15324/2
Neale Ranns [Wed, 17 Oct 2018 06:38:00 +0000 (06:38 +0000)]
IP Route add/del API is MP safe

Change-Id: I0bfa4c9a3bb22155d7862cc13019cb172e77407c
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotcp: fix multiple fin retries (VPP-1461) 19/15319/4
Florin Coras [Wed, 17 Oct 2018 03:30:31 +0000 (20:30 -0700)]
tcp: fix multiple fin retries (VPP-1461)

Change-Id: I1be7c59df7b48875f81ebeebf5f39ed15a43d2d8
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agostats: vpp_get_stats missing last interface in dump 27/15327/2
Ole Troan [Wed, 17 Oct 2018 07:28:23 +0000 (09:28 +0200)]
stats: vpp_get_stats missing last interface in dump

Change-Id: Ie1fa560cb255a9b13ddb4929da8f33286a8c137e
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoacl-plugin: tuplemerge: refresh the pointer to hash-readied ACL entries per each... 29/15329/1
Andrew Yourtchenko [Tue, 16 Oct 2018 15:18:26 +0000 (17:18 +0200)]
acl-plugin: tuplemerge: refresh the pointer to hash-readied ACL entries per each collision in split_partition() (VPP-1458)

A pointer to hash-ready ACL rules is only set once, which might cause a crash if there are colliding entries
from more than one ACL applied.

Solution: reload the pointer based on the element being processed.

Change-Id: I7a701c2c3b4236d67293159f2a33c4f967168953
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 84112dd4f98e5a31a8c7340a741f89e77fd03363)

5 years agotcp: avoid sack processing when not needed (VPP-1460) 17/15317/3
Florin Coras [Wed, 17 Oct 2018 02:52:10 +0000 (19:52 -0700)]
tcp: avoid sack processing when not needed (VPP-1460)

Change-Id: If81ee34e1f1e929de1a5b758ddb9aede4002e858
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agobond: tx optimizations 66/15166/13
Damjan Marion [Sat, 6 Oct 2018 12:33:18 +0000 (14:33 +0200)]
bond: tx optimizations

Break up bond tx function into multiple small workloads:
  1. parse the packet header and hash it based on the configured algorithm
  2. optionally, trace the packet
  3. convert the hash value from (1) to the slave port
  4. update the buffers with the slave sw_if_index
  5. Add the buffers to the queues
  6. Create and send the frames

old numbers
-----------
Time 5.3, average vectors/node 223.74, last 128 main loops 40.00 per node 222.61
  vector rates in 3.3627e6, out 6.6574e6, drop 3.3964e4, punt 0.0000e0
             Name                 State         Calls          Vectors        Suspends         Clocks       Vectors/Call
BondEthernet0-output             active              68998        17662979               0          1.89e1          255.99
BondEthernet0-tx                 active              68998        17662979               0          2.60e1          255.99
TenGigabitEthernet3/0/1-output   active              68998         8797416               0          1.03e1          127.50
TenGigabitEthernet3/0/1-tx       active              68998         8797416               0          7.85e1          127.50
TenGigabitEthernet7/0/1-output   active              68996         8865563               0          1.02e1          128.49
TenGigabitEthernet7/0/1-tx       active              68996         8865563               0          7.65e1          128.49

new numbers
-----------
BondEthernet0-output             active             304064        77840384               0          2.29e1          256.00
BondEthernet0-tx                 active             304064        77840384               0          2.47e1          256.00
TenGigabitEthernet3/0/1-output   active             304064        38765525               0          1.03e1          127.49
TenGigabitEthernet3/0/1-tx       active             304064        38765525               0          7.66e1          127.49
TenGigabitEthernet7/0/1-output   active             304064        39074859               0          1.01e1          128.51

Change-Id: I3ef9a52bfe235559dae09d055c03c5612c08a0f7
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoVPP-1459:Ip4 lookup fail when exist prefix cover. 16/15316/1
mu.duojiao [Wed, 17 Oct 2018 02:59:09 +0000 (10:59 +0800)]
VPP-1459:Ip4 lookup fail when exist prefix cover.

Change-Id: I4ba0aeb65219596475345e42b8cd34019f5594c6
Signed-off-by: mu.duojiao <mu.duojiao@zte.com.cn>
5 years agotls: fix multi threaded medium scale test (VPP-1457) 98/15298/7
Florin Coras [Tue, 16 Oct 2018 04:35:42 +0000 (21:35 -0700)]
tls: fix multi threaded medium scale test (VPP-1457)

- ensure session enqueue epoch does not wrap between two enqueues
- use 3 states for echo clients app, to distinguish between starting and
closing phases
- force tcp fin retransmit if out of buffers while sending a fin

Change-Id: I6f2cab46affd1148aba2a33fb6d58bcc54f32805
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoPAPI: Add bool type support in vppapigen. 07/15307/2
Ole Troan [Tue, 16 Oct 2018 13:14:03 +0000 (15:14 +0200)]
PAPI: Add bool type support in vppapigen.

Change-Id: I9c2eaa2ee04a1c9a92018afb92cb2c5610df2991
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoPAPI: Add timeout support for socket transport 08/15308/1
Ole Troan [Tue, 16 Oct 2018 13:16:07 +0000 (15:16 +0200)]
PAPI: Add timeout support for socket transport

Change-Id: I0402989e0ac738cab2f918e6e3d73c571457c08e
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoFIB: use vlib-log for debugging 99/15299/2
Neale Ranns [Mon, 24 Sep 2018 12:36:26 +0000 (12:36 +0000)]
FIB: use vlib-log for debugging

Change-Id: I9052202b8cbcf656e61d635253d515f0f3a8d145
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoFix coverity issue for potentially overflowing of page size 91/15291/2
Haiyang Tan [Mon, 15 Oct 2018 13:17:55 +0000 (06:17 -0700)]
Fix coverity issue for potentially overflowing of page size

Change-Id: I2779626d745badb63386efcf729da7a094a4f297
Signed-off-by: Haiyang Tan <haiyangtan@tencent.com>
5 years agoPing; report failures to the terminal 90/15290/3
Neale Ranns [Mon, 15 Oct 2018 12:47:58 +0000 (05:47 -0700)]
Ping; report failures to the terminal

Change-Id: Icd48de31302f62c59961c573699a1dd0474b8acb
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovcl: fix bidirectional tests (VPP-1455) 83/15283/7
Florin Coras [Sat, 13 Oct 2018 19:20:01 +0000 (12:20 -0700)]
vcl: fix bidirectional tests (VPP-1455)

- add epoll dequeued events beyond maxevents to unhandled
- filter multiple epoll rx events

Change-Id: I618f5f02b19581473de891b3b59bb6a0faad10b5
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoIGMP: proxy device 33/15133/7
Jakub Grajciar [Thu, 4 Oct 2018 09:05:35 +0000 (11:05 +0200)]
IGMP: proxy device

Create 'proxy device' per VRF and add one upstream
and one or many downstream interfaces.

Change-Id: I1cef05fb01e73a5b483c7a2f4debaaeffe2c8155
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
5 years agovmxnet3: show vmxnet3 with filtering capability [VPP-1452] 74/15274/4
Steven [Fri, 12 Oct 2018 17:21:32 +0000 (10:21 -0700)]
vmxnet3: show vmxnet3 with filtering capability [VPP-1452]

show vmxnet3 desc may display 5000 lines of output since it has 5 tables. Each
table may have 1000 entries. It would not be very useful to debug problem.

We need filtering capability for the subject show command. We need to be able
to display the descriptor table per interface, per interface per table, and
per interface per table per slot. The latter is the most useful.

tested the following valid combinations
show vmxnet3
show vmxnet3 desc
show vmxnet3 vmxnet3-0/13/0/0
show vmxnet3 vmxnet3-0/13/0/0 desc
show vmxnet3 vmxnet3-0/13/0/0 rx-comp
show vmxnet3 vmxnet3-0/13/0/0 rx-comp 1
show vmxnet3 vmxnet3-0/13/0/0 tx-comp
show vmxnet3 vmxnet3-0/13/0/0 tx-comp 1
show vmxnet3 vmxnet3-0/13/0/0 rx-desc-0
show vmxnet3 vmxnet3-0/13/0/0 rx-desc-0 1
show vmxnet3 vmxnet3-0/13/0/0 rx-desc-1
show vmxnet3 vmxnet3-0/13/0/0 rx-desc-1 1
show vmxnet3 vmxnet3-0/13/0/0 tx-desc
show vmxnet3 vmxnet3-0/13/0/0 tx-desc 1

negative tests and command is rejected
show vmxnet3 abc
show vmxnet3 desc abc
show vmxnet3 vmxnet3-0/13/0/0 abc
show vmxnet3 vmxnet3-0/13/0/0 desc abc
show vmxnet3 vmxnet3-0/13/0/0 rx-comp abc
show vmxnet3 vmxnet3-0/13/0/0 rx-comp 1 abc

Change-Id: I0ff233413496e58236f8fb4a94e493494c20c5cb
Signed-off-by: Steven <sluong@cisco.com>
5 years agovmxnet3: vmxnet3_test_plugin.so: undefined symbol: format_vlib_pci_addr [VPP-1456] 96/15296/2
Steven [Mon, 15 Oct 2018 17:22:53 +0000 (10:22 -0700)]
vmxnet3: vmxnet3_test_plugin.so: undefined symbol: format_vlib_pci_addr [VPP-1456]

When using vpp_api_test, there is an undefined symbol error for
format_vlib_pci_addr when vmxnet3_test_plugin.so is loaded.

The cause is due to vlib not included in vpp_api_test. Remove the reference
for vlib.so in vmxnet3_test.

Change-Id: I37c00dfe2f843d99ad6c4fc7af6ed10bac4c2df8
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 3d29e83112a349b7d27ef792463f246b18115d3e)

5 years agoSticky Load-balance 84/15184/3
Neale Ranns [Mon, 8 Oct 2018 14:51:11 +0000 (14:51 +0000)]
Sticky Load-balance

keep the number of buckets in the load-balanced fixed. If a
path goes dwon fill its buckets with those from the next
available up path.

Change-Id: I15603ccb899fa9b77556b898c99136379cf32eae
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovnet: create L2 feature arc infrastructure 63/15163/3
Andrew Yourtchenko [Sat, 6 Oct 2018 07:18:00 +0000 (09:18 +0200)]
vnet: create L2 feature arc infrastructure

This commit adds two new nodes in the L2
datapath in input and output direction respectively.

These nodes fork the traffic into three feature
arcs: ip4, ip6 and nonip, which later join
to continue the usual L2 processing.
The vnet_l2_feature_enable_disable() function
with the same signature as
vnet_feature_enable_disable() takes care of
enabling the L2 datapath feature bits as needed, when
the features are enabled/disabled.

Thus, L2 features may use the similar plumbing as
the L3 features enjoy.

Change-Id: I76877b3a92d794c492bff1622bb26acba05705b2
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agodpdk: drop no longer used config options 80/15280/2
Stephen Hemminger [Fri, 12 Oct 2018 23:43:58 +0000 (16:43 -0700)]
dpdk: drop no longer used config options

DPDK has switched to dynamic logging for initialization (since 18.05).
Don't generate config for unused options.

Change-Id: I3f1a5b3b8bee38abc9d0654737b59368646ed0fa
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agodpdk: only look at PCI information on PCI devices 79/15279/2
Stephen Hemminger [Fri, 12 Oct 2018 00:04:13 +0000 (17:04 -0700)]
dpdk: only look at PCI information on PCI devices

The rte_device is use as a base type of all DPDK devices.
It is not valid to use container_of to find PCI information
unless the bus of the rte_device is pci. Otherwise, the
pointer is looking at some other data, which may or may not
be zero.

This change introduces a helper function to get rte_pci_device
pointer. If device is on PCI bus it returns pointer to
rte_pci_device info, otherwise it returns NULL.

Change-Id: Ia7446006bb93a7a54844969f3b3dd3b918890dfd
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agoVPP-1448: Fix error when recurse on down the trie. 34/15234/7
mu.duojiao [Thu, 11 Oct 2018 06:27:30 +0000 (14:27 +0800)]
VPP-1448: Fix error when recurse on down the trie.

Change-Id: Idfed8243643780d3f52dfe6e6ec621c440daa6ae
Signed-off-by: mu.duojiao <mu.duojiao@zte.com.cn>
5 years agovxlan:fix ip6 tunnel deletion 84/15284/3
Eyal Bari [Sun, 14 Oct 2018 07:54:32 +0000 (10:54 +0300)]
vxlan:fix ip6 tunnel deletion

Change-Id: I70fb7394f85b26f7e632d74fc31ef83597efdd16
Signed-off-by: Eyal Bari <ebari@cisco.com>
5 years agoacl-plugin: make each test in test_acl_plugin runnable separately 64/15164/3
Andrew Yourtchenko [Sat, 6 Oct 2018 07:24:28 +0000 (09:24 +0200)]
acl-plugin: make each test in test_acl_plugin runnable separately

And improve the robustness of the ethertype whitelist test coverage

Change-Id: I64fe3a25208dbc619ae5cd6404f6122e69394a38
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agosession: mark apis for deprecation 72/15272/2
Florin Coras [Fri, 12 Oct 2018 15:36:20 +0000 (08:36 -0700)]
session: mark apis for deprecation

Change-Id: I913ffc963928b74cf4753b6b9a0eed4436887e04
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovcl: fix empty epoll returns (VPP-1453) 76/15276/2
Florin Coras [Fri, 12 Oct 2018 20:09:36 +0000 (13:09 -0700)]
vcl: fix empty epoll returns (VPP-1453)

Change-Id: I0b191ddb749b1aa132c2d33b8359c146b36d27af
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: don't wait indefinitely for apps to consume evts (VPP-1454) 77/15277/1
Florin Coras [Fri, 12 Oct 2018 23:55:14 +0000 (16:55 -0700)]
session: don't wait indefinitely for apps to consume evts (VPP-1454)

Change-Id: I544b24d2b2c4a09829773cf180d1747f4b087d4c
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovnet: complete the fix for l3_hdr_offset calculation for single loop fastpass case... 56/15256/3
Andrew Yourtchenko [Wed, 10 Oct 2018 14:15:55 +0000 (16:15 +0200)]
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>
(cherry picked from commit 376414f4c3f53af44da4e82ee5d0b1843b291f8e)

5 years agoip: add container proxy dump API (VPP-1364) 16/15116/5
Matus Fabian [Wed, 3 Oct 2018 06:27:21 +0000 (23:27 -0700)]
ip: add container proxy dump API (VPP-1364)

Change-Id: I3cb89dbfb7174b9913a8c4ad9b3b1dc9f6ed6326
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agodpdk: support passing log-level 54/15254/2
Stephen Hemminger [Thu, 11 Oct 2018 17:01:04 +0000 (10:01 -0700)]
dpdk: support passing log-level

Since DPDK 17.05, DPDK logging supports per subsystem dynamic logging.
Allow passing this as log-level on EAL command line.

dpdk {
log-level pmd.net.virtio.*:debug
...
}

Change-Id: If9576c11aba390a5cd2740fc1c9da5768689bd74
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agoAdd parallel test run info to test/doc 36/15236/2
juraj.linkes [Thu, 11 Oct 2018 08:06:44 +0000 (10:06 +0200)]
Add parallel test run info to test/doc

An overview of parallel test runs, describing the library used, results
gathering, stdout and stderr handling and how to execute a parallel run.

Change-Id: Ic83cd689751ee46914e3b858b0b24a74b083f99f
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
5 years agoNAT44: identity NAT fix (VPP-1441) 47/15247/2
Matus Fabian [Thu, 11 Oct 2018 11:28:48 +0000 (04:28 -0700)]
NAT44: identity NAT fix (VPP-1441)

Change-Id: Ic4affc54d15d08b9b730f6ec6146ee053b28b4b6
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoStats: Include stat_segment.h in packages. 57/15257/2
Ole Troan [Thu, 11 Oct 2018 20:08:50 +0000 (22:08 +0200)]
Stats: Include stat_segment.h in packages.

Change-Id: I976c0aba8397badf64763c4dbddce67009a4fb23
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoFix vpp-ext-deps package version in stable branch 55/15255/2
Damjan Marion [Thu, 11 Oct 2018 16:18:26 +0000 (09:18 -0700)]
Fix vpp-ext-deps package version in stable branch

Change-Id: Ifb33622b50113501f1d23ab94ba9da708678d6be
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 5551e41f78249b72715203ecd93586f48acccbf4)

5 years agobfd:fix handling session creation batch 44/15244/3
Eyal Bari [Thu, 11 Oct 2018 11:09:58 +0000 (14:09 +0300)]
bfd:fix handling session creation batch

when multiple session creating script is ran (via exec) only the first
one actually starts

Change-Id: I0fc36f65795c8921cf180e0b555c446e5a80be45
Signed-off-by: Eyal Bari <ebari@cisco.com>
5 years agoL2: BM traffic does not use UU-FWD (VPP-1445) 27/15227/2
Neale Ranns [Wed, 10 Oct 2018 15:55:01 +0000 (15:55 +0000)]
L2: BM traffic does not use UU-FWD (VPP-1445)

Change-Id: I5495c37da2fb8ff48c4af14ccba021d64eac52b6
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovppinfra: introduce clib_mem_vm_ext_free() to avoid fd leaks 09/15209/2
Haiyang Tan [Wed, 10 Oct 2018 02:09:45 +0000 (19:09 -0700)]
vppinfra: introduce clib_mem_vm_ext_free() to avoid fd leaks

Change-Id: I8691a10493d159a97574550c111f07722960a7cd
Signed-off-by: Haiyang Tan <haiyangtan@tencent.com>
5 years agoreassembly: get number of workers instead of threads (VPP-1435) 16/15216/2
Juraj Sloboda [Wed, 10 Oct 2018 08:15:54 +0000 (10:15 +0200)]
reassembly: get number of workers instead of threads (VPP-1435)

Change-Id: If3abeab2b304e2df41139707a4c8d045fab6ef99
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
5 years agovmxnet3: better error handling 11/15211/2
Steven [Wed, 10 Oct 2018 04:12:25 +0000 (21:12 -0700)]
vmxnet3: better error handling

try harder on output - if there is no descriptor space available, try to free
up some and check again.
make sure we free the buffer if error is encoutered on input.

Change-Id: I41a45213e29de71935afe707889e515037cd081f
Signed-off-by: Steven <sluong@cisco.com>
5 years agoSetup, teardown, DEBUG=core, FAILFAST fixes 30/14930/9
juraj.linkes [Fri, 21 Sep 2018 11:55:16 +0000 (13:55 +0200)]
Setup, teardown, DEBUG=core, FAILFAST fixes

- Fixed a bug when an error occuring in tearDownClass would not result in
test being marked as failed
- Improved test results reporting in cases when an error occurs in setUpClass
and tearDownClass
- Fixed DEBUG=core when the core is produced in setUpClass or
tearDownClass
- Reworked DEBUG=core to always be handled after all tests have been
executed
- Fixed FAILFAST=1 for parallel test runs

Change-Id: I3e9cd3b97ba6fa802fa0aa2dd7678ff82eee09ec
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
5 years agoInteger underflow and out-of-bounds read (VPP-1442) 20/15220/2
Neale Ranns [Wed, 10 Oct 2018 13:27:00 +0000 (13:27 +0000)]
Integer underflow and out-of-bounds read (VPP-1442)

Change-Id: Ife2a83b9d7f733f36e0e786ef79edcd394d7c0f9
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoL2-flood: no clone for 1 replication 00/15100/3
Neale Ranns [Tue, 2 Oct 2018 14:27:02 +0000 (07:27 -0700)]
L2-flood: no clone for 1 replication

Change-Id: If178dd38e7920f35588f5d821ff097168b078026
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoTest FW: Use unittest temp dir as unix runtime dir 90/15190/3
Jakub Grajciar [Tue, 9 Oct 2018 10:28:21 +0000 (12:28 +0200)]
Test FW: Use unittest temp dir as unix runtime dir

Change-Id: I5273d5f3f59cc3c43da0a15bb0c4a4056098adcf
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
5 years agoacl-plugin: reduce the syslog level for debug messages 14/15214/1
Andrew Yourtchenko [Wed, 10 Oct 2018 08:39:36 +0000 (10:39 +0200)]
acl-plugin: reduce the syslog level for debug messages

Change-Id: Ie8380cb39424548bf64cb19aee59ec20e29d1e39
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agovppinfra: Fix extendto_high aarch64 NEON api. 96/15196/1 v19.01-rc0
Sirshak Das [Tue, 9 Oct 2018 16:28:44 +0000 (11:28 -0500)]
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>
5 years agomemif: coverity fix 86/15186/2
Jakub Grajciar [Tue, 9 Oct 2018 08:02:46 +0000 (10:02 +0200)]
memif: coverity fix

Change-Id: I2b14e2a035a37b04816aac1e610146be58ad1e92
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
5 years agoAPI: Spurious timeouts from timeout thread. 76/15176/2
Ole Troan [Mon, 8 Oct 2018 09:24:22 +0000 (11:24 +0200)]
API: Spurious timeouts from timeout thread.

Change-Id: I1be1101ba4d82688a32b5ae2c39ca5d92dc244b7
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agovnet: ethernet-input incorrectly sets l3_hdr_offset in some cases 61/15161/7
Andrew Yourtchenko [Fri, 5 Oct 2018 18:36:03 +0000 (20:36 +0200)]
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>
5 years agomemif: socket filename add/del bugfix 79/15179/2
Jakub Grajciar [Mon, 8 Oct 2018 11:35:32 +0000 (13:35 +0200)]
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>
5 years agoAdding Multipath support for exclusive DPO based fib path entries via rpath 60/15160/3
Vijayabhaskar Katamreddy [Fri, 5 Oct 2018 18:24:56 +0000 (11:24 -0700)]
Adding Multipath support for exclusive DPO based fib path entries via rpath

Change-Id: I3c84daf046dbad972b36e48fa2548bbe20c7b338
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
5 years agoFix coverity issue for NSH plugin 70/15170/3
Hongjun Ni [Mon, 8 Oct 2018 10:28:37 +0000 (18:28 +0800)]
Fix coverity issue for NSH plugin

Change-Id: Ie99ff9aebe3c896e3e104a5a7bebd84f7766e713
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
5 years agoStats: prometheus export coverity errors. 74/15174/4
Ole Troan [Mon, 8 Oct 2018 07:16:44 +0000 (09:16 +0200)]
Stats: prometheus export coverity errors.

Change-Id: Ibc0a25dcf7d734215e0cffe789b5726f23e1c3d7
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoNAT44: do not create session record for identity mapping (VPP-1439) 71/15171/2
Matus Fabian [Mon, 8 Oct 2018 04:28:23 +0000 (21:28 -0700)]
NAT44: do not create session record for identity mapping (VPP-1439)

Change-Id: I39a3146a4e4ba8eadf50af7113b9ae6b1c1d688f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoreplicate trace fix 72/15172/2
Neale Ranns [Mon, 8 Oct 2018 06:08:59 +0000 (06:08 +0000)]
replicate trace fix

Change-Id: I785ecadbf30812a500629870aa717e64f4cf0cdd
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovcl: cleanup and fixes for vcl test code 54/15154/9
Florin Coras [Fri, 5 Oct 2018 07:50:30 +0000 (00:50 -0700)]
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>
5 years agovcl: use want_tx_evt for ct sessions 67/15167/3
Florin Coras [Sat, 6 Oct 2018 20:49:16 +0000 (13:49 -0700)]
vcl: use want_tx_evt for ct sessions

Change-Id: Id46c651c41b1c633326081583ee3383e27ef475d
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agobond: active-backup mode is using the wrong load balance algo 68/15168/1
Steven [Sun, 7 Oct 2018 05:30:50 +0000 (22:30 -0700)]
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>
5 years agovfio: don't display error if no pci devices are assigned to container 59/15159/2
Damjan Marion [Fri, 5 Oct 2018 14:46:00 +0000 (16:46 +0200)]
vfio: don't display error if no pci devices are assigned to container

Change-Id: I21429ce084cfd39af6a9997b4c1e459f5a6ef672
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agobond: tx perf improvement, part trois 86/14986/3
Damjan Marion [Wed, 26 Sep 2018 08:15:41 +0000 (10:15 +0200)]
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>
5 years agoSource VRF Select tests 01/15101/5
Neale Ranns [Tue, 2 Oct 2018 14:28:16 +0000 (07:28 -0700)]
Source VRF Select tests

Change-Id: Id6c16462fccf890eaa0e526ad048e032c9da8800
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoDOC ONLY: clean up plugin documentation 52/15152/2
Dave Barach [Thu, 4 Oct 2018 21:12:26 +0000 (17:12 -0400)]
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>
5 years agodocs: add contiv vpp 88/15088/3
Scott Keeler [Mon, 1 Oct 2018 18:50:57 +0000 (14:50 -0400)]
docs: add contiv vpp

Change-Id: I92227fc4968fc6a478beb7f38707b91e9f0635ec
Signed-off-by: Scott Keeler <skeeler@cisco.com>
5 years agoNAT: convert remaining clib_warning to nat_log_* 57/15157/3
Juraj Sloboda [Fri, 5 Oct 2018 11:06:36 +0000 (13:06 +0200)]
NAT: convert remaining clib_warning to nat_log_*

Change-Id: Ie999ab852cc3775ec90820624d97be746d2590a4
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
5 years agonode_cli: Give the user a hint as to the problem. 78/14978/4
Paul Vinciguerra [Tue, 25 Sep 2018 17:02:07 +0000 (10:02 -0700)]
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>
5 years agosession: fix local session tagging and cleanup 53/15153/3
Florin Coras [Fri, 5 Oct 2018 02:03:05 +0000 (19:03 -0700)]
session: fix local session tagging and cleanup

Change-Id: I0d42a0c71fea7dd669fb1fe5ded7e6e944245c7d
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovhost_user: Add test for interface states and events 41/15141/2
Juraj Sloboda [Thu, 4 Oct 2018 13:15:16 +0000 (15:15 +0200)]
vhost_user: Add test for interface states and events

Change-Id: I2c330945bb0b07f649f574a055bfbea455e5d0b3
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
5 years agoOn interface deletion - make sure any vlan qinq table is cleared 51/15151/2
John Lo [Thu, 4 Oct 2018 20:22:21 +0000 (16:22 -0400)]
On interface deletion - make sure any vlan qinq table is cleared

Change-Id: Ie9bb1cfce2369b448ca55a21b2f8b8bbbb81c59c
Signed-off-by: John Lo <loj@cisco.com>
5 years agoImprove ip_mroute_add_del documentation 50/15150/2
Ian Wells [Thu, 4 Oct 2018 19:31:11 +0000 (12:31 -0700)]
Improve ip_mroute_add_del documentation

Change-Id: Ieb882cc67c37bf591b6c737234263c7c35416e6d
Signed-Off-By: Ian Wells <iawells@cisco.com>
5 years agovxlan:ip4 decap:remove access to tunnel object 98/15098/5
Eyal Bari [Tue, 2 Oct 2018 09:23:06 +0000 (12:23 +0300)]
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>
5 years agovcl: fix test throughput computation 49/15149/2
Florin Coras [Thu, 4 Oct 2018 17:07:22 +0000 (10:07 -0700)]
vcl: fix test throughput computation

Change-Id: I78260cd1a412e93a5d6686888b6ea17f52245a4a
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoSupport reassembly for fragments coming to ip4-local node 70/15070/5
Juraj Sloboda [Tue, 2 Oct 2018 09:13:53 +0000 (11:13 +0200)]
Support reassembly for fragments coming to ip4-local node

Change-Id: I3aa4708c1c3cdda344f282d56b617677080eaaa1
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
5 years agoacl-plugin: tuplemerge: avoid batch-resize of the applied entries vector - VPP-1352 42/15142/2
Andrew Yourtchenko [Thu, 4 Oct 2018 13:11:01 +0000 (15:11 +0200)]
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>
5 years agoudp_echo: fix cut-through server mode 28/15128/9
Florin Coras [Wed, 3 Oct 2018 21:29:10 +0000 (14:29 -0700)]
udp_echo: fix cut-through server mode

Change-Id: I20dd2071c936eb2c1870d45860553007c8e20587
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoMFIB-API: when programming an (S,G) fix the grp-len 46/15146/2
Neale Ranns [Thu, 4 Oct 2018 15:36:56 +0000 (08:36 -0700)]
MFIB-API: when programming an (S,G) fix the grp-len

Change-Id: I97052d29080501de53fe95499c860faf0765e81d
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
5 years agoclib_count_equal_*: don't read of the end of a small array and init data only if... 25/15125/2
Neale Ranns [Wed, 3 Oct 2018 18:13:27 +0000 (14:13 -0400)]
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>