vpp.git
5 years agovirtio: remove configurable queue size support 73/19273/3
Mohsin Kazmi [Tue, 30 Apr 2019 15:25:26 +0000 (17:25 +0200)]
virtio: remove configurable queue size support

Native virtio device through legacy driver can't support configurable queue size.

Change-Id: I76c446a071bef8a469873010325d830586aa84bd
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agosvm: remove dead code triggering overflow 88/19288/2
Benoît Ganne [Mon, 29 Apr 2019 14:55:46 +0000 (16:55 +0200)]
svm: remove dead code triggering overflow

split_point is incremented twice per iteration whereas we only check for
*split_point != '\0' at the beginning of the iteration.
This code seems dead so remove it altogether.

Change-Id: Iabaf26cd5c0c8f747e267bcff044540a2376d3f6
Signed-off-by: Benoît Ganne <bganne@cisco.com>
5 years agovpp_config: Update deprecated platform.linux_distribution() 85/19285/2
Paul Vinciguerra [Wed, 1 May 2019 04:15:18 +0000 (21:15 -0700)]
vpp_config: Update deprecated platform.linux_distribution()

platform.linux_distribution() was deprecated in python 3.5 and removed in 3.8.

update to use distro.linux_distribution().

>>> import platform
>>> platform.linux_distribution()
('Ubuntu', '16.04', 'xenial')

>>> import distro
>>> distro.linux_distribution()
('Ubuntu', '16.04', 'xenial')

Change-Id: Ia8a7cd2d78fd56145cdded0b9d361a1b45bb4d27
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agovpp_config: correct usage of 'is' for equality tests. 86/19286/2
Paul Vinciguerra [Wed, 1 May 2019 03:57:04 +0000 (20:57 -0700)]
vpp_config: correct usage of 'is' for equality tests.

Change-Id: I30b1cdb2930560d7c40c1bde098fd21f16a17683
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoDOCS: Add link to 19.08 test framework docs 92/19292/1
Dave Wallace [Wed, 1 May 2019 14:42:58 +0000 (10:42 -0400)]
DOCS: Add link to 19.08 test framework docs

Change-Id: Ib0c3e3376152f4ec04e3689fb9ed94a859f1022f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
5 years agoEnable NEON instructions in memcpy_le 35/19135/3
Lijian.Zhang [Thu, 4 Apr 2019 07:26:26 +0000 (15:26 +0800)]
Enable NEON instructions in memcpy_le

Neon version of memcpy_le gives better performance compared with memmove on aarch64

Change-Id: I44b487bb0795a6e70dd1e55bdde4a077773ec859
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Sirshak Das <sirdas@arm.com>
5 years agoesp_encrypt: remove unnecessary code 51/19251/2
Zhiyong Yang [Tue, 30 Apr 2019 09:33:53 +0000 (05:33 -0400)]
esp_encrypt: remove unnecessary code

Change-Id: I2d7e873fca6ab266af75814fac5d4cb5cda93cef
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
5 years agoDOCS: Add link to 19.04 make test documentation 67/19267/2
Dave Wallace [Tue, 30 Apr 2019 13:38:12 +0000 (09:38 -0400)]
DOCS: Add link to 19.04 make test documentation

Change-Id: Iffa44b6a20f8446c94f8412e937ca40273aa8f2f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
5 years agoipsec: fix ipsec format overflow 68/19268/2
Benoît Ganne [Mon, 29 Apr 2019 14:31:24 +0000 (16:31 +0200)]
ipsec: fix ipsec format overflow

hi->name is not NULL-terminated. Use specialized format function which
does the right thing.

Change-Id: Iadda51461af0c1ad4f38a6d24b76e816020f35c8
Signed-off-by: Benoît Ganne <bganne@cisco.com>
5 years agoVPP 19.04 Release Notes 26/19126/2
Dave Wallace [Mon, 22 Apr 2019 21:49:09 +0000 (17:49 -0400)]
VPP 19.04 Release Notes

Change-Id: I66b35c7c03303bc7200c01e9da926bce778b2d6b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 3d18a191aaf31ef8b1524ab80fed22a304adf75d)

5 years agosvm: more fifo refactor/cleanup 05/19205/9
Florin Coras [Mon, 29 Apr 2019 04:16:30 +0000 (21:16 -0700)]
svm: more fifo refactor/cleanup

Change-Id: Ie76c69641c8598164d0d00fd498018037258fd86
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoelf: fix memcmp() overflow 65/19265/3
Benoît Ganne [Fri, 26 Apr 2019 09:09:49 +0000 (11:09 +0200)]
elf: fix memcmp() overflow

name can be (and will be) smaller than section_name_start. Both name and
section_name_start are NULL-terminated so we can use strcmp.

Change-Id: Iec414810109f9267de20c25c0fe601df35daf89e
Signed-off-by: Benoît Ganne <bganne@cisco.com>
5 years agostats: fix non null terminated string 64/19264/3
Benoît Ganne [Fri, 26 Apr 2019 09:08:45 +0000 (11:08 +0200)]
stats: fix non null terminated string

Change-Id: I08e490d9e955072eff20d0141598157d995bcb56
Signed-off-by: Benoît Ganne <bganne@cisco.com>
5 years agovppinfra: fix buffer overflow in unformat_token 63/19263/2
Benoît Ganne [Thu, 18 Apr 2019 15:42:24 +0000 (17:42 +0200)]
vppinfra: fix buffer overflow in unformat_token

Change-Id: Ia60e4092c45c192002de064c362a9265bc9baeec
Signed-off-by: Benoît Ganne <bganne@cisco.com>
5 years agocrypto: enforce per-alg crypto key length 40/19240/2
Benoît Ganne [Mon, 29 Apr 2019 14:05:46 +0000 (16:05 +0200)]
crypto: enforce per-alg crypto key length

Crypto algorithms have different requirements on key length. As we do
not support key stretching (eg. PBKDF2), user must provide the exact
key length used by the algorithm.
Failing that means low-level crypto functions might read garbage (eg.
aes128_key_expand() will read 16-bytes, regardless of the key provided
by the user).

Change-Id: I347a1ea7a59720a1ed07ceaad8b00a31f78458c9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
5 years agostats: Add version defines in stat_client.h 28/19228/2
Ole Troan [Mon, 29 Apr 2019 11:38:52 +0000 (13:38 +0200)]
stats: Add version defines in stat_client.h

Change-Id: I9894a0c613b0486112623920d49371ceec9e6111
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoreassembly: avoid race-conditions 56/19256/2
Klement Sekera [Tue, 30 Apr 2019 11:01:08 +0000 (13:01 +0200)]
reassembly: avoid race-conditions

Change-Id: Ibf5c283217a985e43a562f1969573eeb26ee6017
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agoSphinx docs: Fix security vulnerability (VPP-1655) 77/19077/2
Dave Wallace [Sun, 21 Apr 2019 22:20:18 +0000 (18:20 -0400)]
Sphinx docs: Fix security vulnerability (VPP-1655)

Change-Id: I9b11d15866d708eb843936ebfd120940d284a2de
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit facb4d44475cd0040cc8964be30180e1adeb2021)

5 years agoDOC ONLY: add a buffer metadata writeup 41/19241/1
Dave Barach [Mon, 29 Apr 2019 21:11:38 +0000 (17:11 -0400)]
DOC ONLY: add a buffer metadata writeup

Change-Id: Ic8034cfe3d3c5a9c3d32e97e93e5d9334cc58ca2
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoAPI: Add support for limits to language. 24/19124/3
Ole Troan [Tue, 23 Apr 2019 15:11:01 +0000 (17:11 +0200)]
API: Add support for limits to language.

string name [limit = 64];

Meta-data to do argument validation.

Change-Id: I1f3e0f09b2d5285224399413d25206f77bd3f4b1
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agosvm: fix fifo tail/head/ooo logic for u32 wrap 01/19201/9
Florin Coras [Sat, 27 Apr 2019 03:34:49 +0000 (20:34 -0700)]
svm: fix fifo tail/head/ooo logic for u32 wrap

These were introduced with the switch to unbound tail/head size, so they
only affect master. Added unit tests to avoid future surprises.

Change-Id: I83b6c9efbe31d8092ba59b8e2ed46f4da97f35db
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoIF: return VTR attributes for all ifs in dump API 96/19196/1
Alexander Chernavin [Fri, 26 Apr 2019 14:43:09 +0000 (10:43 -0400)]
IF: return VTR attributes for all ifs in dump API

With this commit, VTR attributes are shown not only for subinterfaces
but for all interfaces.

Change-Id: I498185d905c0bf48431cddb916165f8e9c841b1f
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
5 years agocrypto, ipsec: change GCM IV handling 82/19182/2
Damjan Marion [Thu, 25 Apr 2019 16:28:31 +0000 (18:28 +0200)]
crypto, ipsec: change GCM IV handling

- nonce construction out of salt and iv is ipsec specific so it should be
handled in ipsec code

- fixes GCM unit tests

- GCM IV is constructed out of simple counter, per RFC4106 section 3.1

Change-Id: Ib7712cc9612830daa737f5171d8384f1d361bb61
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agonat: fix ED mode unknown proto session management 46/19146/3
Matthew Smith [Mon, 22 Apr 2019 22:30:13 +0000 (17:30 -0500)]
nat: fix ED mode unknown proto session management

In endpoint dependent mode, when a session at the head of a user
LRU is reused, if the IP protocol for that session was unknown (any
other than tcp, udp, or icmp), the attempt to delete the session
mapping from the in2out bihash was not using the same key that was
used when the mapping was added. This would cause the deletion of
the mapping to fail. If packets arrive later which match the original
session, the search for the session key would succeed when it should
have failed and the session, which is now associated with a different
pair of endpoints, may end up being updated when it should not be.

Update the key generation when reallocating an existing session to
do the right thing if the session is for an unknown protocol.

Also update format_nat_session() for unknown protocols so that
'vppctl show nat44 session detail' will display the protocol
correctly. In endpoint dependent mode, the IP protocol is stored in
the port field on a session if the protocol is unknown. The value
is stored in host byte order, but the format function was swapping
the bytes before writing the protocol.

Change-Id: I9e8daadd4569cb2610532dab4e4f41d1567cf3d1
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agonat: prevent creation when-resolved static mappings on errors 63/18963/5
Alexander Chernavin [Wed, 17 Apr 2019 08:38:04 +0000 (04:38 -0400)]
nat: prevent creation when-resolved static mappings on errors

When you create two identical NAT44 static mappings using interface
name as external address and only local or ext port is different,
VALUE_EXIST will be raised but when-resolved static mapping will
remain.

vpp# nat44 add static mapping tcp local 10.128.0.129 443 external GigabitEthernet0/8/0 8443
vpp# nat44 add static mapping tcp local 10.128.0.129 80 external GigabitEthernet0/8/0 8443
nat44 add static mapping: Mapping already exist.
vpp# show nat44 static mappings
NAT44 static mappings:
 tcp local 10.128.0.129:443 external 2.2.2.2:8443 vrf 0
 tcp local 10.128.0.129:443 external GigabitEthernet0/8/0:8443 vrf -1
 tcp local 10.128.0.129:80 external GigabitEthernet0/8/0:8443 vrf -1

With this commit, when-resolved static mapping is not created if the
translation only differs in local or ext port.

Change-Id: Ifc960b9dc1371caa2a8d3206a80a0ffd10d293e4
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
5 years agosvm: fifo segment support for chunk allocation 76/19176/9
Florin Coras [Thu, 25 Apr 2019 19:58:46 +0000 (12:58 -0700)]
svm: fifo segment support for chunk allocation

Change-Id: Ie96706b4d8bcb32d2d5f065bc765f95f4e9369e7
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agocrypto_ia32: minor change logically 80/19180/1
Zhiyong Yang [Fri, 26 Apr 2019 02:58:24 +0000 (22:58 -0400)]
crypto_ia32: minor change logically

"break;" will never be run after "return;"

Change-Id: I4fdfd10406fdf61897078746d28fa1ee32fb0081
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
5 years agocrypto: AES GCM IV length is always 12 74/19174/3
Damjan Marion [Thu, 25 Apr 2019 16:24:04 +0000 (18:24 +0200)]
crypto: AES GCM IV length is always 12

... at least for use cases we are interested in

Change-Id: I1156ff354635e8f990ce2664ebc8dcd3786ddca5
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agodocs: Add VPP inside the Cloud 26/17926/9
Francesco Spinelli [Thu, 28 Feb 2019 10:51:24 +0000 (11:51 +0100)]
docs: Add VPP inside the Cloud

This commit updates the VPP docs, adding the  VPP deployment and configuration inside the cloud

Change-Id: I97322deb57f0dfb1aa46cca301adbc91ce4a19f6
Signed-off-by: Francesco Spinelli <francescospinelli94@live.it>
5 years agoClean up redirects 77/19177/3
Dave Barach [Thu, 25 Apr 2019 20:50:21 +0000 (16:50 -0400)]
Clean up redirects

Both firefox and chrome seem happy to browse a hugo-generated site

Change-Id: Id216ad9c781643df42ac4fbce598eb2afa600f4d
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoChange dpdk thread data flags type to u16 from u8 to get more useful data 85/19085/2
Simon Zhang [Mon, 22 Apr 2019 15:20:47 +0000 (23:20 +0800)]
Change dpdk thread data flags type to u16 from u8 to get more useful data

Change-Id: Idc3763c38f5aa638d4f290f4d4730577601d78b8
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
5 years agotap: Fix the indirect buffer allocation 70/19170/2
Mohsin Kazmi [Thu, 25 Apr 2019 12:54:32 +0000 (14:54 +0200)]
tap: Fix the indirect buffer allocation

Change-Id: I73f76c25754f6fb14a49ae47b6404f3cbabbeeb5
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agosession: cleanup segment manager and fifo segment 51/19151/15
Florin Coras [Wed, 24 Apr 2019 21:44:46 +0000 (14:44 -0700)]
session: cleanup segment manager and fifo segment

Change-Id: I984f347fb465c0c405cef668d8690457e81788e2
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agounittest: AES GCM test cases cleanup 73/19173/2
Damjan Marion [Thu, 25 Apr 2019 16:17:43 +0000 (18:17 +0200)]
unittest: AES GCM test cases cleanup

This reverts commit 7f2d57b69ea031cc6110b3a1f4c1ef1c35b67181.

Change-Id: I23c3b4d2dab6e13cc8fbbf0ac9d0cfd8af3241c1
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agocrypto_ipsecmb: CBC IV size is always equal to block size 72/19172/2
Damjan Marion [Thu, 25 Apr 2019 16:15:52 +0000 (18:15 +0200)]
crypto_ipsecmb: CBC IV size is always equal to block size

Change-Id: If8b2c8942db17a853883360885def47ce50e7ddd
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agocrypto_ipsecmb: use pre-expanded keys 45/19145/13
Damjan Marion [Wed, 24 Apr 2019 15:32:01 +0000 (17:32 +0200)]
crypto_ipsecmb: use pre-expanded keys

Change-Id: Ie1d34b7e71554516595e0cd228e2cd54a3b8d629
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agosession: use teps in accept/connect notifications 47/19147/2
Florin Coras [Wed, 24 Apr 2019 18:10:02 +0000 (11:10 -0700)]
session: use teps in accept/connect notifications

Change-Id: I58e713661a38cecbfdebd4609292d9d12e880cd2
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoIPSEC; dpdk backend for tunnel interface encryption 52/19152/2
Neale Ranns [Wed, 24 Apr 2019 00:57:55 +0000 (20:57 -0400)]
IPSEC; dpdk backend for tunnel interface encryption

Change-Id: Ide2a9df18db371c8428855d7f12f246006d7c04c
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoipsec: drop runts in esp-decrypt 50/19150/4
Damjan Marion [Wed, 24 Apr 2019 21:39:16 +0000 (23:39 +0200)]
ipsec: drop runts in esp-decrypt

Change-Id: Id7fcaf8590f9f2dcccdebea0ad31c7ecd1cbc8af
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agocrypto: improve key handling 81/18981/10
Damjan Marion [Wed, 24 Apr 2019 13:20:35 +0000 (15:20 +0200)]
crypto: improve key handling

Change-Id: If96f661d507305da4b96cac7b1a8f14ba90676ad
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoRemove dummy_interface_tx nodes from l2tp l2xcrw and nsh 49/19149/2
John Lo [Wed, 24 Apr 2019 20:41:07 +0000 (16:41 -0400)]
Remove dummy_interface_tx nodes from l2tp l2xcrw and nsh

Change-Id: I51e0d4a9ec62514a85bbe4c5f56a48d60ab6f4e4
Signed-off-by: John Lo <loj@cisco.com>
5 years agoAdd get_endpoint in transport vft 51/18751/14
Aloys Augustin [Mon, 8 Apr 2019 15:54:39 +0000 (17:54 +0200)]
Add get_endpoint in transport vft

This allows QUIC & TLS specific logic to be implemented, and meaningfull
IP/port to be returned when connection is overridden.

Change-Id: Id79c59fe4d7b16d36f0e96ad3e281c4026b5fe65
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
5 years agoip4_lookup_inline: leverage vlib_get_buffers to improve perf 33/19133/3
Zhiyong Yang [Wed, 24 Apr 2019 05:31:14 +0000 (01:31 -0400)]
ip4_lookup_inline: leverage vlib_get_buffers to improve perf

vlib_get_buffers can save at least 1.2 clocks/pkt for ip4_lookup_inline
on Haswell.

Change-Id: I730fc346cec4d2eb5ca364308e45268bda4d5f89
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
5 years agodpdk: fix interface naming 44/19144/1
Florin Coras [Wed, 24 Apr 2019 15:45:39 +0000 (08:45 -0700)]
dpdk: fix interface naming

Change-Id: Ia092a93a7ac0cbf9338f9d4a5db8b94b23549a13
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoClean up multi-thread barrier-sync hold-down timer 17/19117/5
Dave Barach [Tue, 23 Apr 2019 14:07:24 +0000 (10:07 -0400)]
Clean up multi-thread barrier-sync hold-down timer

Main thread: don't bother with the barrier sync hold-down timer if
none of the worker threads are busy.

Worker threads: avoid epoll_pwait (10ms timeout) when the
control-plane has been active in the last half-second.

Change-Id: I82008d09968c65e2a4af0ebb7887389992e60603
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoQUIC: Add multi-stream support to internal test apps 50/18750/8
Aloys Augustin [Tue, 9 Apr 2019 09:40:57 +0000 (11:40 +0200)]
QUIC: Add multi-stream support to internal test apps

Change-Id: Iab07697ef482529e62c11433cffa1f8f894e5bb7
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
5 years agoUDPC: Fix open segfault with multiple workers 40/19140/2
Aloys Augustin [Wed, 24 Apr 2019 11:21:43 +0000 (13:21 +0200)]
UDPC: Fix open segfault with multiple workers

Change-Id: Ib4a64f17831e2419f1d6140a6d24649c096bdfa5
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
5 years agodpdk: get a rid of "Invalid port_id=" log message 39/19139/2
Damjan Marion [Wed, 24 Apr 2019 11:16:58 +0000 (13:16 +0200)]
dpdk: get a rid of "Invalid port_id=" log message

Change-Id: I65e7188c6893acca67455ff37f2dfbd0bedd5c09
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agol2: Add support for arp unicast forwarding 14/18714/4
Mohsin Kazmi [Fri, 5 Apr 2019 15:40:20 +0000 (17:40 +0200)]
l2: Add support for arp unicast forwarding

Change-Id: I79fc55f36a9b83957f84619bdf8cef08acc8ec24
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agosvm: fifo ooo reads/writes with multiple chunks 69/19069/13
Florin Coras [Fri, 19 Apr 2019 22:56:00 +0000 (15:56 -0700)]
svm: fifo ooo reads/writes with multiple chunks

Change-Id: If23a04623a7138c9f6c98ee9ecfa587396618a60
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosvm: move mq test to ut plugin 29/19129/3
Florin Coras [Wed, 24 Apr 2019 01:05:49 +0000 (18:05 -0700)]
svm: move mq test to ut plugin

Change-Id: Ic4e882b784e5773198e55bd97b1bbd3d6dda888a
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: remove unused fifo allo return value 27/19127/2
Florin Coras [Tue, 23 Apr 2019 22:53:43 +0000 (15:53 -0700)]
session: remove unused fifo allo return value

Change-Id: I50a6bcc127e4b44becc4b694bdd3018ac9bfab5c
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoethernet_input_inline: leverage vlib_get_buffers 37/19137/3
Zhiyong Yang [Wed, 24 Apr 2019 08:13:27 +0000 (04:13 -0400)]
ethernet_input_inline: leverage vlib_get_buffers

Make full use of well optimized function vlib_get_buffers
for ethernet_input_inline.

Change-Id: Iee7df570b87fa95c0902895686a62386d730f9a1
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
5 years agoRearrange prefetching in ipsec_output_inline 16/19116/2
Vratko Polak [Tue, 23 Apr 2019 13:52:28 +0000 (15:52 +0200)]
Rearrange prefetching in ipsec_output_inline

Change-Id: I6151e57643ebed42f51b795980db2c52084295ab
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
5 years agosvm: move fifo tests to ut plugin 28/19128/5
Florin Coras [Wed, 24 Apr 2019 00:26:54 +0000 (17:26 -0700)]
svm: move fifo tests to ut plugin

Change-Id: I638facf6e2128334c3d1a5a8494f378505831e1b
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoNAT: VPP-1531 api cleanup & update 34/19134/2
Filip Varga [Mon, 15 Apr 2019 16:52:43 +0000 (18:52 +0200)]
NAT: VPP-1531 api cleanup & update

Change-Id: I2492400a67b39a3adbc24ab7cf1ba17a409e95a8
Signed-off-by: Filip Varga <fivarga@cisco.com>
5 years agoEnable 'test crash' command when running unittest plugin. 19/18819/2
Paul Vinciguerra [Thu, 11 Apr 2019 15:00:05 +0000 (08:00 -0700)]
Enable 'test crash' command when running unittest plugin.

Change-Id: Icf0cff122dfbd260a2865b6c83531f4a8c726132
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoAPI: Python and Unix domain socket improvement 98/19098/5
Ole Troan [Mon, 15 Apr 2019 09:27:22 +0000 (11:27 +0200)]
API: Python and Unix domain socket improvement

Handle the case where buffer overflows.
Then SOCK_SEQPACKET assumption that multiple API messages
are not returned by recv() is broken. Use SOCK_STREAM for
API exchanges instead.

Add support for running tests over sockets.
make test SOCKET=1

Change-Id: Ibe5fd69b1bf617de4c7ba6cce0a7c2b3f97a2821
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoBump to intel-ipsec-mb version 0.52 08/19108/3
Damjan Marion [Tue, 23 Apr 2019 10:57:14 +0000 (12:57 +0200)]
Bump to intel-ipsec-mb version 0.52

Change-Id: Ifeaf93c98e4af92da9409fa5a2114b577e8c0937
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoRevert "NAT: VPP-1531 api cleanup & update" 12/19112/2
Ole Trøan [Tue, 23 Apr 2019 12:38:35 +0000 (12:38 +0000)]
Revert "NAT: VPP-1531 api cleanup & update"

This reverts commit bed1421b9f1b3643d93384084972337b596aec73.

/vpp/master3/src/plugins/nat/nat_api.c: In function ‘send_nat_worker_details’:
/vpp/master3/src/vppinfra/clib.h:62:33: error: division ‘sizeof (u8 * {aka unsigned char *}) / sizeof (u8 {aka unsigned char})’ does not compute the number of array elements [-Werror=sizeof-pointer-div]
 #define ARRAY_LEN(x) (sizeof (x)/sizeof (x[0]))
                                 ^
/vpp/master3/src/plugins/nat/nat_api.c:205:43: note: in expansion of macro ‘ARRAY_LEN’
   rmp = vl_msg_api_alloc (sizeof (*rmp) + ARRAY_LEN (w->name) - 1);
                                           ^~~~~~~~~

Change-Id: Ie82672c145fb2f6580827f95e535435307bc7a23
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoAPI sw_interface_dump: Dump all if index is zero 06/19106/2
Vratko Polak [Tue, 23 Apr 2019 10:26:44 +0000 (12:26 +0200)]
API sw_interface_dump: Dump all if index is zero

This is a temporary measure, to allow CSIT usage
of VAT command sw_interface_dump without arguments.

Change-Id: Ic40adfcc89d92179e213afc497e4e71bbc0dad83
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
5 years agoNAT: VPP-1531 api cleanup & update 68/18168/14
Filip Varga [Mon, 15 Apr 2019 16:52:43 +0000 (18:52 +0200)]
NAT: VPP-1531 api cleanup & update

Change-Id: I519d7efc8ee3c86381d96be2e2a46017cd948895
Signed-off-by: Filip Varga <fivarga@cisco.com>
5 years agoFix a ipsec command line typo 92/19092/2
Simon Zhang [Tue, 23 Apr 2019 15:04:07 +0000 (23:04 +0800)]
Fix a ipsec command line typo

Change-Id: Ic75df36e06a77730ff8764f96d3cf53c4e59923b
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
5 years agovnet: clean up calc_checksums() 66/19066/2
Zhiyong Yang [Fri, 19 Apr 2019 09:22:31 +0000 (05:22 -0400)]
vnet: clean up calc_checksums()

Remove the duplicated code and unnecessary operations.

Change-Id: I78005848d29d3156165627926a79015d590d61a6
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
5 years agodpdk_esp_encrypt: add to prefetch data 09/18409/3
Zhiyong Yang [Wed, 20 Mar 2019 07:35:39 +0000 (03:35 -0400)]
dpdk_esp_encrypt: add to prefetch data

The memory areas storing vlib_buffer_t and ip4|6_and_esp_header_t
are not prefetched. The patch help dpdk_esp_encrypt to reduce 18
clocks/pkt from 149 to 131 on Haswell when running IPsec in tunnel
mode.

Change-Id: I4f4e9e2b3982a4b7810cab8ed828a5e4631f8f8c
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
5 years agoipsec4-output: add pkt header and data prefetching 74/19074/2
Zhiyong Yang [Mon, 22 Apr 2019 04:18:38 +0000 (00:18 -0400)]
ipsec4-output: add pkt header and data prefetching

The graph node running IPsec encap in tunnel mode can be saved
from 65.8 to 57.3 clocks/pkt on Haswell platform.
The graph node can be saved 10 clockes/pkt on DVN as well in the
same case.

Change-Id: I4804879c4d489465ee56a8f8317596b7e79b9331
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
5 years agovppinfra: fix one macro issue in clib_cpu_supports_aes() 63/19063/2
Zhiyong Yang [Fri, 19 Apr 2019 07:04:41 +0000 (03:04 -0400)]
vppinfra: fix one macro issue in clib_cpu_supports_aes()

The macro for x86 platform is wrong, and the patch fixes it.

Change-Id: I4f0ed254b177d6863fbe9113308c6a8b4478e0b2
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
5 years agoGRE: set gre_tunnel_type init value to zero in API 76/19076/2
Alexander Chernavin [Mon, 22 Apr 2019 13:30:16 +0000 (09:30 -0400)]
GRE: set gre_tunnel_type init value to zero in API

Change-Id: I9715b0578852a1ed59d78b7a9e28f32fc763ed3c
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
5 years agovlib epoll: handle file removal on EPOLLIN 78/19078/2
Florin Coras [Mon, 22 Apr 2019 16:49:10 +0000 (09:49 -0700)]
vlib epoll: handle file removal on EPOLLIN

Change-Id: I7a3526a8fdf17afb8cc2225bdfbd57f661680992
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosvm: reorganize fifo march code 61/19061/6
Florin Coras [Fri, 19 Apr 2019 04:25:49 +0000 (21:25 -0700)]
svm: reorganize fifo march code

- make only the chunk copying (memcpy) code march aware
- cleanup dependencies

Change-Id: I369378264cacfcdaf0823353b957876554eaa17c
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agorbtree: add successor and predecessor functions 70/19070/3
Florin Coras [Sat, 20 Apr 2019 01:50:34 +0000 (18:50 -0700)]
rbtree: add successor and predecessor functions

Change-Id: I6934beaf5c08bae2d4f0bd3a6bb811810407c1f9
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoDoxygen cleanup. 86/18986/3
Dave Wallace [Wed, 17 Apr 2019 21:28:45 +0000 (17:28 -0400)]
Doxygen cleanup.

- Add subpages definitions in appropriate
  section (User or Dev docs) for doc files
  (*.rst, *.md) that being listed at the top
  level of the generated doc page.
- Generate and add API list to RELEASE doc.
- Fix list_api_changes script to use HEAD
  as the endtag so it doesn't need to be
  changed every release.

Change-Id: Iace7b6433359c6b96869cb1db01facbbcb0ac1e6
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 11ee93f6abfaddf5bbd56cf0858c0c6ea0384b65)

5 years agobuild: fix fedora dependencies 16/18716/3
Benoît Ganne [Fri, 5 Apr 2019 17:04:22 +0000 (19:04 +0200)]
build: fix fedora dependencies

Update various python dependencies package names.

Change-Id: I0f64f988f361adf4705fceaf4f2c147138024b1e
Signed-off-by: Benoît Ganne <bganne@cisco.com>
5 years agoIPSEC: IPv6 ESP transport mode incorrect packet length and checksum (VPP-1654) 57/19057/3
Neale Ranns [Fri, 19 Apr 2019 02:49:13 +0000 (19:49 -0700)]
IPSEC: IPv6 ESP transport mode incorrect packet length and checksum (VPP-1654)

Change-Id: Ia3474e5bfea5764eae9b2987bf78296535df6778
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years ago6rd: fix debug cli short-help 64/19064/2
Benoît Ganne [Fri, 19 Apr 2019 08:12:42 +0000 (10:12 +0200)]
6rd: fix debug cli short-help

Debug cli short help for 6rd tunnel creation was out-of-date.

Change-Id: I06e4d28481470825bf225ba0fd371a3aebd889fa
Signed-off-by: Benoît Ganne <bganne@cisco.com>
5 years agosvm: move fifo tests to a separate file 59/19059/3
Florin Coras [Fri, 19 Apr 2019 03:50:50 +0000 (20:50 -0700)]
svm: move fifo tests to a separate file

Change-Id: Iac9ac9f5a6873aae1882316af4f6c919788a0cef
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoRemove dummy_interface_tx output node from PPPoE plugin 93/18993/3
John Lo [Thu, 18 Apr 2019 03:27:37 +0000 (23:27 -0400)]
Remove dummy_interface_tx output node from PPPoE plugin

Avoid creating per PPPoE session interface output/tx nodes
which are not used.

Change-Id: I065aa4f9bda6d2557c630bd45e888c999f2f9130
Signed-off-by: John Lo <loj@cisco.com>
5 years agosvm: support addition of chunks to fifos 55/19055/5
Florin Coras [Fri, 19 Apr 2019 01:58:10 +0000 (18:58 -0700)]
svm: support addition of chunks to fifos

Change-Id: Ia56cad89b85b7a99ab4bfb85318a45a71381fb53
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoDOCS-ONLY: Fix broken doxygen tag in BVI 53/19053/2
Dave Wallace [Thu, 18 Apr 2019 22:03:22 +0000 (18:03 -0400)]
DOCS-ONLY: Fix broken doxygen tag in BVI

Change-Id: Ia42e7c93ebe51a36470f1358827451bcb98da433
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
5 years agoIPSEC: ESP IPv6 transport mode payload length incorrect (VPP-1653) 54/19054/2
Neale Ranns [Fri, 19 Apr 2019 00:18:12 +0000 (17:18 -0700)]
IPSEC: ESP IPv6 transport mode payload length incorrect (VPP-1653)

Change-Id: I8977100d7a22b50260858bd1ea9db419b53284ff
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoFIB: recursion casues path realloc 22/19022/2
Neale Ranns [Thu, 18 Apr 2019 09:42:20 +0000 (09:42 +0000)]
FIB: recursion casues path realloc

Change-Id: Ie9c2954eee90ca1a1fc1aa8280f93b2340b544c1
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoGBP: update cli to reflect API changes 40/19040/2
Benoît Ganne [Thu, 18 Apr 2019 13:46:23 +0000 (15:46 +0200)]
GBP: update cli to reflect API changes

Some GBP debug cli short help and commands were not in sync anymore with
GBP API.

Change-Id: I224bec51fbacd8a3685b70d4e7a52b5803fd3ad4
Signed-off-by: Benoît Ganne <bganne@cisco.com>
5 years agovlib epoll: protect against clib file pool expansion 50/19050/2
Florin Coras [Thu, 18 Apr 2019 17:04:03 +0000 (10:04 -0700)]
vlib epoll: protect against clib file pool expansion

Change-Id: I320e7c2fdacb3056bc448c73fec08d9e2978ee5e
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoExtras: Fix list_api_changes script for 19.08 42/19042/2
Dave Wallace [Thu, 18 Apr 2019 14:08:07 +0000 (10:08 -0400)]
Extras: Fix list_api_changes script for 19.08

Change-Id: I9907a60347933bb2be8c967bf5e0d507b57b982b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
5 years agoFix memory corruption faulting [VPP-1639] 04/19004/3
Artem Belov [Thu, 18 Apr 2019 07:30:43 +0000 (07:30 +0000)]
Fix memory corruption faulting [VPP-1639]

File pool may be reallocated on epoll events processing.
*f* pointer shows to already freed address and corrupting
memory chunk on clib_file_t property change.

Change-Id: I751bddce27325452862b939c1a3eec2ccd9b71bb
Signed-off-by: Artem Belov <artem.belov@xored.com>
5 years agosvm: allow indirect fifo data chunks 79/18779/22
Florin Coras [Wed, 10 Apr 2019 01:29:14 +0000 (18:29 -0700)]
svm: allow indirect fifo data chunks

Fifos can use multiple memory chunks for simple read/write operations.
Adding/removing chunks after assignment not yet supported.

Change-Id: I2aceab6aea78059d74e0d3a9993c40d5196d077b
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoGRE: API update 13/18913/5
Neale Ranns [Tue, 16 Apr 2019 07:15:35 +0000 (07:15 +0000)]
GRE: API update

Change-Id: I5010cd34123c6498230dedac6ba8dd774a1085f9
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotls: allow engines to customize close 83/18983/6
Florin Coras [Wed, 17 Apr 2019 21:19:12 +0000 (14:19 -0700)]
tls: allow engines to customize close

Change-Id: I11ac3e4f59206902e5dfc326f815c877c5dd6643
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoIPSEC: tunnel rekey fix and test (VPP-1652) 87/18987/2
Neale Ranns [Wed, 17 Apr 2019 23:29:00 +0000 (16:29 -0700)]
IPSEC: tunnel rekey fix and test (VPP-1652)

Change-Id: I1c2b3e40c689bedcdcea7887792b6b6b6aeb48d5
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoUse template-specific key compare fn when deleting records 84/18984/1
Dave Barach [Wed, 17 Apr 2019 21:27:31 +0000 (17:27 -0400)]
Use template-specific key compare fn when deleting records

A simple memcmp won't work when comparing pointer-keys, such as those
used by the bihash_vec8_8.h template.

Change-Id: I77e59f3fd7f7740ef42908ace90ed4843e1c9ac7
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agosession: fix segment manager init condition 79/18979/2
Florin Coras [Wed, 17 Apr 2019 17:23:23 +0000 (10:23 -0700)]
session: fix segment manager init condition

Change-Id: I0ef3115bd29a11538090c582a4eacdbb7cd86d7a
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoMake sw_interface_dump more compatible with 2.2.0 80/18980/2
Vratko Polak [Wed, 17 Apr 2019 18:02:56 +0000 (20:02 +0200)]
Make sw_interface_dump more compatible with 2.2.0

+ As old PAPI clients are likely to put zero as the value
  for sw_if_index, the behavior should not perform
  index filtering at least when name filtering is enabled (valid).
+ interface.api version set to 2.3.0,
  as the new behavior is backward compatible
  (at least for PAPI with name filter enabled),
  but not forward compatible.
+ Minor whitespace cleanup.

Change-Id: I315a0eae4004f9d9b6c5f9ecf0f179e669729118
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
5 years agovcl/session: tx notifications for cut-thru sessions 77/18977/3
Florin Coras [Wed, 17 Apr 2019 16:57:46 +0000 (09:57 -0700)]
vcl/session: tx notifications for cut-thru sessions

Change-Id: I076c753e419bbb177d2d28609190715e9895b398
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoapi: Add to interface crud - read by sw_if_index. 93/18693/5
Paul Vinciguerra [Thu, 4 Apr 2019 20:22:20 +0000 (13:22 -0700)]
api: Add to interface crud - read by sw_if_index.

Change-Id: I02c857da4cf6da5e0e55c1e48b63716af7ade0a9
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoVPP-1649: Coverity warning in http server 74/18974/2
Dave Barach [Wed, 17 Apr 2019 14:10:02 +0000 (10:10 -0400)]
VPP-1649: Coverity warning in http server

Remove duplicate error check

Change-Id: I64463c7f606e198fe8553efea294f0e09bd8dbc3
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoRevert "Revert "bond: problem switching from l2 to l3"" 74/18774/3
Steven Luong [Tue, 9 Apr 2019 19:18:46 +0000 (12:18 -0700)]
Revert "Revert "bond: problem switching from l2 to l3""

This reverts commit 5d0d5494db58422eb528c0f8b39a86ea966505e9.

The csit crash was actually due to the test image missing the patch
https://gerrit.fd.io/r/#/c/17731/

It was a mistake to revert the original patch
https://gerrit.fd.io/r/#/c/15577/

Change-Id: I7fc563981aa13d308d55b25194fee21475ebc57d
Signed-off-by: Steven Luong <sluong@cisco.com>
5 years agovppinfra: AVX512 interelaave, insert and permute 73/18973/2
Damjan Marion [Wed, 17 Apr 2019 14:05:54 +0000 (16:05 +0200)]
vppinfra: AVX512 interelaave, insert and permute

Change-Id: I26c704ec27b8f5431faef08156778f53ea454269
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agotap: clean-up when linux will delete the tap interface 66/18966/2
Mohsin Kazmi [Wed, 17 Apr 2019 10:06:57 +0000 (12:06 +0200)]
tap: clean-up when linux will delete the tap interface

When container is deleted which has tap interface attached,
Linux also delete the tap interface leaving the VPP side of
tap. This patch does a clean up job to remove that VPP side
of tap interface.

To produce the behavior:
In VPP:
  create tap
On linux:
  sudo ip netns add ns1
  sudo ip link set dev tap0 netns ns1
  sudo ip netns del ns1

Change-Id: Iaed1700073a9dc64e626c1d0c449f466c143f3ae
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agoPredicate a packet whether be marked by PKT_RX_FDIR_ID instead of PKT_RX_FDIR 55/18955/3
Simon Zhang [Wed, 17 Apr 2019 11:55:44 +0000 (19:55 +0800)]
Predicate a packet whether be marked by PKT_RX_FDIR_ID instead of PKT_RX_FDIR

Change-Id: I65b1af5fa0cec4f9789f91f720d1396d06fa0206
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
5 years agoIPSEC: Pass the algorithm salt (used in GCM) over the API 50/18950/2
Neale Ranns [Tue, 16 Apr 2019 02:41:34 +0000 (02:41 +0000)]
IPSEC: Pass the algorithm salt (used in GCM) over the API

Change-Id: Ia8cea13f7b937294e6a080a55fb2ceff30063acf
Signed-off-by: Neale Ranns <nranns@cisco.com>