vpp.git
4 years agoplugins: http_static. Migrate to use api string type. 98/19698/8
Paul Vinciguerra [Sun, 19 May 2019 02:09:28 +0000 (22:09 -0400)]
plugins: http_static. Migrate to use api string type.

This is not my core competency.
Reviews/feedback/suggestions welcomed. ;)

Tested with:
  rv = self.vapi.http_static_enable(
             fifo_size = 1,
             cache_size_limit = 1000000,
             prealloc_fifos = 0,
             private_segment_size = 0,
             uri="tcp://0.0.0.0/80",
             www_root = "/var/tmp/run/vpp/html"
             )

  DBGvpp# show http static server
  www_root /var/tmp/run/vpp/html, cache size 0 bytes, limit 1000000 bytes, evictions 0

Change-Id: I0f660753317ceedab89da1b65701a24d6f7145de
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agonsim: remove buffer u32 upper bound 20/19820/2
Korian Edeline [Fri, 24 May 2019 13:40:08 +0000 (15:40 +0200)]
nsim: remove buffer u32 upper bound

Extreme BDP flows requires more buffer memory.

Change-Id: I1134be248c6bdd719fa1a033bca41414ceb73371
Signed-off-by: Korian Edeline <korian.edeline@ulg.ac.be>
4 years agodocs: Add some packages for building the docs 57/19857/2
jdenisco [Tue, 28 May 2019 13:58:33 +0000 (13:58 +0000)]
docs: Add some packages for building the docs

Change-Id: I7af427ba6378ddd8480a153a65ec11c578bab12e
Signed-off-by: jdenisco <jdenisco@cisco.com>
4 years agol2tp: l2tp-decap-local don't accept packets unless configured 40/19840/3
Jakub Grajciar [Mon, 27 May 2019 10:23:57 +0000 (12:23 +0200)]
l2tp: l2tp-decap-local don't accept packets unless configured

Change-Id: I2e48eb772dc44912192d0684b8ee631d8d975e9e
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agomake test: add option in pg interfaces for duplicating packets 97/19397/6
Alexandre Poirrier [Tue, 7 May 2019 08:43:41 +0000 (10:43 +0200)]
make test: add option in pg interfaces for duplicating packets

Change-Id: Ia6d6de5de0414291d5637fb4b8c1480925f646d3
Signed-off-by: Alexandre Poirrier <apoirrie@cisco.com>
4 years agoipsec: ah_encrypt rework 16/19016/11
Filip Tehlar [Wed, 17 Apr 2019 07:16:39 +0000 (07:16 +0000)]
ipsec: ah_encrypt rework

call crypto backend only once per node call

Change-Id: I0faab89f603424f6c6ac0db28cc1a2b2c025093e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agodocs: Add VPP API language documentation 89/19389/6
Ole Troan [Tue, 7 May 2019 07:16:18 +0000 (09:16 +0200)]
docs: Add VPP API language documentation

Initial commit of VPP API language documentation.

Change-Id: Ied67203265319a8603086486c9031e723484c501
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agoPunt: socket register for exception dispatched/punted packets based on reason 42/19642/14
Neale Ranns [Wed, 15 May 2019 09:13:37 +0000 (02:13 -0700)]
Punt: socket register for exception dispatched/punted packets based on reason

- add to the Punt API to allow different descriptions of the desired packets: UDP or exceptions
- move the punt nodes into punt_node.c
- improve tests (test that the correct packets are punted to the registered socket)

Change-Id: I1a133dec88106874993cba1f5a439cd26b2fef72
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoAdd an ip6 local hop-by-hop protocol demux table 24/19824/5
Dave Barach [Fri, 24 May 2019 17:03:01 +0000 (13:03 -0400)]
Add an ip6 local hop-by-hop protocol demux table

Add a minimal ip6 hbh header processing test.

ioam plugin: use ip6_local_hop_by_hop_register_protocol() in
udp_ping_init().

Please test the ioam plugin udp_ping path AYEC, so I can
publish the patch.

Change-Id: I74e35276d6c38c31022026cfd238fad5e4a54485
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agonat44: make nat44-ed-hairpin-src follow arc 43/19743/3
Matthew Smith [Tue, 21 May 2019 21:20:11 +0000 (16:20 -0500)]
nat44: make nat44-ed-hairpin-src follow arc

It defaults to using interface-output as the next node. If other
output features are enabled on the ip4-output arc, they get skipped.
That makes me sad.

Change-Id: I3f4d3320fb8092918e1e0663c66baca1c74c26ec
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
4 years agogre: don't register gre input nodes unless a gre tunnel is created 09/19809/3
Jakub Grajciar [Fri, 24 May 2019 06:25:03 +0000 (08:25 +0200)]
gre: don't register gre input nodes unless a gre tunnel is created

Change-Id: Id5c0f420e32e0504cea660fed2013f3ad28088aa
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agopapi: avoid IOError on disconnect 44/19844/2
Vratko Polak [Mon, 27 May 2019 16:36:23 +0000 (18:36 +0200)]
papi: avoid IOError on disconnect

Change-Id: I331efb20b98a7e3c507d9158d0221ee7d5353b18
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
4 years agotap: crash in multi-thread environment 43/19843/2
Mohsin Kazmi [Mon, 27 May 2019 13:53:25 +0000 (15:53 +0200)]
tap: crash in multi-thread environment

In tap tx routine, virtio_interface_tx_inline, there used to be an
interface spinlock to ensure packets are processed in an orderly fashion
  clib_spinlock_lock_if_init (&vif->lockp);

When virtio code was introduced in 19.04, that line is changed to
  clib_spinlock_lock_if_init (&vring->lockp);
to accommodate multi-queues.

Unfortunately, althrough the spinlock exists in the vring, it was never
initialized for tap, only for virtio. As a result, many nasty things can
happen when running tap interface in multi-thread environment. Crash is
inevitable.

The fix is to initialize vring->lockp for tap and remove vif->lockp as it
is not used anymore.

Change-Id: I82b15d3e9b0fb6add9b9ac49bf602a538946634a
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit c2c89782d34df0dc7197b18b042b4c2464a101ef)

4 years agosnap_input: simplify code using existing functions 47/19847/2
Zhiyong Yang [Tue, 28 May 2019 04:38:11 +0000 (00:38 -0400)]
snap_input: simplify code using existing functions

Change-Id: Ia0cadebab8b800e34e9574601cdebee5ca90cc6a
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agollc_input: simplify code using existing functions 48/19848/2
Zhiyong Yang [Tue, 28 May 2019 04:57:39 +0000 (00:57 -0400)]
llc_input: simplify code using existing functions

Change-Id: I3906adf9aa20b4221eeb7a8b5b353c6f0cb32d04
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agohdlc_input: simplify code using existing functions 49/19849/1
Zhiyong Yang [Tue, 28 May 2019 05:26:05 +0000 (01:26 -0400)]
hdlc_input: simplify code using existing functions

Change-Id: I527b7e43dfba05eab12591e193f07f5036e33f56
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agoIPIP tunnel: use address types on API 30/19830/3
Neale Ranns [Sun, 26 May 2019 18:34:27 +0000 (11:34 -0700)]
IPIP tunnel: use address types on API

Change-Id: Ida6a8f96bd858246e993250087bed45e7084ede1
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agovirtio: Add gso support for native virtio driver 91/19291/7
Mohsin Kazmi [Thu, 2 May 2019 11:54:59 +0000 (13:54 +0200)]
virtio: Add gso support for native virtio driver

Change-Id: I7b735f5a540e8c278bac88245acb3f8c041c49c0
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 years agounittest: fix test crypto perf for AEAD algos 13/19813/2
Damjan Marion [Thu, 23 May 2019 18:46:33 +0000 (20:46 +0200)]
unittest: fix test crypto perf for AEAD algos

Change-Id: I055014ff0bc7f6d32d59eaf3511ecb91e268d49b
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agovppinfra: add pclmulqdq x86 cpuid flag 14/19814/2
Damjan Marion [Fri, 24 May 2019 11:05:08 +0000 (13:05 +0200)]
vppinfra: add pclmulqdq x86 cpuid flag

Change-Id: If59fea9bb733f6a134d9cb5a9f61dfabf3441820
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agogeneve: encap performance enhancement 04/19704/4
Zhiyong Yang [Mon, 20 May 2019 05:31:38 +0000 (01:31 -0400)]
geneve: encap performance enhancement

This patch can help save 2.7 clocks/pkt from 51.5 to 48.5
clocks/pkt on Skylake server.

Change-Id: I10173c8a147a0e54f925c7841c26f133eb75cbed
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agorewrite vnet_interface_output_node_inline_gso 41/19341/3
Zhiyong Yang [Sun, 5 May 2019 11:32:25 +0000 (19:32 +0800)]
rewrite vnet_interface_output_node_inline_gso

1. Using vlib_get_buffers replaces original logic.
2. Simplify some implementation.

Change-Id: I46cd3487c1d3289074d9dff22aa384688be326dd
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agodpdk: vlan strip config does not take effect in default device 33/19833/3
Chenmin Sun [Mon, 27 May 2019 14:05:42 +0000 (22:05 +0800)]
dpdk: vlan strip config does not take effect in default device

copy vlan strip config from default device

Change-Id: I4ad1c159bad964fd1900b5ae4960b7014dd9f9b1
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
4 years agodpdk: fix rss configuration error issue 31/19831/2
Chenmin Sun [Fri, 24 May 2019 17:47:40 +0000 (01:47 +0800)]
dpdk: fix rss configuration error issue

Reorder foreach_dpdk_rss_hf to fix rss configuration error issue.

Change-Id: Idec45534cd7dfe810b25584b1b27ac52b1c45110
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
4 years agotcp: handle disconnects in rcv-process 89/19789/2
Florin Coras [Thu, 23 May 2019 13:19:09 +0000 (06:19 -0700)]
tcp: handle disconnects in rcv-process

Change-Id: I005f96480e81f3e750c18261e78d0e401da7528e
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agotcp: handle fin+rst in same frame 26/19826/2
Florin Coras [Fri, 24 May 2019 05:28:16 +0000 (22:28 -0700)]
tcp: handle fin+rst in same frame

Change-Id: Ie7a6c7b92a6beeb356f01384216a4982fb3d420e
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agovxlan-gpe: improve encap performance 30/19630/3
Zhiyong Yang [Thu, 16 May 2019 08:03:18 +0000 (04:03 -0400)]
vxlan-gpe: improve encap performance

This patch improves performance by prefetching encap header area
and taking full advantage of optimized function vlib_get_buffers.
After applying the patch, the function vxlan_gpe_encap can save
4.1 clocks/pkt from 41.7 to 37.6 clocks/pkt on Skylake.

Change-Id: I85d486b21a2524d64f2e246dfb4183539ec2532d
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agoudp-ping: disable due to conflict with mldv2 16/19816/2
Florin Coras [Fri, 24 May 2019 11:30:08 +0000 (04:30 -0700)]
udp-ping: disable due to conflict with mldv2

Change-Id: I9e6a0fb583b0b6dd9b5e16aa9169bdf7b99a7664
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoip4/6-reassembly fixes 99/19799/2
Vijayabhaskar Katamreddy [Thu, 23 May 2019 20:02:28 +0000 (13:02 -0700)]
ip4/6-reassembly fixes

When multichained fragments comes into reassembly, followed by buffer Linearization or dropping the buffer for other reasons inbetween disturbs the multichained mbuf linking.
When packet is transmitted, followed by freeing of the buffers, woudl result in double free and packet corruptions

Change-Id: Ib5711d54e61fdd6a67deb30dad0b2a14afb9c2da
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
4 years agoAdd callback multiplex support 20/19720/10
Dave Barach [Mon, 20 May 2019 14:28:57 +0000 (10:28 -0400)]
Add callback multiplex support

Change-Id: Iddeb3a1b0e20706e72ec8f74dabc60b342f003ba
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agoTap: Fix the indirect buffers allocation VPP-1660 87/19787/2
Mohsin Kazmi [Thu, 23 May 2019 12:32:58 +0000 (14:32 +0200)]
Tap: Fix the indirect buffers allocation VPP-1660

Indirect buffers are used to store indirect descriptors
to xmit big packets.
This patch moves the indirect buffer allocation from
interface creation to device node. Now it allocates
or deallocates buffers during tx for chained buffers.

Change-Id: I55cec208a2a7432e12fe9254a7f8ef84a9302bd5
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit 55203e745f5e3f1f6c4dbe99d6eab8dee4d13ea6)

4 years agordma: add support for promiscuous mode 94/19794/2
Benoît Ganne [Wed, 22 May 2019 16:09:19 +0000 (18:09 +0200)]
rdma: add support for promiscuous mode

rdma interfaces filter packets per MAC by default to share the physical
interface between multiple users (eg. VPP and Linux).
When configured in promiscuous mode, all packets will go to this
interface, regardless of the MAC. All other interface will not receive
anymore packet while it is in promiscuous mode.
Promiscuous mode is needed (and automatically turned on) for L2 path
(l2patch, xconnect, bridge...).

Change-Id: I4c0eb4421f51d116e635e7828d00f202f4a97ded
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agoRemove historical ip4 icmp OAM code 95/19795/3
Dave Barach [Thu, 23 May 2019 16:38:22 +0000 (12:38 -0400)]
Remove historical ip4 icmp OAM code

Add a registration overwritten warning to ip4_icmp_register_type(...)

Change-Id: I6c2aabdb979b54ec49e827225acc74559ac4caab
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agostats: fix memory leak in statseg config 98/19798/2
Dave Wallace [Thu, 23 May 2019 16:55:19 +0000 (12:55 -0400)]
stats: fix memory leak in statseg config

Type: fix

Change-Id: I383d5b189efc90ad418725b7e52888138dee0f75
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
4 years agovpp_papi: Do not raise before find_api_dir() 36/19636/3
Vratko Polak [Thu, 23 May 2019 17:01:29 +0000 (19:01 +0200)]
vpp_papi: Do not raise before find_api_dir()

The change https://gerrit.fd.io/r/18352 has introduced a check
which raises when neither apifiles nor apidir are set.
This change removes that check, as it broke CSIT.

If such a check is intended, find_api_dir() should be removed.
Also, make sure you do not break CSIT next time.

Change-Id: I0faab7c41d199e3aa5d5bc6aab0defd1ab9e10da
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
4 years agorpm: VPP-1674: exclude external headers from rpm 92/19792/1
Benoît Ganne [Tue, 14 May 2019 09:11:16 +0000 (11:11 +0200)]
rpm: VPP-1674: exclude external headers from rpm

External libraries headers such as DPDK, libibverb, quicly, etc. should
not be packaged in vpp-dev RPM.
Only package headers from vpp/ and vom/ subdirs.

Change-Id: Ief1454bd1261c8cf4dcd3b105e28f6852439e896
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agofix rte_eth_dev_info’ has no member named ‘pci_dev’ when run show_dpdk_hqos_queue_stats 67/19067/2
cohu [Fri, 19 Apr 2019 10:27:22 +0000 (06:27 -0400)]
fix rte_eth_dev_info’ has no member named ‘pci_dev’ when run show_dpdk_hqos_queue_stats

Change-Id: Ic1a900e0fb85ee016af21535764dfca2e6282194
Signed-off-by: cohu <cong.hu@tieto.com>
4 years agocrypto_ia32: multiarch 60/19760/4
Damjan Marion [Wed, 22 May 2019 13:11:18 +0000 (15:11 +0200)]
crypto_ia32: multiarch

Change-Id: Iead43a2b524b735a2069e611d899cd41d3a8efdc
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agoFix vpp crash bug while deleting dhcp client 55/19455/4
jackiechen1985 [Thu, 9 May 2019 08:57:16 +0000 (16:57 +0800)]
Fix vpp crash bug while deleting dhcp client

We must do lock fib while vrf id ~0, otherwise it crashes while unlocking fib.

Change-Id: Iec9754ccd67634a132bc5384a4f796d4a65943ae
Signed-off-by: jackiechen1985 <xiaobo.chen@tieto.com>
4 years agoOptimize code 48/19248/2
jackiechen1985 [Tue, 30 Apr 2019 09:01:29 +0000 (17:01 +0800)]
Optimize code

Replace enqueue code with marcro vlib_validate_buffer_enqueue_x1

Change-Id: I4b454b1d73fa5adbaf5f40cf45dc8975878ac93b
Signed-off-by: jackiechen1985 <xiaobo.chen@tieto.com>
4 years agofix show session verbose crash with quic transport 65/19765/2
Dave Wallace [Wed, 22 May 2019 23:12:09 +0000 (19:12 -0400)]
fix show session verbose crash with quic transport

Type: fix

Change-Id: I8199c233f6968ac147fb1867a4f10ef04d67642f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
4 years agofix show session verbose crash with udp transport 64/19764/1
Dave Wallace [Wed, 22 May 2019 22:56:57 +0000 (18:56 -0400)]
fix show session verbose crash with udp transport

Type: fix

Change-Id: Ib3a2777317f8c57e91ce43820ad7ca5d10ac8677
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
4 years agonew_log2_pages may increase 2 30/17930/9
dongjuan [Fri, 1 Mar 2019 02:34:27 +0000 (10:34 +0800)]
new_log2_pages may increase 2
when try_resplit

Signed-off-by: dongjuan <dong.juan1@zte.com.cn>
Change-Id: I3ebbe7d2d11453700503df7f3be549781d8b73a7

4 years agogtpu: don't register udp ports unless a tunnel is created 52/19752/2
Jakub Grajciar [Wed, 22 May 2019 09:51:47 +0000 (11:51 +0200)]
gtpu: don't register udp ports unless a tunnel is created

Change-Id: I2945c2a2062ee5eda78f783c55cf16c2d60f959c
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agovxlan-gpe: fix CLI document error 50/19750/2
Zhiyong Yang [Wed, 22 May 2019 07:49:43 +0000 (03:49 -0400)]
vxlan-gpe: fix CLI document error

Change-Id: Id95fd604ed181a2f70c24e2c8cc4321755b7ba7f
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agomake test: fix bug due to concurrent commits 63/19763/2
Klement Sekera [Wed, 22 May 2019 18:18:26 +0000 (20:18 +0200)]
make test: fix bug due to concurrent commits

Change-Id: I912745950fe6e3f1688ef66b430ef86cdddd04cd
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agomake test: Fix QUIC External apps transfer test 24/19724/2
Dave Wallace [Mon, 20 May 2019 19:57:28 +0000 (15:57 -0400)]
make test: Fix QUIC External apps transfer test

Change-Id: Idc4cd1d3b29d4656f2df998162e6f99116518a58
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
4 years agoFix Diffie-Hellman exchange with newer openssl API 58/19658/2
Christian E. Hopps [Thu, 16 May 2019 16:24:57 +0000 (12:24 -0400)]
Fix Diffie-Hellman exchange with newer openssl API

Change-Id: Id42a597c130d0053d074446e552a81c7264549e7
Signed-off-by: Christian E. Hopps <chopps@chopps.org>
4 years agostats: support multiple works for error counters 45/19645/8
Ole Troan [Thu, 16 May 2019 13:01:34 +0000 (15:01 +0200)]
stats: support multiple works for error counters

The current code only allowed access to the main thread error counters.
That is not so useful for a multi worker instance.
No return a vector indexed by thread of counter_t values.

Type: fix

Change-Id: Ie322c8889c0c8175e1116e71de04a2cf453b9ed7
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agosvm_queue_timedwait_inline: lock after wait 35/19735/2
Vratko Polak [Tue, 21 May 2019 11:47:29 +0000 (13:47 +0200)]
svm_queue_timedwait_inline: lock after wait

This fixes a typo introduced in https://gerrit.fd.io/r/18198

Change-Id: I634a06be95154d3e1c5e5711ea69f19c9c4cca44
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
4 years agodocs: add quic subpage to user docs 37/19737/1
Vratko Polak [Tue, 21 May 2019 14:39:20 +0000 (16:39 +0200)]
docs: add quic subpage to user docs

+ Sort subpage list.
+ Fix copypaste error in quic doc label.

Change-Id: Id8bdb4ad0d744f9886db3631ddad0e29bbb3c938
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
4 years agovmxnet3: gso_l4_hdr_sz is not set correctly 53/19653/2
Steven Luong [Thu, 16 May 2019 16:25:46 +0000 (09:25 -0700)]
vmxnet3: gso_l4_hdr_sz is not set correctly

vnet_buffer2 -> gso_l4_hdr_sz is not set correctly because
vnet_buffer->l4_hdr_offset is not set yet at the top. Move the code to set
vnet_buffer->gso_l4_hdr_sz further down.

Change-Id: I0110e4687572bb93cb593d7d4d14a3d5083af13a
Signed-off-by: Steven Luong <sluong@cisco.com>
4 years agogeneve_input: leverage vlib_get_buffers 27/19727/2
Zhiyong Yang [Tue, 21 May 2019 05:46:35 +0000 (01:46 -0400)]
geneve_input: leverage vlib_get_buffers

vlib_get_buffers helps save 1.4 clocks/pkt from 34.6 to 33.2
clocks/pkt on Skylake.

Change-Id: I741d10d20373f12d30ec8b04ad8c7444ffb42246
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agoQUIC: Add initial documentation 21/19721/2
Aloys Augustin [Mon, 20 May 2019 15:39:17 +0000 (17:39 +0200)]
QUIC: Add initial documentation

Change-Id: Ic00f8827f572e13b07d55c6c2f10fb6cdebf7e72
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
4 years agoopenssl plugin 3des routine iv_len fix 85/19685/7
Vladimir Ratnikov [Fri, 17 May 2019 13:17:59 +0000 (09:17 -0400)]
openssl plugin 3des routine iv_len fix

Since 3DES has 8 bytes of initialization vector and
code contains hardcode for 16 bytes, check added to
determine if crypto algorythm is 3DES_CBC and set
corresponding iv_len param

Change-Id: Iac50c8a8241e321e3b4d576c88f2496852bd905c
Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
4 years agoIPSEC: rename default backend 55/19655/2
Neale Ranns [Thu, 16 May 2019 17:09:28 +0000 (17:09 +0000)]
IPSEC: rename default backend

Change-Id: I3a4883426b558476040af5b89bb7ccc8f151c5cc
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoreassembly: prevent long chain attack 43/19643/3
Klement Sekera [Thu, 16 May 2019 12:35:46 +0000 (14:35 +0200)]
reassembly: prevent long chain attack

limit max # of fragments to 3 per packet by default
add API option to configure the limit at runtime

Change-Id: Ie4b9507bf5c6095b9a5925972b37fe0032f4f9e8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agobonding: clean up redundant code 42/19442/2
Zhiyong Yang [Thu, 9 May 2019 02:57:53 +0000 (22:57 -0400)]
bonding: clean up redundant code

1. remove unnecessary cast for void * pointer.
2. remove the unused input parameter.

Change-Id: Ic0324364fc0c772200d30fb18a0ba959ed4f7ea4
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agoconsolidate all mutux opertion 98/18198/4
Ping Yu [Tue, 12 Mar 2019 09:28:16 +0000 (05:28 -0400)]
consolidate all mutux opertion

replace all pthread_mutex_lock/unlock to be svm_queue_lock/unlock
So there all operation is based on defined mutux, and it can help us
to debug or replace mutux locking method

Change-Id: I9aeeb03bbbbf3d7a824c06a535e5d6a6b463b42c
Signed-off-by: Ping Yu <ping.yu@intel.com>
4 years agoapi: export ip_types.api for out-of-tree plugins 78/19678/2
Benoît Ganne [Fri, 17 May 2019 12:24:17 +0000 (14:24 +0200)]
api: export ip_types.api for out-of-tree plugins

Out-of-tree plugins can refer to IP types in their API. The .api and
associated headers must be exported.

Change-Id: I75004343b040defd9eebac6a8a95c2ecf3c8079a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agoemacs-lisp: add missing '\' in template 96/19696/1
Dave Barach [Sat, 18 May 2019 18:52:54 +0000 (14:52 -0400)]
emacs-lisp: add missing '\' in template

Fixes the generated setup_message_id_table(...)
implementation. Without a level of quoting in the emacs lisp skeleton,
the underscore macro used to generate calls to
vl_msg_api_add_msg_name_crc produces "fooCRC" instead of "foo_CRC".
That confuses the Python language binding.

Punctuation saves lives: "Let's eat Grandma" vs. "Let's eat, Grandma."
Or some such.

Change-Id: Ibecc20337092199d6757165ac96b70c830511bb3
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agoAdd a debug-CLI leak-checker 90/19690/4
Dave Barach [Fri, 17 May 2019 14:46:40 +0000 (10:46 -0400)]
Add a debug-CLI leak-checker

leak-check { <any-debug-cli-command-and-args> }

Hint: "set term history off" or you'll have to sort through a bunch of
bogus leaks related to the debug cli history mechanism.

Cleaned up a set of reported leaks in the "show interface" command. At
some point, we thought about making a per-thread vlib_mains vector,
but we never did that. Several interface-related CLI's maintained
local static cache vectors. Not a bad idea, but not useful as things
shook out. Removed the static vectors.

Change-Id: I756bf2721a0d91993ecfded34c79da406f30a548
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agoTrivial typo. punt_node.c 82/19582/2
Paul Vinciguerra [Wed, 15 May 2019 03:51:45 +0000 (23:51 -0400)]
Trivial typo. punt_node.c

Change-Id: I1455cb507f6ecffbb053b0e3e2de833dd40fa5f5
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agoTests: Refactor. Remove copies of enums. 87/19687/2
Paul Vinciguerra [Fri, 17 May 2019 13:48:15 +0000 (09:48 -0400)]
Tests: Refactor. Remove copies of enums.

Use the enums provided from the api definitions instead.

Change-Id: I43b7591df920c984e439efc4b3ec3c4121c539d8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agomake test: Add QUIC serial transfer test 24/19624/5
Dave Wallace [Thu, 16 May 2019 01:41:23 +0000 (21:41 -0400)]
make test: Add QUIC serial transfer test

Change-Id: I7ed68dd199daa31269d45d67e0a4fa632e1a08d1
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
4 years agoTests: Raise exception if API cli_inband command fails. 23/19523/8
Paul Vinciguerra [Sat, 11 May 2019 00:41:08 +0000 (20:41 -0400)]
Tests:  Raise exception if API cli_inband command fails.

* Configure tests to raise exception if cli_inband fails.
* Fix failing tests.
* Add filename detail to pcap.stat clib_error_return for debugging.

Note: this change identifies spurious issues with packet-generator such as:
  CliFailedCommandError: packet-generator capture: pcap file
  '/tmp/vpp-unittest-Test6RD-v09RPA/pg0_out.pcap' does not exist.

These issues resolve themselves on remaining test passes.

Change-Id: Iecbd09daee954d892306d11baff3864a43c5b603
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agodocs: Fix Versions and Titles 94/19694/2
jdenisco [Fri, 17 May 2019 17:43:31 +0000 (17:43 +0000)]
docs: Fix Versions and Titles

Change-Id: I131e33a570bff8b22c767585d03e2eb281dd7184
Signed-off-by: jdenisco <jdenisco@cisco.com>
4 years agoFix punctuation fails in 2x plugins 95/19695/1
Dave Barach [Fri, 17 May 2019 18:48:27 +0000 (14:48 -0400)]
Fix punctuation fails in 2x plugins

More to the point: fix the Python API binding for the plugins.

The http_static and ct6 plugin setup_message_id_table calls didn't
have "_"'s between message names and CRCs. I would have expected this
to originate in the emacs skeleton, but the skeleton is correct.

Punctuation saves lives: "Let's eat Grandma..." != "Let's eat,
Grandma..." More or less.

Change-Id: Icd87813308701d203cf6f147b2bb90d39d51ddeb
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agoLoad vat plugins late in the init sequence 93/19693/2
Dave Barach [Fri, 17 May 2019 17:13:05 +0000 (13:13 -0400)]
Load vat plugins late in the init sequence

After the related data-plane plugins have initialized their message IDs.

Change-Id: I4202a9e46ef6cdb12a5186be0f2370e2f9ccbb78
Signed-off-by: Dave Barach <dave@barachs.net>
4 years ago19.01.2 Release Notes 92/19692/1
Andrew Yourtchenko [Fri, 17 May 2019 14:35:08 +0000 (14:35 +0000)]
19.01.2 Release Notes

Change-Id: Ia68372d397504ede789e40e9f7e1b939d09bc81a
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
4 years agoUDP-Local: fix unregistered ports 84/19684/3
Neale Ranns [Fri, 17 May 2019 13:04:33 +0000 (06:04 -0700)]
UDP-Local: fix unregistered ports

- if the port is unregistered then write ~0 into the sparse vec, this allows the DP to send packets to ICMP
- remove the v6 arcs from the v4 node and vice-versa (since they're never taken)
- i have tests for this in a pending change for the punt socket

Change-Id: Icbd97de2c2fc38490c16afc2e0b414d8436593c4
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoFix 'terminal history off' crasher 88/19688/1
Chris Luke [Fri, 17 May 2019 14:17:16 +0000 (10:17 -0400)]
Fix 'terminal history off' crasher

- 'set terminal history off' or '... limit 0' has an incorrect
  terminal condition and tries to vec_delete one-too-many times
  causing a crash.
- Changing >= to > fixes this.
- In any case, a single vec_delete is more efficient, so do that
  instead.

Change-Id: Ia0db63b6c5c7891d75b302e793b4e4985dd86ebb
Signed-off-by: Chris Luke <chrisy@flirble.org>
4 years agodpdk-ipsec: fix encrypt/decrypt single queue 83/19383/4
Sergio Gonzalez Monroy [Mon, 6 May 2019 20:44:14 +0000 (22:44 +0200)]
dpdk-ipsec: fix encrypt/decrypt single queue

When the same worker thread processes packet for encrypt and decrypt,
ie. single worker with bi-directional traffic, given that the queue is
shared results in packets to be decrypted being dropped as the encrypt
always happens first for each main loop.

With this change, each crypto device queue is logically split into two
queues, each half the real size, avoiding the described problem.

Change-Id: Ifd3f15e316c92fbd6ca05802456b10a7f73f85da
Signed-off-by: Sergio Gonzalez Monroy <sgmonroy@gmail.com>
4 years agogbp: Add unit tests for contracts 41/19041/3
Mohsin Kazmi [Thu, 18 Apr 2019 13:54:58 +0000 (15:54 +0200)]
gbp: Add unit tests for contracts

Change-Id: Ib6615739b1db44b7788f462196cd477b6e23d67e
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 years agotests: refactor. Replace literal constant w/ named constant. 75/19575/3
Paul Vinciguerra [Tue, 14 May 2019 17:25:49 +0000 (13:25 -0400)]
tests: refactor. Replace literal constant w/ named constant.

* change literal packet count vlaues from 65 to a named constant of 67.
  (This value was recommended to exercise single, dual, and quad loops)

Change-Id: Ieb1738dddacb8b6ea7fa25883032ac01a98399e1
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agoAdd transport_opts to connect_sock bapi 47/19647/3
Nathan Skrzypczak [Thu, 16 May 2019 14:35:40 +0000 (16:35 +0200)]
Add transport_opts to connect_sock bapi

Needed by QUIC to distinguish Q/Ssessions

Change-Id: Idcc9e46f86f54a7d06ce6d870edec1766e95c82d
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agodocs: Update sphinx, requirements, support markdown tables 46/19546/2
jdenisco [Mon, 13 May 2019 16:40:21 +0000 (12:40 -0400)]
docs: Update sphinx, requirements, support markdown tables

Change-Id: Ie7c546f5720b10fe5423397204e1ab5c22d7a2ba
Signed-off-by: jdenisco <jdenisco@cisco.com>
4 years agoDOC ONLY: document VLIB_INIT_FUNCTION scheme 51/19651/2
Dave Barach [Thu, 16 May 2019 16:16:29 +0000 (12:16 -0400)]
DOC ONLY: document VLIB_INIT_FUNCTION scheme

Change-Id: I15c4256621da6c8d47b1a7c41755ee6587996757
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agoinit / exit function ordering 23/19623/4
Dave Barach [Tue, 14 May 2019 22:01:44 +0000 (18:01 -0400)]
init / exit function ordering

The vlib init function subsystem now supports a mix of procedural and
formally-specified ordering constraints. We should eliminate procedural
knowledge wherever possible.

The following schemes are *roughly* equivalent:

static clib_error_t *init_runs_first (vlib_main_t *vm)
{
   clib_error_t *error;

   ... do some stuff...

   if ((error = vlib_call_init_function (init_runs_next)))
     return error;
   ...
}
VLIB_INIT_FUNCTION (init_runs_first);

and

static clib_error_t *init_runs_first (vlib_main_t *vm)
{
   ... do some stuff...
}
VLIB_INIT_FUNCTION (init_runs_first) =
{
    .runs_before = VLIB_INITS("init_runs_next"),
};

The first form will [most likely] call "init_runs_next" on the
spot. The second form means that "init_runs_first" runs before
"init_runs_next," possibly much earlier in the sequence.

Please DO NOT construct sets of init functions where A before B
actually means A *right before* B. It's not necessary - simply combine
A and B - and it leads to hugely annoying debugging exercises when
trying to switch from ad-hoc procedural ordering constraints to formal
ordering constraints.

Change-Id: I5e4353503bf43b4acb11a45fb33c79a5ade8426c
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agoAdd default value for API Nat flags 20/19320/4
Michal Cmarada [Fri, 3 May 2019 10:58:55 +0000 (12:58 +0200)]
Add default value for API Nat flags

Change-Id: I4f1b83ae1c746b8f67f2d12a02081702b9553b44
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
4 years agoAdd QUIC human readable error logs 69/19569/3
Nathan Skrzypczak [Tue, 14 May 2019 12:21:55 +0000 (14:21 +0200)]
Add QUIC human readable error logs

Change-Id: I01cf5074b5a8b0018de5c3f59c9266d350c22f37
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agoIPSEC: remove CLI check for unsupported IPv6-AH - it is supported 16/19616/1
Neale Ranns [Wed, 15 May 2019 13:59:04 +0000 (06:59 -0700)]
IPSEC: remove CLI check for unsupported IPv6-AH - it is supported

Change-Id: I72ec95d4a3009a55b0f1fa7e45f9c53f31ef5fc1
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoFix stats documentation with default socket name 78/19578/2
Igor Mikhailov (imichail) [Tue, 14 May 2019 21:58:21 +0000 (14:58 -0700)]
Fix stats documentation with default socket name

Change-Id: Ibcb726c229cc12705764f771c15110852b420c49
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
4 years agovpp_papi: remove dependency on environment var. VPP_API_DIR. 52/18352/4
Paul Vinciguerra [Mon, 18 Mar 2019 00:34:46 +0000 (17:34 -0700)]
vpp_papi: remove dependency on environment var. VPP_API_DIR.

Change-Id: I9e3af8674e8aae27079fd03f6286f165d777814f
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agoRemove unused function nat44_ha_resync() and error IN_PROGRESS. 77/19577/2
Jon Loeliger [Tue, 14 May 2019 20:02:39 +0000 (15:02 -0500)]
Remove unused function nat44_ha_resync() and error IN_PROGRESS.

The unused function nat44_ha_resync() was the only function that
used the error message VNET_API_ERROR_IN_PROGRESS.  The error
was the only error code that was positive, and didn't really
play well with the other error codes.

Change-Id: I7d03c2ee915094b635f6efdca7427f71e4d19f2b
Signed-off-by: Jon Loeliger <jdl@netgate.com>
4 years agotests: test_pipe.py. Fix missing import. 76/19576/2
Paul Vinciguerra [Tue, 14 May 2019 17:35:19 +0000 (13:35 -0400)]
tests: test_pipe.py. Fix missing import.

* Fix missing import (does not impact 'make test', fixes issue
  running under 'make test-shell')

Change-Id: I634378a8809df5c5b9671555932e797d04a2abbb
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agoQUIC multi thread update 66/19566/2
Aloys Augustin [Tue, 14 May 2019 12:13:51 +0000 (14:13 +0200)]
QUIC multi thread update

* Add support for multiple threads
* Replace quicly buffers with fifos
* Fix cleanup of sessions
* Update quicly release version

Change-Id: I551f936bbec05a15703f043ee85c8e1ba0ab9723
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agosvm: improve fifo segment prealloc support 24/19524/20
Florin Coras [Sat, 11 May 2019 23:55:53 +0000 (16:55 -0700)]
svm: improve fifo segment prealloc support

- track fifo segment free and chunk freelist memory
- improve fifo alloc. If there are enough chunks to satisfy a fifo
  allocation request but not enough free memory, allocate a multi-chunk
  fifo
- add apis to preallocate chunks and fifo headers
- more tests

Change-Id: If18dba7ab856272c9f565d36ac36365139793e0b
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoIPSEC coverity fixes 68/19568/3
Neale Ranns [Tue, 14 May 2019 06:07:43 +0000 (23:07 -0700)]
IPSEC coverity fixes

Change-Id: I753fbce091c0ba1004690be5ddeb04f463cf95a3
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoIPSEC: remove unecessary pass by reference of sequence number 70/19570/2
Neale Ranns [Tue, 14 May 2019 14:01:01 +0000 (07:01 -0700)]
IPSEC: remove unecessary pass by reference of sequence number

Change-Id: Id406eb8c69a89c57305d8f138e8e6730037aa799
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoVPP-1649: fix coverity warning in api_format.c 65/19565/2
Dave Barach [Tue, 14 May 2019 12:12:36 +0000 (08:12 -0400)]
VPP-1649: fix coverity warning in api_format.c

Change-Id: Idc22377ca705a45300faaf8acbc3cae5f10e1c92
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agoPreallocate mhash key_tmps vector 21/19521/5
Dave Barach [Fri, 10 May 2019 19:25:10 +0000 (15:25 -0400)]
Preallocate mhash key_tmps vector

Fix os_get_nthreads() so that it starts returning the correct answer
as early as possible.

Change-Id: Id5292262f2c3f521b07ffbe6a9f6748dcc4dcb7d
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agoIPsec: increment tunnel intf tx counters 73/19473/3
Matthew Smith [Thu, 9 May 2019 13:55:11 +0000 (08:55 -0500)]
IPsec: increment tunnel intf tx counters

Recent changes removed the function that was incrementing the
tx counters. Increment them in the esp_encrypt functions.

Change-Id: I446333a23ccf66e34893adb2aa49af562cf35507
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
4 years agoBuild packages for generic Arm architecture 78/18278/16
Lijian.Zhang [Wed, 27 Feb 2019 10:17:34 +0000 (18:17 +0800)]
Build packages for generic Arm architecture

The current aarch64 version of VPP package distro in cloud repository
 (https://packagecloud.io/fdio/master/ubuntu), is built on a ThunderX server,
using some arch-specific options, for example, 128Byte cache line size,
 T=arm64-thunderx-linuxapp-gcc, RTE_MACHINE=thunderx

The patch is trying to build package distro with aarch64 generic features,
for both binary type targets, e.g., build/build-release, and package type
targets, e.g., pkg-deb/pkg-rpm, with the generic options, e.g.,
128Byte cache line size, T=arm64-armv8a-linuxapp-gcc, RTE_MACHINE=armv8a

If end users want to build arch specific optimized image,
TARGET_PLATFORM variable could be used, as below example,

$ make build-release/pkg-deb TARGET_PLATFORM=thunderx

Change-Id: If78bca8709fe83db6a95e8c26346f206bf5ea71d
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Sirshak Das <Sirshak.Das@arm.com>
Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
4 years agordma: update MAINTAINERS and add doc 64/19364/4
Benoît Ganne [Mon, 6 May 2019 11:15:33 +0000 (13:15 +0200)]
rdma: update MAINTAINERS and add doc

Change-Id: Ida681d299fd57eba66338444b99d2476bdb3c695
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agotests: fix TestMPLSPIC tests in test_mpls.py. 75/19475/4
Paul Vinciguerra [Thu, 9 May 2019 19:53:10 +0000 (15:53 -0400)]
tests: fix TestMPLSPIC tests in test_mpls.py.

* Corrected stray ARP/ND packets in captures interfering with test results.
* Added tests to match counts of recv'd pkts against sent.
* Changes the number of packets to 67 for exercising single,
  dual, and quad-loops.

Change-Id: I9147b8578988607ea4444741d10854e4d8683191
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agoCoverity: Fix CID-198494 & CID-198388 51/19551/2
Dave Wallace [Mon, 13 May 2019 23:23:24 +0000 (19:23 -0400)]
Coverity: Fix CID-198494 & CID-198388

Change-Id: I5fa4a3fa512b732fc444e908729582a109db538c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
4 years agoUnregister UDPC port only when owned 41/19541/2
Nathan Skrzypczak [Mon, 13 May 2019 14:25:50 +0000 (16:25 +0200)]
Unregister UDPC port only when owned

Needed in QUIC, when cleaning up accepted UDP sessions

Change-Id: Ifcb32687175562bed4ca69bdc519cedd4dc3c2bc
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agomake test: vcl fix OSError exception handling 50/19550/2
Dave Wallace [Mon, 13 May 2019 23:21:24 +0000 (19:21 -0400)]
make test: vcl fix OSError exception handling

Change-Id: I4bf7da6752d85e384a8e8f3110964c4b142edcb5
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
4 years agomake test: Add QUIC external echo transfer test 48/19548/4
Dave Wallace [Mon, 13 May 2019 19:51:52 +0000 (15:51 -0400)]
make test: Add QUIC external echo transfer test

- Add namespace configuration to echo_client
- Add external echo transfer testcase
- Refactor quic test class to reduce unnecessary method args
- Increase default fifo size to 64 and data transfer to 10 mbytes
- Remove sleep() between starting internal server & client apps

Change-Id: Ia9de46a314d58e7809f005f6a5211760e63789bf
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>