vpp.git
6 years agoacl-plugin: reject the too-short variable-length messages from clients (VPP-839) 49/6749/2
Andrew Yourtchenko [Wed, 17 May 2017 21:43:59 +0000 (23:43 +0200)]
acl-plugin: reject the too-short variable-length messages from clients (VPP-839)

Prior to commit bfd9227e6da567e0e19e026afe94cd4c0b65f725, there was
no clean way to check the lower-level message length as supplied
by the client, so there was no option but to trust that the client
does the right thing and allocates memory correctly.
The absence of checks makes it hard for a misbehaving client
to spot the problem - because everything "appears" to work
correctly for the specific erroneous message exchange.
This commit ensures the message received is at least
as big as we expect, and complains loudly if it is not.

Change-Id: I806eaac7c7f1ab3c64cb2bfa6939ce27da9a2b44
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agoVPP-847: improve bihash template memory allocator performance 50/6750/2
Dave Barach [Thu, 18 May 2017 00:20:50 +0000 (20:20 -0400)]
VPP-847: improve bihash template memory allocator performance

Particularly in the DCLIB_VEC64=1 case, using vectors vs. raw
clib_mem_alloc'ed memory causes abysmal memory allocator performance.

Change-Id: I07a4dec0cd69ca357445385e2671cdf23c59b95d
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoUpdate CSIT tests 170504 -> 170518 62/6762/1
Jan Gelety [Thu, 18 May 2017 12:55:14 +0000 (14:55 +0200)]
Update CSIT tests 170504 -> 170518

- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I916427584df514088f2d8cbcc3483c397ca4d6f5
Signed-off-by: Jan Gelety <jgelety@cisco.com>
6 years agodpdk: disable 16-bit descriptors for X710/XL710 45/6745/2
Damjan Marion [Wed, 17 May 2017 14:07:32 +0000 (16:07 +0200)]
dpdk: disable 16-bit descriptors for X710/XL710

This fixes issue with rx packet drops on VF.

Change-Id: I8c1a35213013f8856b71e7204496f463319cbe28
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoioam: configuration for SRv6 localsid (VPP-693) 48/6348/3
shwethab [Tue, 11 Apr 2017 06:21:44 +0000 (06:21 +0000)]
ioam: configuration for SRv6 localsid (VPP-693)

This add debug cli to accept SRv6 localsid that will be
used to attract the return traffic for M-Anycast flows.

Change-Id: I8f8dd115c36498141ae4cb143c6584141950b1d3
Signed-off-by: shwethab <shwetha.bhandari@gmail.com>
(cherry picked from commit 00c14a94c34fac89e6e589c4a7aad20d8dd183dc)

6 years agoAdd vl_msg_api_get_message_length[_inline] 68/6668/10
Dave Barach [Fri, 12 May 2017 15:59:25 +0000 (11:59 -0400)]
Add vl_msg_api_get_message_length[_inline]

Change-Id: I6d86cf7966d51ec7a507bbb59c586adbfb45be05
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agodpdk: Do not check and set rte_mbuf refcnt if dpdk ver >= 17.05 42/6742/2
Damjan Marion [Wed, 17 May 2017 11:58:07 +0000 (13:58 +0200)]
dpdk: Do not check and set rte_mbuf refcnt if dpdk ver >= 17.05

According to DPDK release notes this is done by DPDK.
Also, it fixes assers in debug image.

Change-Id: Ida1d25f8cd0c2232110e44eabd7dc3e512336758
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoVPP-719: Accept ARP replies from VRRP hw addr 34/6734/3
Matthew Smith [Wed, 17 May 2017 02:35:56 +0000 (21:35 -0500)]
VPP-719: Accept ARP replies from VRRP hw addr

Check whether an ARP src hw addr starts with 00:00:5e:00:01
before rejecting due to a mismatch between ARP src hw addr
and ethernet frame src addr.

Change-Id: Ia3ecd5d6dba34876aca8d90bc622a0a1397e48fb
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
6 years agovhost: bad packet assembled from descriptor chaining 35/6735/2
Steven [Wed, 17 May 2017 04:26:13 +0000 (21:26 -0700)]
vhost: bad packet assembled from descriptor chaining

When the descriptor is chained via multiple parts, vhost is supposed
to reassemble the different parts to form a packet prior to passing
the packet to the next input node. However, bad packet was seen, having
bad ethertype, source, and destination mac addresses.

The problem was due to the destination pointer not being incremented as
each chain is processed. THe result was the first chain is copied to the
beginning of the buffer, the next chain is copied, then the last chain
is also copied to the beginning of the buffer. As a result, the ethertype,
source and destination mac, etc, are being overwritten by the very last
chain of the descriptor.

Change-Id: I78f9a91de68c85574047912576dcc311d7597e21
Signed-off-by: Steven <sluong@cisco.com>
6 years agoUse counters on ipsec tunnel interfaces 30/6730/4
Matthew Smith [Tue, 16 May 2017 16:51:18 +0000 (11:51 -0500)]
Use counters on ipsec tunnel interfaces

Increment byte & packet counters when packets are sent or received on an
IPsec tunnel interface. Set counters to zero when the interface is deleted.

Change-Id: Ie9584aa82778875dd4d0c931005f7720b4d5c76d
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
6 years agoAdd ethernet type to support NSH over ethernet 32/6732/3
Hongjun Ni [Wed, 17 May 2017 10:09:38 +0000 (18:09 +0800)]
Add ethernet type to support NSH over ethernet

Change-Id: I876599d6183fab989949e8ccad5c0a3ef81991be
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
6 years agoVPP-846: tcp perf / scale / hardening 31/6731/2
Dave Barach [Tue, 16 May 2017 21:41:34 +0000 (17:41 -0400)]
VPP-846: tcp perf / scale / hardening

Fix builtin server event queue handling

Change-Id: I21b49c37188746cadb2fd9423291c5dc1335798c
Signed-off-by: Dave Barach <dbarach@cisco.com>
6 years agoARP learning fixes (VPP-843) 28/6728/3
Neale Ranns [Tue, 16 May 2017 15:46:45 +0000 (08:46 -0700)]
ARP learning fixes (VPP-843)

learn ARP peers if, 1) it's a reply to a local address, 2) we are sending a response to a request.
send proxy ARP responses only in the interface the request was sent.

Change-Id: I22b949c65122824233076492b7dd537daca07bc2
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoFixes to tcp active opens and reception 13/6713/3
Dave Barach [Mon, 15 May 2017 20:27:05 +0000 (16:27 -0400)]
Fixes to tcp active opens and reception

- Properly initialize connection index
- Add new session to main hash table
- Drop packets that are completely in the past with respect to the rcv
  wnd (e.g., retransmits due to premature timer pops)

Change-Id: Ic0873018ff0a4c59e0913863dc7f0c0f822d5c34
Signed-off-by: Dave Barach <dbarach@cisco.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoUnneeded linking 38/6638/9
Marco Varlese [Wed, 10 May 2017 15:02:58 +0000 (17:02 +0200)]
Unneeded linking

Removed the linking which does not appear to be necessary when using in repo
dpdk and which causes a build failure when using the shared-dpdk mode.

Change-Id: I6bad2bd11d6db40fbd2def78f98c6beba66ff416
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agoL2FIB: add flush test 19/6719/2
Eyal Bari [Mon, 15 May 2017 07:13:15 +0000 (10:13 +0300)]
L2FIB: add flush test

add tests for flush int/bd/all

Change-Id: Ia589ec5925b9c8acbb2fc16dafbf4842aa1a6eff
Signed-off-by: Eyal Bari <ebari@cisco.com>
6 years agoVPP-845: add configurable elog post-mortem dump 22/6722/1
Dave Barach [Tue, 16 May 2017 13:08:14 +0000 (09:08 -0400)]
VPP-845: add configurable elog post-mortem dump

Off by default. Enable via cmdline "... vlib { elog-post-mortem-dump }
..."

Change-Id: I2056b9de9b37475f2bfeeb5404da838f1b42645a
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoping command does not work when there is woker thread (VPP-844) 88/6688/4
flyingeagle23 [Mon, 15 May 2017 08:57:20 +0000 (16:57 +0800)]
ping command does not work when there is woker thread (VPP-844)

Change-Id: Ic896b237a7d141243e1b7d6d4fbb2a120f44363e
Signed-off-by: flyingeagle23 <wang.hui56@zte.com.cn>
6 years agoFix regression of setting device to admin-down state 14/6714/2
John Lo [Mon, 15 May 2017 23:21:15 +0000 (19:21 -0400)]
Fix regression of setting device to admin-down state

Change-Id: I0ffa572839405efe1170d6ddb073e53e9af02db7
Signed-off-by: John Lo <loj@cisco.com>
6 years ago1704: Release notes. Cherry pick from 6288. 89/6289/2
Ole Troan [Thu, 20 Apr 2017 06:57:47 +0000 (08:57 +0200)]
1704: Release notes. Cherry pick from 6288.

Change-Id: Ia6146106a708d5ab247225dfe49eb6ef686ae3d3
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agoPlace the vpp_papi*.egg file together with other build products. 55/6655/3
Igor Mikhailov (imichail) [Fri, 12 May 2017 05:15:36 +0000 (22:15 -0700)]
Place the vpp_papi*.egg file together with other build products.

This way it will be deleted when clean/wipe is performed.

Change-Id: Ic3fcfe8b80ac8b80a5a25ec04c35c36a638ca570
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
6 years agoAdd sw_if_index of tunnel interface to API reply for ipsec_tunnel_if_add_del 85/6685/3
Matthew Smith [Mon, 15 May 2017 02:47:18 +0000 (21:47 -0500)]
Add sw_if_index of tunnel interface to API reply for ipsec_tunnel_if_add_del

Change-Id: If5158f6fa7344dee94548c93dace779430e0647f
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
6 years agoacl-plugin: unapply the ACLs if interface is being deleted 53/6653/4
Andrew Yourtchenko [Thu, 11 May 2017 10:33:54 +0000 (12:33 +0200)]
acl-plugin: unapply the ACLs if interface is being deleted

(HC2VPP-137 is the client behavior triggering this)

If the user does not unapply the ACLs off the interface,
but deletes the interface, the subsequent reuse of the
sw_if_index might find itself with the datapath
hooked up for ACL processing even though there is
no ACL configured. The fix is to unapply any ACLs
in the callback which is called upon the sw_if_index
addition/deletion.

Change-Id: Icea413d7fbf1ef891844a4818626e1b34fe79cbf
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 4c72e629e5ace392390a9d6109594254525064f7)

6 years agodpdk: Enable hardware CRC strip for Intel VFs 11/6711/4
Damjan Marion [Mon, 15 May 2017 16:35:37 +0000 (18:35 +0200)]
dpdk: Enable hardware CRC strip for Intel VFs

Change-Id: I60a7795761fe74ae5d57dacd03c343ddb77434d4
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoAdd GTP-U plugin. VPP-694 50/6150/23
Hongjun Ni [Wed, 12 Apr 2017 11:21:16 +0000 (19:21 +0800)]
Add GTP-U plugin. VPP-694

Basic GTP-U feature

Change-Id: I31226f890a92c5303ac06e112ed7820cae52d9bd
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
6 years agomemif: migrate memif to use vnet device infra APIs 10/6710/2
Steven [Mon, 15 May 2017 16:33:11 +0000 (09:33 -0700)]
memif: migrate memif to use vnet device infra APIs

Migrate memif to use vnet device infra APIs. No new function is added.

Change-Id: I70e440d2ae1e673876365041f31fe78997aceecf
Signed-off-by: Steven <sluong@cisco.com>
6 years agodpdk: improve error handling during device initialization 51/6651/6
Damjan Marion [Thu, 11 May 2017 14:53:02 +0000 (16:53 +0200)]
dpdk: improve error handling during device initialization

Change-Id: Ib390164abb07ca0d38fd49e7e2e6b4e9ea856405
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoaf_packet: support changing the mtu size 95/6695/5
Ray Kinsella [Mon, 15 May 2017 10:52:43 +0000 (11:52 +0100)]
af_packet: support changing the mtu size

Added support to the af_packet device to change the MTU size.

Change-Id: I9c9e1e17323721f3efccf70a10b753e12eef94d5
Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
6 years agojvpp: fix memory allocation for variable lenght messages (VPP-841) 09/6709/4
Marek Gradzki [Fri, 12 May 2017 16:24:34 +0000 (18:24 +0200)]
jvpp: fix memory allocation for variable lenght messages (VPP-841)

Change-Id: I9a46125e3cf9815c08cf8cca17713ec6e9121eae
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
(cherry picked from commit 307cfd8eb14ff7df04316ffa56f2c2481d650d7e)

6 years agoFix builtin tcp client 06/6706/4
Dave Barach [Mon, 15 May 2017 14:11:39 +0000 (10:11 -0400)]
Fix builtin tcp client

Change-Id: I83a1b02a73fd159f14cca04fed3993f571475a00
Signed-off-by: Dave Barach <dbarach@cisco.com>
6 years agoAdd a missing byte-swap call in ACL intf dump. 73/6673/4
Jon Loeliger [Fri, 12 May 2017 19:03:16 +0000 (14:03 -0500)]
Add a missing byte-swap call in ACL intf dump.

Change-Id: I87495d95dc6c5a36ff6d2ae05203e22e43403bf6
Signed-off-by: Jon Loeliger <jdl@netgate.com>
6 years ago[plugins/dpdk] Support for CLIB_HAVE_64 (aarch64) 70/6670/4
Christophe Fontaine [Wed, 5 Apr 2017 09:49:07 +0000 (11:49 +0200)]
[plugins/dpdk] Support for CLIB_HAVE_64 (aarch64)

For platforms which do not support u8x32, such as aarch64,
add an alternative implementation of 'dpdk_buffer_init_from_template'.

Change-Id: Ia7e8d0a5985fa5925e063ed6e890208c73e39933
Signed-off-by: Christophe Fontaine <christophe.fontaine@enea.com>
6 years agoL2BD/API:fix bd dump to ignore unknown bd_id 79/6679/4
Eyal Bari [Sun, 14 May 2017 07:38:39 +0000 (10:38 +0300)]
L2BD/API:fix bd dump to ignore unknown bd_id

Change-Id: I417dfeba902ca8c3a080773942d4d2ce4335a9c1
Signed-off-by: Eyal Bari <ebari@cisco.com>
6 years agomove to CSIT 170504 84/6684/3
Neale Ranns [Sun, 14 May 2017 19:54:19 +0000 (12:54 -0700)]
move to CSIT 170504

Change-Id: I8b636ff57b6e6c3f4cfd2d77d930524559046dd9
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoFix vnet_interface_counters API definition 13/5413/4
Aloys Augustin [Fri, 17 Feb 2017 13:55:29 +0000 (14:55 +0100)]
Fix vnet_interface_counters API definition

The api specification had u8 as data type, which caused the python
binding to fail.
Fixes VPP-642

Change-Id: I9ba97959740d44c8f4a12db9356d0d1bcd709a73
Signed-off-by: Aloys Augustin <aloys.augustin@polytechnique.org>
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agoFix FIB recursion loops via cover (VPP-842) 74/6674/2
Neale Ranns [Sat, 13 May 2017 12:52:58 +0000 (05:52 -0700)]
Fix FIB recursion loops via cover (VPP-842)

Change-Id: Ia91c3e8cb27b9e4c1cccefc0a4857dd9995450ab
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agodpdk: revert dpdk 17.05 change which causes virtio issues 90/6690/1
Damjan Marion [Mon, 15 May 2017 10:32:15 +0000 (12:32 +0200)]
dpdk: revert dpdk 17.05 change which causes virtio issues

This patch is causing DPDK to provide bad MAC address
for legacy virtio interfaces.

Change-Id: I526cd35a38164ede80a8ab6decb9e0d1ebfad723
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoValidate ip6 interface fib tables early on 43/6643/3
Florin Coras [Wed, 10 May 2017 19:32:53 +0000 (12:32 -0700)]
Validate ip6 interface fib tables early on

This should avoid random crashes due to reception of packets (multicast
in particular) before ip6 addresses are configured on the interfaces.

Change-Id: Ibcf1a5a2ae2fa75f8b57da1b2f09f32c081210d7
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agodpdk: bump to dpdk 17.05 48/6648/3
Damjan Marion [Thu, 11 May 2017 12:55:43 +0000 (14:55 +0200)]
dpdk: bump to dpdk 17.05

Change-Id: I19744387859129c6b8dc104041af158bf5f1d988
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoHandle RST of TCP connections in SYN-RCVD state, VPP-822 44/6644/2
Florin Coras [Wed, 10 May 2017 19:29:14 +0000 (12:29 -0700)]
Handle RST of TCP connections in SYN-RCVD state, VPP-822

Change-Id: Ieb0c1e690d6ae082cfedb276252a31fab480e561
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agomake test: support coverage for out-of-tree plugins 47/6647/1
Klement Sekera [Thu, 11 May 2017 04:55:32 +0000 (06:55 +0200)]
make test: support coverage for out-of-tree plugins

Change-Id: Ibd7828b1e1c699630ff450122d8aa317b1c9da26
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoAllow to override the build date 83/6583/3
Bernhard M. Wiedemann [Wed, 3 May 2017 13:15:15 +0000 (15:15 +0200)]
Allow to override the build date

using the SOURCE_DATE_EPOCH env var
to make vpp package builds reproducible.

See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

Change-Id: Iae0935c9bb4ccdfdb65600be543945a88f2e137f
Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
7 years agovnet: introduce error state for sw interfaces 41/6641/3
Damjan Marion [Wed, 10 May 2017 18:09:31 +0000 (20:09 +0200)]
vnet: introduce error state for sw interfaces

Interfaces with error state are not allowed to go admin up

Change-Id: I09fc09a5b28130aead219dccbc2e0f30ea7414cf
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agocompletelly deprecate os_get_cpu_number, replace new occurences 42/6642/4
Damjan Marion [Wed, 10 May 2017 19:06:28 +0000 (21:06 +0200)]
completelly deprecate os_get_cpu_number, replace new occurences

Change-Id: I82c663bc0866c6c68ba354104b0bb059387f4b9d
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoMulti-thread enablement for the debug cli http server 40/6640/3
Dave Barach [Wed, 10 May 2017 17:34:04 +0000 (13:34 -0400)]
Multi-thread enablement for the debug cli http server

Change-Id: Iec1f739fe24c722d0db6c10cc81b5e8333067ea1
Signed-off-by: Dave Barach <dbarach@cisco.com>
7 years agodoxygen: Fix some paths 39/6639/2
Chris Luke [Wed, 10 May 2017 15:40:27 +0000 (11:40 -0400)]
doxygen: Fix some paths

- Add missing src dir.
- Exclude 'src/examples' from siphon processing so that example cli commands
  don't end up in user documentation.

Change-Id: I46a6ad759fa8220d305b007a9506956365fc79bd
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agoL2BD/TEST:fix l2bd multiinstance test 34/6634/2
Eyal Bari [Wed, 10 May 2017 13:08:19 +0000 (16:08 +0300)]
L2BD/TEST:fix l2bd multiinstance test

Change-Id: If864182ec656cc6c6353be642e22910a4fc89870
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoAdd crc32c inline function, allows compilation on 32-bit systems 52/6452/6
Damjan Marion [Wed, 26 Apr 2017 11:05:05 +0000 (13:05 +0200)]
Add crc32c inline function, allows compilation on 32-bit systems

32-bit code still can use crc32c instructions, but it operates
on 32 registers

Change-Id: I9bb6b0b59635d6ea6a753584676ebcf59c8f6584
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agodpdk: refactor interface speed detection 27/6627/3
Damjan Marion [Tue, 9 May 2017 17:50:26 +0000 (19:50 +0200)]
dpdk: refactor interface speed detection

- Adds VirtualFucntionEthernet for VFs
- Enables MLX4 driver

Change-Id: I163300e68edbe033227f641bdfcfe5918cbe58cf
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoMake reproducible build possible 85/6585/3
Marco Varlese [Wed, 3 May 2017 15:37:46 +0000 (17:37 +0200)]
Make reproducible build possible

For downstream consumption is important to have a way to specify the date or
the user or the hostname to particular values so to have reproducible builds
and/or packages.

Change-Id: I134288662b6cfbbe26bba7d8bc6be8511b34360c
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
7 years agodevice: Add callback for set interface rx-mode 28/6628/4
Steven [Tue, 9 May 2017 23:19:50 +0000 (16:19 -0700)]
device: Add callback for set interface rx-mode

- When the interface rx-mode is changed via CLI, the corresponding device
may want to know about it and to reset the driver. This patch is to add
the callback.

- In the function vnet_hw_interface_set_rx_mode, it appears it is missing
a line
  hw->rx_mode_by_queue[queue_id] = mode

because the function is checking if the new mode is the same as
hw->rx_mode_by_queue which is initialized to POLLING. So if the function is
called to change the mode to interrupt, it just returns without doing
anything. This is the check that I am talking about in the same function.

  if (hw->rx_mode_by_queue[queue_id] == mode)
    return 0;

Change-Id: Iaca2651c43e0ae3fda6fd8dc128e247b0851cc65
Signed-off-by: Steven <sluong@cisco.com>
7 years agoSNAT: move API code to separate file 35/6635/2
Matus Fabian [Wed, 10 May 2017 13:37:47 +0000 (06:37 -0700)]
SNAT: move API code to separate file

Move API source code from snat.c to snat_api.c

Change-Id: I1c4439eb5d2e3f43695ecc4d300eccd148105c15
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agovppinfra: optimize and simplify splat inline functions 25/6625/6
Damjan Marion [Tue, 9 May 2017 15:45:50 +0000 (17:45 +0200)]
vppinfra: optimize and simplify splat inline functions

Example for u32x4 case:
Old code generates 2 instructions:

vmovd  %edi,%xmm0
vpunpckldq %xmm0,%xmm0,%xmm0
vpunpcklqdq %xmm0,%xmm0,%xmm0

New code uses only one instruction:
mov    %edi,-0x4(%rsp)
vbroadcastss -0x4(%rsp),%xmm0

Change-Id: I989dc3025f5fe3f6c880972389ded11f31e2f3f6
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoImprove TCP option handling, VPP-757 29/6629/4
Florin Coras [Wed, 10 May 2017 01:54:52 +0000 (18:54 -0700)]
Improve TCP option handling, VPP-757

Change-Id: Ica634536387d1196366ec96c52770287fcab0768
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoBuiltin debug cli http server 18/6618/6
Dave Barach [Mon, 8 May 2017 23:15:03 +0000 (19:15 -0400)]
Builtin debug cli http server

Visit http://<vpp-ip>/show/interface or similar.

Change-Id: I076b4661cf19d1b94bb01efdadb5849446be915e
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoIgnore data in RST segments, VPP-723 20/6620/5
Florin Coras [Tue, 9 May 2017 07:52:37 +0000 (00:52 -0700)]
Ignore data in RST segments, VPP-723

Change-Id: I01650b3b10b79ec549be0d5eceb0e318c06fcb50
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoProduce vpp_papi*.egg for virtual environments 16/6616/2
Igor Mikhailov (imichail) [Mon, 8 May 2017 21:00:01 +0000 (14:00 -0700)]
Produce vpp_papi*.egg for virtual environments

Produce vpp_papi*.egg so that virtual environments (e.g. virtualenv)
could install vpp_papi inside them.

Change-Id: I9664d119a64f4968de44a7a430aec4879ed02b16
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
7 years agoGenerate test paths for lib and lib64 subdirectories 30/6630/1
Igor Mikhailov (imichail) [Wed, 10 May 2017 06:27:14 +0000 (23:27 -0700)]
Generate test paths for lib and lib64 subdirectories

wildcard produces empty paths when 'make test' is run
from a clean tree: install-<tag>-native directories
don't exist yet.

Change-Id: I3b3bbd86cf7eda18f2c698f85b834f82b1a19065
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
7 years agodpdk: refactor setup, start, stop code 18/6518/4
Damjan Marion [Fri, 28 Apr 2017 15:10:38 +0000 (17:10 +0200)]
dpdk: refactor setup, start, stop code

Change-Id: I0fec86914ec027383ff511b7092beac2363f55f7
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoFix remaining 32-bit compile issues 65/6465/10
Damjan Marion [Wed, 26 Apr 2017 13:32:12 +0000 (15:32 +0200)]
Fix remaining 32-bit compile issues

Change-Id: I9664214652229b663c3e3ba7406b4ede96bfb123
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoAPI support for IPsec tunnel interface creation 67/6567/3
Matthew Smith [Tue, 2 May 2017 21:20:41 +0000 (16:20 -0500)]
API support for IPsec tunnel interface creation

Change-Id: I8c9f886cb95e92adbe1c646844789ca0a6bb6140
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
7 years agoAdd missing format_ip6_address() functions to plugin_api. 17/6617/2
Jon Loeliger [Mon, 8 May 2017 21:53:44 +0000 (16:53 -0500)]
Add missing format_ip6_address() functions to plugin_api.

Specifically, the ACL plugin needed format_ip6_address()
and the ip46 variant as well.

Change-Id: Iec35b8acd4cab4bcbc73053dcca2ee91bd9c72cd
Signed-off-by: Jon Loeliger <jdl@netgate.com>
7 years agoAdd support for tcp/session buffer chains 13/6613/11
Florin Coras [Mon, 8 May 2017 02:12:02 +0000 (19:12 -0700)]
Add support for tcp/session buffer chains

Change-Id: I01c6e3dc3a1b2785df37bb66b19c4b5cbb8f3211
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agodpdk: use speed_capa to detect i40e device speed 14/6614/2
Damjan Marion [Mon, 8 May 2017 16:19:45 +0000 (18:19 +0200)]
dpdk: use speed_capa to detect i40e device speed

Change-Id: I1decca6fb5ce6de74ccbcd5a262ebd3db6f55cdc
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agovlib: do not unbind devices already bound to vfio-pci 15/6615/1
Damjan Marion [Mon, 8 May 2017 16:37:54 +0000 (18:37 +0200)]
vlib: do not unbind devices already bound to vfio-pci

Change-Id: I739bed5b9d9504d18ee88206e29ebc4ba1b47d28
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoL2FIB:CLI/API to flush all non-static entries 91/6591/8
Eyal Bari [Thu, 27 Apr 2017 11:07:55 +0000 (14:07 +0300)]
L2FIB:CLI/API to flush all non-static entries

added CLI l2fib flush-mac all
added API l2fib_flush_all
flushes all non static l2fib entries on all valid BDs

Change-Id: Ic963c88f4bed56308c03ab43106033132a0e87be
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoAvoid active connection prevent timeout of idle conns after it 64/6564/4
Andrew Yourtchenko [Tue, 2 May 2017 18:08:51 +0000 (20:08 +0200)]
Avoid active connection prevent timeout of idle conns after it

Fix a logic error related to timing out of the connections
following the active one. To avoid this class of issue in
the future, create corresponding testcases, as well as some
trivial sanity testcases for both IPv4 and IPv6.

Since these tests are timing-dependent and take up time,
mark them as extended tests.

Change-Id: I2c72bad5efda7db8aa9cb05801fe47928dc47927
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoRemove L2 GPE interface from bridge when deleting, VPP-833 04/6604/3
Florin Coras [Fri, 5 May 2017 07:24:16 +0000 (00:24 -0700)]
Remove L2 GPE interface from bridge when deleting, VPP-833

Change-Id: I32725006e9235a02cada5b0ad8974bfc4274339f
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoInclude TCP options in segment size computation 03/6603/3
Florin Coras [Thu, 4 May 2017 21:25:50 +0000 (14:25 -0700)]
Include TCP options in segment size computation

Ensure that TCP data plus options does not exceed peer's advertised MSS.

Change-Id: I0de824cb3619346f0394dd694942fc1cf33a82b7
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoFix TCP loss recovery, VPP-745 88/6588/6
Florin Coras [Thu, 4 May 2017 04:09:42 +0000 (21:09 -0700)]
Fix TCP loss recovery, VPP-745

Allows pure loss recovery retransmits only on timeout.

Change-Id: I563cdbf9e7b890a6569350bdbda4f746ace0544e
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agolcov is an EPEL rpm (at least for Centos) 90/6590/2
Igor Mikhailov (imichail) [Thu, 4 May 2017 07:09:42 +0000 (00:09 -0700)]
lcov is an EPEL rpm (at least for Centos)

Change-Id: I064a78df6a2cf734bb7c54f80682690c203a0a98
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
7 years agoFix mac check issue for vitual tunnel interface with no mac address 77/6577/3
Hongjun Ni [Wed, 26 Apr 2017 10:40:55 +0000 (18:40 +0800)]
Fix mac check issue for vitual tunnel interface with no mac address

Change-Id: I6ce21317fcaa25781199f4329be815f076ab8b09
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
7 years agoFix L2FIB learn counter and memory cleanup of mac_by_ip6 hash table 12/6612/2
John Lo [Fri, 5 May 2017 16:35:25 +0000 (12:35 -0400)]
Fix L2FIB learn counter and memory cleanup of mac_by_ip6 hash table

Fix global_learn_count to be incremented or decremented by add and
deletion of non-static MAC entries from L2FIB only. Without this fix,
the counter may reach the threshold of 1M and stop MAC leanring even
though number of MAC entries in L2FIB is less than the threshold.

Cleanup indirect hash key memory used by mac_by_ip6 hash table on
BD deletion.

Change-Id: I13986c4e6304c7956122520dd3f83d6bb6e65a15
Signed-off-by: John Lo <loj@cisco.com>
7 years agoip6_to_ip4.h coverity fix 10/6610/1
Matus Fabian [Fri, 5 May 2017 11:57:16 +0000 (04:57 -0700)]
ip6_to_ip4.h coverity fix

Change-Id: Ia11fa42d1f2b21a6195e7dc890f958830f83d3a7
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agoSNAT: Additional tests for SNAT interfaces without a configured ip address 94/6594/3
Martin Gálik [Thu, 4 May 2017 11:35:04 +0000 (04:35 -0700)]
SNAT: Additional tests for SNAT interfaces without a configured ip address

Change-Id: I7edea5d7b105ba66e0e04d509968b92cfb64c84a
Signed-off-by: Martin Gálik <magalik@cisco.com>
7 years agoFirst commit SR MPLS 83/6383/14
Pablo Camarillo [Mon, 24 Apr 2017 15:51:56 +0000 (17:51 +0200)]
First commit SR MPLS

Change-Id: I961685a2a0e4c314049444c64eb6ccf877c278dd
Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
7 years agoNAT64: Move IPv6-IPv4 virtual reassembly code from MAP-T to common library (VPP-708) 55/6555/11
Matus Fabian [Tue, 2 May 2017 10:15:22 +0000 (03:15 -0700)]
NAT64: Move IPv6-IPv4 virtual reassembly code from MAP-T to common library (VPP-708)

Change-Id: I9ad636f80bf109ffac9ca1b6d80d5f2c31f2076a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agoFixes and improvements in session hashtable keys 89/6589/3
Clement Durand [Thu, 4 May 2017 06:33:55 +0000 (08:33 +0200)]
Fixes and improvements in session hashtable keys

Fix in v6 keys :
* The copy of the keys was only partial

A few suggestions are applied in this commit :
* Since there are not so many unused fields, we avoid to memset 0 and prefer
  setting the unused fields to 0.
* By using a cast, it seems painless to avoid allocating a structure for the
  keys creation.

Change-Id: Iaee6f036f2a979cceaeb297d98ce6c307a5ac029
Signed-off-by: Clement Durand <clement.durand@polytechnique.edu>
7 years agoFix coverity issue 95/6595/1
Filip Tehlar [Thu, 4 May 2017 12:52:42 +0000 (14:52 +0200)]
Fix coverity issue

Change-Id: I8110b2a1d7bf8a818c7e9b6f95c3f60324e8ccab
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoLISP: group mapping records in map-register message 79/6579/2
Filip Tehlar [Wed, 3 May 2017 08:12:44 +0000 (10:12 +0200)]
LISP: group mapping records in map-register message

Change-Id: I546c761acfbf880717163a035aa691b04337b7bf
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoFix RPM_DEPENDS for all rpm distros after 28ea251 47/6547/2
Igor Mikhailov (imichail) [Tue, 2 May 2017 07:03:09 +0000 (00:03 -0700)]
Fix RPM_DEPENDS for all rpm distros after 28ea251

Change-Id: I58ffdf75f361ff830c2b0c6400ccd012a4d16d3d
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
7 years agoFix vnet unit tests 53/6553/3
Filip Tehlar [Wed, 26 Apr 2017 14:09:06 +0000 (16:09 +0200)]
Fix vnet unit tests

Change-Id: Ibe55e4399c6b78d83268d7c49ed498cab7bfdb43
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoL2FIB:flush interface learned macs on down 62/6362/6
Eyal Bari [Thu, 20 Apr 2017 11:45:17 +0000 (14:45 +0300)]
L2FIB:flush interface learned macs on down

Change-Id: I80a723f55fcf2ecc3209a35e8297c88b45b1abfb
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoA sprinkling of const in vlibmemory/api.h and friends 79/6479/3
Neale Ranns [Wed, 26 Apr 2017 20:59:20 +0000 (13:59 -0700)]
A sprinkling of const in vlibmemory/api.h and friends

Change-Id: I953ebb37eeec7de0c4a6b00258c3c67a83cbc020
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agochange ip4_drop_node node register coding format 68/6568/1
flyingeagle23 [Wed, 3 May 2017 03:29:53 +0000 (11:29 +0800)]
change ip4_drop_node node register coding format

Change-Id: Id4fdf2abf3bae3b14cdc6489ca16d2007da78d07
Signed-off-by: flyingeagle23 <wang.hui56@zte.com.cn>
7 years agoPrevent Bridge Domain operations on BD 0. 61/6561/2
Jon Loeliger [Tue, 2 May 2017 16:06:23 +0000 (11:06 -0500)]
Prevent Bridge Domain operations on BD 0.

The default bridge domain, 0, is created automatically
with static features.  It should be modified by neither
the CLI nor the API.  So add tests for, and reject any
operation on BD 0.  The new API error message BD_NOT_MODIFIABLE
is returned in such cases.

Change-Id: Iaf3dd80c4f43cf41689ca55756a0a3525420cd12
Signed-off-by: Jon Loeliger <jdl@netgate.com>
7 years agoUse per-protocol default flow-hash config when the FIB table index is not known 62/6562/2
Neale Ranns [Tue, 2 May 2017 17:15:19 +0000 (10:15 -0700)]
Use per-protocol default flow-hash config when the FIB table index is not known

Change-Id: If088e75801831befc6bddb77ea20abe9288b93c4
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoFix TCP tx when snd_wnd < smss 65/6565/2
Florin Coras [Tue, 2 May 2017 19:40:39 +0000 (12:40 -0700)]
Fix TCP tx when snd_wnd < smss

Fixes VPP-728, VPP-729, VPP-730

Change-Id: Ie8c6c0dd006f98527525e87d19b508bb8d39db69
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoBFD: don't crash if interface is deleted 60/6560/3
Klement Sekera [Tue, 2 May 2017 05:38:01 +0000 (07:38 +0200)]
BFD: don't crash if interface is deleted

Instead, drop the BFD session associated with it..

Change-Id: Ie09877d5c94844be2e833900d9dde7f23edaf8cd
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoAllow local/for-us replications for IP multicast routes on the CLI 63/6563/2
Neale Ranns [Tue, 2 May 2017 17:17:17 +0000 (10:17 -0700)]
Allow local/for-us replications for IP multicast routes on the CLI

Change-Id: I046d9402b79fdbc6a6663199ffff8e40a278fd51
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoAdd interface rx mode commands, unify rx mode and placement CLI 19/6519/4
Damjan Marion [Fri, 28 Apr 2017 10:29:15 +0000 (12:29 +0200)]
Add interface rx mode commands, unify rx mode and placement CLI

Change-Id: Ib506c3e9d66170f29e3266ad6dc4d32b829befba
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agodpdk: remove unused code 20/6520/2
Damjan Marion [Fri, 28 Apr 2017 15:19:16 +0000 (17:19 +0200)]
dpdk: remove unused code

Change-Id: I16dcc0de2553c6c1eb87dd1ec4c8d3c649e6f285
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoTCP ooo reception fixes 44/6444/5
Florin Coras [Wed, 26 Apr 2017 07:08:42 +0000 (00:08 -0700)]
TCP ooo reception fixes

- Improve svm fifo handling of out-of-order segments
- Ensure tsval_recent is updated only if rcv_las falls withing the
  segments's sequence space
- Avoid directly dropping old ACKs
- Improve debugging

Change-Id: I88dbe2394a0ad7eb389a4cc12d013a13733953aa
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agodpdk: cryptodev support enabled by default 48/5848/4
Sergio Gonzalez Monroy [Wed, 22 Mar 2017 16:11:06 +0000 (16:11 +0000)]
dpdk: cryptodev support enabled by default

This patch slightly modifes how to enable DPDK Cryptodev.

The startup option 'enable-cryptodev' has been removed and unless not enough
cryptodevs are found, DPDK cryptodev will be enabled by default.

Change-Id: Ic0ac507802cdc0eeb51f065e04ec43a1885617cf
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
7 years agoFix hostname fencepost error in dhcp_compl_event_callback. 17/6517/1
Jon Loeliger [Fri, 28 Apr 2017 02:20:51 +0000 (21:20 -0500)]
Fix hostname fencepost error in dhcp_compl_event_callback.

Hostnames are limited to 63 characters and a NUL terminator.

Change-Id: Ie1724d83675cca5e8cdfcd99d8e56e530a044d5d
Signed-off-by: Jon Loeliger <jdl@netgate.com>
7 years agoaf_packet: reflect admin device state on host 33/6333/7
Ray Kinsella [Fri, 21 Apr 2017 11:24:43 +0000 (12:24 +0100)]
af_packet: reflect admin device state on host

Setting the interface state in VPP on an af_packet device, was not being
reflected on the host. This implied the user had to set the device state
in VPP and then on the host, in order to put the interface into an 'up'
state. This changes makes the device state consisent in VPP and the host.

Change-Id: I6dc6aee79503e04576683db937b861337a2b375b
Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
7 years agoFix memory leak on deletion of BD (bridge domain) 10/6510/2
John Lo [Fri, 28 Apr 2017 04:33:36 +0000 (00:33 -0400)]
Fix memory leak on deletion of BD (bridge domain)

On BD deletion, free memory used by members vector and mac_by_ip4
and mac_by_ip6 hash tables.

Change-Id: Ied467e79bb6636fd8788bdeddee660c66391bb7e
Signed-off-by: John Lo <loj@cisco.com>
7 years agovhost: Disallow duplicate path name for vhost interface 38/6438/3
Steven [Tue, 25 Apr 2017 23:16:00 +0000 (16:16 -0700)]
vhost: Disallow duplicate path name for vhost interface

When creating or modifying a vhost interface, verify if the path name
already existed and reject the command.

Change-Id: I8b2d33b77c847f774492874f7d194fa72c488479
Signed-off-by: Steven <sluong@cisco.com>
7 years agodpdk: cleanup, move APIs to separate .c file 09/6509/1
Damjan Marion [Thu, 27 Apr 2017 19:12:17 +0000 (21:12 +0200)]
dpdk: cleanup, move APIs to separate .c file

Change-Id: Id632ff1b30be808d9f270e2f77260391569fbda2
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoLISP: fix deleting of locators, VPP-713 99/6499/2
Filip Tehlar [Thu, 27 Apr 2017 12:29:27 +0000 (14:29 +0200)]
LISP: fix deleting of locators, VPP-713

Change-Id: I4a2d24b7124dc9afaf81f29e06e43235a103a320
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>