4433 Commits

Author SHA1 Message Date
Ping Yu
006e6f8add tls: avoid possible async handler duplication
One handler is good enough when engine sends out a retry status
Thus this patch will just go one branch

Change-Id: Id81cb3fa67d2b322b0fe1b2f62cd866cf3491eb4
Signed-off-by: Ping Yu <ping.yu@intel.com>
2018-07-23 22:18:19 +00:00
Florin Coras
8409955e4b session: send rx events only if session ready
Change-Id: I8d631121b104fb40c20701d4c1b428f2b71e5785
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-23 20:23:58 +00:00
Neale Ranns
6b9b41c832 L2 EFP: byteswap sw_if_index, enable flag can be u8 on .api
Change-Id: Ib99d02e84e468726feae4c386733da405b298e4f
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-23 19:58:46 +00:00
Matus Fabian
c79396e1f8 NAT44: fix forwarding feature bug (VPP-1349)
Change-Id: I5009fcfde5c627d59dea3edda15486b9392134a2
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-07-23 19:38:46 +00:00
Neale Ranns
5b8ed986f9 Buffer clone: copy opaque2
Change-Id: I06e1dbfa0782bc03f2d0e77295b38b4fde7df35e
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-23 19:37:34 +00:00
Dave Barach
66446b9888 Update pipeline.h: use vlib_get_buffers
It's not clear that fine-graind pipelining will ever produce optimal
performance. That having been written, it's an easier coding model for
folks interesting in decent results without having to manually
implement 2 or 4 way fine-grained parallelism.

Change-Id: Ida877292832eaf759ffbb6d2e16012f8fbd427e5
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-23 18:28:43 +00:00
Eyal Bari
cd30774fa9 fix vector index range checks
Change-Id: I63c36644c9d93f2c3ec6606ca0205b407499de4e
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-07-23 15:37:01 +00:00
Neale Ranns
b7d41fc18e make test-ext: a new test target that builds VOM (existing one no longer do)
Change-Id: If590e90b2a1c3b884863ec15a92ea4353ac9eb7c
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-22 21:16:55 +00:00
Dave Barach
78451a6a66 Loopback tx: support multiple tx intfcs per frame
Can happen if code bypasses the per-interface output node, and
dispatches packets directly to the tx node.

Switch to vlib_get_buffers(...) ... vlib_buffer_enqueue_to_next (...),
quad/single loop coding pattern.

Change-Id: Ic0e5d3b9748230f4e545a54186e6e64e7a782bb1
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-21 16:11:51 -04:00
Matthew Smith
e375067142 fix IP directed broadcast node declarations
The dev build ('make build') was failing because
ip4_rewrite_bcast() and ip6_rewrite_bcast() are declared static
and were not referenced.

The node functions that were set for directed broadcast rewrite:

ip4_rewrite_bcast_node - ip4_rewrite()
ip6_rewrite_bcast_node - ip6_rewrite()

Changed to:

ip4_rewrite_bcast_node - ip4_rewrite_bcast()
ip6_rewrite_bcast_node - ip6_rewrite_bcast()

The release build ('make build-release') succeeds because there is
a VLIB_NODE_FUNCTION_MULTIARCH() call referencing the function. That
macro is empty for dev builds.

Change-Id: I2a05f00ca43d0eae8ff2e3026991e69917003fe1
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-07-21 11:56:10 +00:00
Damjan Marion
2a03efe4c2 bihash: give hint to CPU that we are spinlocking
Change-Id: I78c0a6da5d8fc63c1ced43589c42abc15ab12b16
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-20 21:48:59 +02:00
Damjan Marion
78fd7e810c Add congestion drop in interface handoff
This prevents deadlock in case when worker A sends to B and worker B
sends to A

Change-Id: Id9436960f932c58325fe4f5ef8ec67b50031aeda
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-20 19:43:36 +02:00
Dave Barach
508498f74d Fine-grained add / delete locking
Add a bucket-level lock bit. Use a spinlock only when actually
allocating, freeing, or splitting a bucket. Should improve
multi-thread add/del performance.

Change-Id: I3e40e2a8371685457f340d6584dea14e3207f2b0
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-20 17:38:35 +00:00
Damjan Marion
13637632b8 physmem: fix alloc when dlmaloc is used
Change-Id: I4b6cdf95ac694c8408eb6cf3259b335a8148b5aa
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-20 17:38:22 +00:00
Damjan Marion
3e13c092a5 fix issue with missing sample_main in sample plugin
Change-Id: Ia17511e3997cdcf1d0991e62e8e2d3fb8812d133
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-20 15:32:19 +00:00
Neale Ranns
8d753f906e QOS: mark/record fix feature ordering c-n-p error
vnet_feature_arc_init:215: feature node 'mpls-qos-mark' not found (after 'vlan-mpls-qos-record', arc 'mpls-input')
vnet_feature_arc_init:215: feature node 'ip6-qos-mark' not found (after 'vlan-ip6-qos-record', arc 'ip6-multicast')
...etc...

Change-Id: I22cb98d57e2480f5978fff315b77b9cbb6a9f9dd
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-07-20 13:21:17 +00:00
Neale Ranns
1855b8e48d IP directed broadcast
with ip direct broadcast enable a packet to the interface's
subnet broadcast address with be sent L2 broadcast on the
interface. dissabled, it will be dropped. it is disabled by
default, which preserves current behaviour

Change-Id: If154cb92e64834e97a541b32624354348a0eafb3
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-20 13:21:03 +00:00
Damjan Marion
631de0dffe avf: don't enable interrupts before interface is admin up
Change-Id: I0fc19dd109e569f2c407a85e8fa32758e06676b8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-20 13:06:08 +02:00
Matus Fabian
4994958e5c NAT44: in+out interface in STN setup improvement (VPP-1344)
Change-Id: Iad7e0337a577ef8a0dfb7bde1968cc115d176043
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-07-20 09:33:07 +00:00
Neale Ranns
0809f6c030 QoS: marking and recording for MPLS and VLAN
Change-Id: Icec79aa9039d5d7835d311fde0b7c1a0c76c9eb1
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-20 09:32:52 +00:00
Steven
c34b2e0f7c avf: Support interrupt mode
DBGvpp# set interface rx-mode AVF0/4/2/0 interrupt
set interface rx-mode AVF0/4/2/0 interrupt
DBGvpp# sh int rx
sh int rx
Thread 0 (vpp_main):
  node dpdk-input:
    FortyGigabitEthernet6/0/0 queue 0 (polling)
  node avf-input:
    AVF0/4/2/0 queue 0 (interrupt)
DBGvpp# sh int addr
sh int addr
AVF0/4/2/0 (up):
  L3 133.1.1.10/24
FortyGigabitEthernet6/0/0 (dn):
VirtualEthernet0/0/0 (up):
  L3 192.168.42.1/24
DBGvpp# clear run
clear run
DBGvpp# clear interfaces
clear interfaces
DBGvpp# sh int rx
sh int rx
Thread 0 (vpp_main):
  node dpdk-input:
    FortyGigabitEthernet6/0/0 queue 0 (polling)
  node avf-input:
    AVF0/4/2/0 queue 0 (interrupt)
DBGvpp# ping 133.1.1.3 repeat 1
ping 133.1.1.3 repeat 1
64 bytes from 133.1.1.3: icmp_seq=1 ttl=64 time=.6237 ms

Statistics: 1 sent, 1 received, 0% packet loss
DBGvpp# sh int
sh int
              Name               Idx    State  MTU (L3/IP4/IP6/MPLS)     Counter          Count
AVF0/4/2/0                        5      up          9000/0/0/0     rx packets                     1
                                                                    rx bytes                      98
                                                                    tx packets                     1
                                                                    tx bytes                      98
                                                                    drops                          1
                                                                    ip4                            1
FortyGigabitEthernet6/0/0         1     down         9000/0/0/0
VirtualEthernet0/0/0              2      up          9000/0/0/0
local0                            0     down         9000/0/0/0
DBGvpp# sh run
sh run
Time 41.9, average vectors/node 1.00, last 128 main loops 0.00 per node 0.00
  vector rates in 2.3858e-2, out 2.3858e-2, drop 2.3858e-2, punt 0.0000e0
             Name                 State         Calls          Vectors        Suspends         Clocks       Vectors/Call
AVF0/4/2/0-output                active                  1               1               0          1.24e4            1.00
AVF0/4/2/0-tx                    active                  1               1               0          4.28e4            1.00
api-rx-from-ring                any wait                 0               0               2          6.94e4            0.00
avf-input                     interrupt wa               1               1               0          1.09e4            1.00
avf-process                     any wait                 0               0              47          1.01e4            0.00
...
DBGvpp#
DBGvpp# set interface rx-mode AVF0/4/2/0 polling
set interface rx-mode AVF0/4/2/0 polling
DBGvpp# sh int rx
sh int rx
Thread 0 (vpp_main):
  node dpdk-input:
    FortyGigabitEthernet6/0/0 queue 0 (polling)
  node avf-input:
    AVF0/4/2/0 queue 0 (polling)
DBGvpp# ping 133.1.1.3 repeat 1
ping 133.1.1.3 repeat 1
64 bytes from 133.1.1.3: icmp_seq=1 ttl=64 time=.2038 ms

Statistics: 1 sent, 1 received, 0% packet loss
DBGvpp#

Change-Id: Ib7d2b505ae4bb74a052263af766ca37d9df7bfe4
Signed-off-by: Steven <sluong@cisco.com>
2018-07-20 09:30:50 +00:00
Dave Barach
ed2fe93fd1 Fix coverity warning / legitimate minor bug
Of the form "if ((foo & 0x10) == 1)", as opposed to
"if (foo & 0x10)"

Change-Id: I6a6d276aeed4af7c1c6c78546ee68d598d54d7db
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-19 23:20:29 +00:00
Matthew Smith
3a9702a05f dpdk: eliminate vpp-dpdk-devel RPM conflict
Both vpp-devel and vpp-dpdk-devel have /usr/include/dpdk
in their files list. CentOS 7 won't allow them to both be
installed at the same time as a result.

Change vpp-dpdk-devel to /usr/include/dpdk/* so both can
be installed. It is useful to have both installed on a
development system.

Change-Id: I94b6cca299dfbd991638e43c41006db0d8f7ee8b
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-07-19 22:34:17 +00:00
Matthew Smith
88dbf98fe7 dpdk: fix Mellanox Connect-X3 VF ID
Fix a typo from previous patch. Change 0x104 to 0x1004.

Change-Id: I82230a8a0ec01567eb1d4bc12ac02062c2a98347
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-07-19 22:33:12 +00:00
Marek Gradzki
7064c338f1 test_jvpp: improve error message when JVpp JARS are missing
The java command fails with missing class error,
when some of the JARs given by -cp are missing,
which may be missleading.

This patch fixes that by adding os.path.isfile check to test_jvpp.py.

Change-Id: I3a0b6ef338c7f70cfd0ba78ee0888efe0b0957b3
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-07-19 22:31:45 +00:00
Damjan Marion
7d98a12f29 Remove unused argument to vlib_feature_next
Change-Id: Ieb8b53977fc8484c19780941e232ee072b667de3
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-19 22:31:11 +00:00
Florin Coras
3d0fadc01f session: coverity warnings
Change-Id: I4505954c737e8c6a3d4177c6833f2b12099e6dd4
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-19 21:15:28 +00:00
Ping Yu
970a0b87bb Add a new communication channel between VPP and openssl engine
Thus when engine buffer is full during a burst in performance
tesing, this code will help VPP handle retry machansim.

Change-Id: I0f9fc05d3dba8a54d34dca4c6137700d6c80f714
Signed-off-by: Ping Yu <ping.yu@intel.com>
2018-07-19 18:32:54 +00:00
Damjan Marion
4d56e059f7 Cleanup of handoff code
- removed handoff-dispatch node
- removed some unused buffer metadata fields
- enqueue to thread logic moved to inline function

Change-Id: I7361e1d88f8cce74cd4fcec90d172eade1855cbd
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-19 18:26:01 +00:00
Eyal Bari
a17158b872 qos record:fix disable on interface delete
handle the case where qos record was enabled more than once

Change-Id: Ic901b2f5b400751e82d57655983d10457ec62243
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-07-19 18:02:43 +00:00
Neale Ranns
8a03e4f979 ip4-input and ip4-input-no-checksum should be siblings
each edge/arc from these nodes must be the same.

Change-Id: Id5dace61bca0af71ad1df98583425226e81fd0de
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-07-19 15:25:24 +00:00
Damjan Marion
005849ec34 Set default STARTUP_DIR to be toplevel dir
Change-Id: I5ccc5f1770ab1f8fb9c4824395f4ee6d48346410
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-19 15:24:56 +00:00
Andreas Schultz
e73b6b7bac Fix IPv6 csum calculation in GTP-U encapsulation
The length field is included in the checksum. Therefor, we need
to update it before calculating the checksum.

Change-Id: Id23234efb80ea3747a0f8a5c7bf8621748d27635
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
2018-07-19 14:02:19 +00:00
Matthew Smith
43f02bb8a7 dpdk: set log write fd to non-blocking
If a PMD writes too many log messages using rte_vlog(), the
pipe for logging can fill and then rte_vlog() will block
on fflush() while it waits for something to read from the other
side of the pipe. That will never happen since the process node
that would read the other side of the pipe runs in the
same thread.

Set the write fd to non-blocking before the call to
rte_openlog_stream(). If the pipe is full, calls to write() or
fflush() will fail but execution will continue.

Change-Id: I0e5d710629633acda5617ff29897d6582c255d57
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-07-19 12:47:35 +00:00
Matthew Smith
25668c899e dpdk: add device IDs for Mellanox ConnectX-3
Recognize the PF and VF device IDs for the Mellanox adapter
used on Azure.

Change-Id: Ic7b36b37ac93db2b696354ffe6fa2b6d62ee3801
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-07-19 12:47:17 +00:00
Ole Troan
2a7563b024 PAPI: Remove logging calls from pack/unpack
This slowed down the decoder. Improved from 16s to 13s for 1000 dump/details
messages.

Change-Id: Iae78136b020cdd9344f3b2170ce426d0f074b6e6
Signed-off-by: Ole Troan <ot@cisco.com>
2018-07-19 12:17:22 +00:00
Mohsin Kazmi
22b3b84682 gbp: Add support for ACL
Change-Id: I7513c41307e62068ab5d9739cac393675c6066f8
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-07-19 07:51:32 +00:00
Eyal Bari
07f3586c5a qos mark/record: fix disable-sw_if_index range check
Change-Id: I2abb3ceebae3a32cee9aa2a999bd47c37719d3ac
Signed-off-by: Eyal Bari <ebari@cisco.com>
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2018-07-18 21:09:35 +00:00
Marco Varlese
400378f056 DPDK: coverity scan warnings
This patch addresses the coverity scan warnings reported for the DPDK
plugin.

Change-Id: Ie7ac7ffcf4a6c63245eae0f9910a193ab1e318a8
Signed-off-by: Marco Varlese <marco.varlese@suse.de>
2018-07-18 18:54:56 +00:00
Florin Coras
e91bdb3783 svm: make message queue more compact
Change-Id: Id45957163c2b95a2300a8ac9104fc92b9cc928ed
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-18 18:54:07 +00:00
Ed Warnicke
19668e8a39 Change configure.ac to match the release tag on master
Change-Id: I7e53b563fb801dd8508af47452ad44d4837cb68d
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2018-07-18 07:53:08 -05:00
Dave Barach
6a5adc3695 Add config option to use dlmalloc instead of mheap
Configure w/ --enable-dlmalloc, see .../build-data/platforms/vpp.mk

src/vppinfra/dlmalloc.[ch] are slightly modified versions of the
well-known Doug Lea malloc. Main advantage: dlmalloc mspaces have no
inherent size limit.

Change-Id: I19b3f43f3c65bcfb82c1a265a97922d01912446e
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-18 12:09:42 +00:00
Jan Gelety
2a3fb1a28b make_test: dhcp - add lease time test and wrong XID in OFFER test
- negative test with wrong XID in OFFER not implemented as issue
  reported in Jira ticket VPP-99 still not fixed

Jira: CSIT-1147

Change-Id: I4ebc622bd81fed421919bc0397a12e32cb26fa1d
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-07-18 08:31:33 +00:00
Klement Sekera
8aedf5e287 vpp-api: improve naming for easier debugging
Change-Id: I487ccf2adabfbd22dac9f492ecff679d38046724
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-07-18 08:30:47 +00:00
Hongjun Ni
54d0ac39f7 VPP crash when run "lb set interface nat4 in <intc>" VPP-1343
Change-Id: I23be9c29227e7dd1bb11b5b7fa910bb61c2be6c9
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
(cherry picked from commit b4b2488202ff4282cc4a7bd779cc33934286c5cd)
2018-07-18 04:41:09 +00:00
Andreas Schultz
d6dfd00232 Fix GTP-U length header field in encoding
The length in the GTPU header does not specify the length of the
payload. It does specify the number of bytes following the fixed
part (the first 8 bytes) of the GTPU header (see 3GPP TS 29.060,
Sect. 9.3.1).

Change-Id: I8ce73df015e1cf1f38d306666962c0058756111c
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
2018-07-18 04:39:56 +00:00
Andreas Schultz
96cc67dd80 Fix GTP-U header in 4x IPv4 vector encapsulation
The fourth GTP-U packet had a wrong reference, leading to data
corruption.

Change-Id: Id82f87368183d5e8b7047133c5ea799f2a9cb43c
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
2018-07-18 01:39:15 +00:00
Damjan Marion
882fcfe6f0 vppinfra: increase max bihash arena size to 512GB
Change-Id: Ic636297df4c03303fdcb176669f0268d80e22123
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-18 00:03:55 +00:00
Damjan Marion
96f40a0563 memif: vectorized buffer enqueue in input node
Change-Id: If6970788396c85415634f12304f49eed0d812281
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-17 21:27:13 +00:00
Neale Ranns
6a0f7dd302 Bump the VPP version in configure.ac
How many engineers does it take to change a lightbulb?

Change-Id: I28a34e0ae49ce4f95b12a342c4664198a20f4574
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-17 16:46:32 -04:00