4451 Commits

Author SHA1 Message Date
John DeNisco
2d1a04371a Fix .gitignore so docs/Makefile is not ignored. Add README and Makefile. Fis gitreview.
Change-Id: I3d664d9c881ce127a09b9d68c1181a7098a39074
Signed-off-by: John DeNisco <jdenisco@cisco.com>
2018-07-27 00:13:36 +00:00
Brian Brooks
9bae0ca53b pp2: change default queue size
Reduce default queue size to twice the vlib frame size. This throttles
the PP from transferring more packets than are necessary for the next
round of graph execution on a core. When combined with DMA'ing into L3
cache, Mpps for 64B packets increases 35%.

Change-Id: I0afe426d23560f262fdc56accb6302b099bd0076
Signed-off-by: Brian Brooks <brian.brooks@arm.com>
2018-07-26 20:18:12 +00:00
Dave Barach
f91080c011 Clean up dpdk plugin rx/tx pcap tracing
Needed a spinlock to protect the data vector. Cleaned up debug cli so
the output makes sense, and so that various parameters exist in one
place. Removed a nonsense memset-to-zero which led to ultra-confusing
results.

Change-Id: I91cd14ce7fe84fd2eceab86e016b5ee001993be4
Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-07-26 19:24:32 +00:00
Dave Barach
9594b56e6f Improve the sample plugin node dispatch function
Three separate implementations, which vary by nearly a factor of two
in performance. Most of the performance difference is due to swapping
the src/dst mac addresses with an avx2 vector shuffle instruction.

Change-Id: Ieb36546d6074e4ac720d452a99d013c698135c57
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-26 19:09:14 +00:00
John DeNisco
06dcd45ff8 Initial commit of Sphinx docs
Change-Id: I9fca8fb98502dffc2555f9de7f507b6f006e0e77
Signed-off-by: John DeNisco <jdenisco@cisco.com>
2018-07-26 18:34:47 +00:00
Neale Ranns
1d65279ffe VPP-API client: timeout thread loop variable
calling thread cancel on the timeout thread whilst it was
sleep on condwait and then send the cond signal did not reliably
wake up the thread.
instead don;t cancel the thread, use a loop variable to terminate it.

Change-Id: Ibc8ab6f21db7e4a98266bdf88b8b208b887820dd
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-07-26 08:05:57 -07:00
Lukasz Majczak
b842ae1178 VPP-1359 Wrong vl_msg_id
Wrong vl_msg_id set in vl_api_stats_get_poller_delay_t_handler while reporting stats delay.

Change-Id: I7d6ad14359e41c717b976390c58e254e3602e0ff
Signed-off-by: Lukasz Majczak <lma@semihalf.com>
2018-07-26 14:16:13 +00:00
Damjan Marion
c4b094eae0 avf: used tx queue should be enabled
Change-Id: I51cc4522df2dd6682148a13e7e1903850b4b3d08
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-26 12:25:32 +00:00
Damjan Marion
48a87f2c95 vppinfra: add SSE4.2 version of u8x16_shuffle
Change-Id: I4bf1cfe5a9492092a7362675079c47629b6f0ee8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-26 10:58:52 +00:00
Jakub Grajciar
ae9118055f avf: request queues support
Change-Id: I3a4529ff8dae70da99ec95c39ddf788c9498f478
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-07-26 10:58:27 +00:00
Neale Ranns
055b231d25 L2 Flood: use the buffer clone API rather than buffer recycle
Change-Id: I40e4efd8061369efc535f0d49b2f63668b6d1d15
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-07-26 09:15:54 +00:00
Damjan Marion
351b3a0c3e avf: fix interrupt mode
- assign rx thread on interface create, not on admin up
- keep interrupts unmasked all the time as they are needed for writeback
- forward interrupt to graph dispatcher only if queue is in the interrupt mode

Change-Id: I5cc5afe24960143bef08f12d59fbd80ae0c6ccf8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-26 07:19:56 +00:00
Neale Ranns
3451d98550 Generate vppinfra/config.h from config.in script (same as we do for vlib/config.h)
Change-Id: I55549b589e34a62d3704f788fce801392de22f46
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-25 21:46:26 +00:00
Jakub Grajciar
605afa0cd9 VPP-1332 memif: add/del socket filename bugfix
in case of relative path, create subdirs inside runtime dir.
in case of absolute path, if folder does not exist return error.

Change-Id: I01fe018102c69deb105160cfa18b741541d76c82
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-07-25 19:58:45 +00:00
Jakub Grajciar
4e6014fc9e avf: api fix
avf_create_reply returns software index for the new interface

Change-Id: I8a6b1a1985b072efafa24eb258b1f2cb1bea1110
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-07-25 12:05:29 +00:00
Jan Gelety
e8b68a3da2 make_test: Add equal-cost multi-path routing tests
Jira: CSIT-1181

Change-Id: I78f85cf58696369070314bdf05ae8b3acf2ca84c
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-07-25 08:06:12 +00:00
Dave Barach
8b5dc4fd5e Create a unit-test plugin
Move the tcp unit test to the plugin
Add a bihash unit test and a "make test" program to call it
Adjust framework.py to load the plugin, which is disabled by default

Change-Id: Ic229d386a56a9d28dbd54974f231149053ca8f93
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-24 16:45:53 +00:00
Neale Ranns
1678236897 test frame work pump thread exit: set flag then wake
Change-Id: Id95b8a7ad1bf550f615c50d77b16a530cc8fc2c4
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-24 16:44:52 +00:00
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