vpp.git
6 years agoVCL: improve debug output 65/9565/2
Dave Wallace [Sat, 25 Nov 2017 02:44:06 +0000 (21:44 -0500)]
VCL: improve debug output

- Refactor debug output to include vpp handle associated
  with session id where appropriate.
- Fix vcom_connect return value on error.
- Refactor vcom_socket_epoll_pwait().
- Fix sock_test_server/client connect failure handling.

Change-Id: I2649596aa4b8a77d9bd876409a76810cb2785797
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoGENEVE: shift/mask for header 88/9488/8
Marco Varlese [Mon, 20 Nov 2017 08:20:38 +0000 (09:20 +0100)]
GENEVE: shift/mask for header

This patch addresses the bit-shifting/masking required to set/get specific
fields/bits in the GENEVE header.

Change-Id: I06ea6d3487c827ec2bc3edfc67c7cb97640d4fc3
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agodpdk: enable tx checksum offloads as default, add disable knob 58/9558/2
Damjan Marion [Fri, 24 Nov 2017 13:34:18 +0000 (14:34 +0100)]
dpdk: enable tx checksum offloads as default, add disable knob

New startup.conf knob:

dpdk {  ... no-tx-checksum-offload ... }

Change-Id: I337fd57616dd77687300861b411b420a3cb75149
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoVOM: Additions to allow uses to UT applications that use VOM 52/9552/3
Neale Ranns [Thu, 23 Nov 2017 20:15:00 +0000 (12:15 -0800)]
VOM: Additions to allow uses to UT applications that use VOM

- find object by key
- compare objects

Change-Id: I36ec8612be9482bcef7ceced2a59f7403f77b3e8
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agodpdk: avoid false sharing of dpdk_buffer_per_thread_data 56/9556/1
Damjan Marion [Fri, 24 Nov 2017 10:15:38 +0000 (11:15 +0100)]
dpdk: avoid false sharing of dpdk_buffer_per_thread_data

Change-Id: Iaae69a1219ccaedbfee5c3075c41c7b31c6e2b70
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agomemif: fix input node multiversion constructor 51/9551/1
Damjan Marion [Thu, 23 Nov 2017 18:13:05 +0000 (19:13 +0100)]
memif: fix input node multiversion constructor

Change-Id: I498ed1162eadf3eff2543f1ec02a9b1e5fdc05d8
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agomemif: try harder to transmit packets 50/9550/2
Damjan Marion [Thu, 23 Nov 2017 16:41:05 +0000 (17:41 +0100)]
memif: try harder to transmit packets

Change-Id: I1e57a86b8872798a888e7d6128d9c4537a8090e6
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agodpdk: prefetch both cachelines during buffer free 49/9549/2
Damjan Marion [Thu, 23 Nov 2017 16:27:05 +0000 (17:27 +0100)]
dpdk: prefetch both cachelines during buffer free

Change-Id: I4ae65494b8f9bc51521add5e66a51b594aad6716
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agomemif: multiversioning 48/9548/1
Damjan Marion [Thu, 23 Nov 2017 16:19:08 +0000 (17:19 +0100)]
memif: multiversioning

Change-Id: I881551e6c13503a71ae29a7a58bde4d193745d55
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoTests clean-up when cleaning VPP code. 27/9527/3
Marco Varlese [Wed, 22 Nov 2017 15:46:58 +0000 (16:46 +0100)]
Tests clean-up when cleaning VPP code.

Tests are not cleaned when running "make wipe". However, it makes sense
to clean tests too since the "tested code" has been wiped and - likely -
will be rebuilt with new/extra features/requirements.

Change-Id: I34cc188e78f51d327f78f3d43cea5a82fdc6fb25
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agoVCL: remove bogus ASSERT(). 33/9533/2
Dave Wallace [Wed, 22 Nov 2017 20:33:21 +0000 (15:33 -0500)]
VCL: remove bogus ASSERT().

Change-Id: I810cbcd13f73c0376c6be64ce2d11404bdd1755f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoVPP-254 Coding standard cleanup - vnet/vnet/hdlc 21/9521/2
Swarup Nayak [Wed, 22 Nov 2017 11:11:57 +0000 (16:41 +0530)]
VPP-254 Coding standard cleanup - vnet/vnet/hdlc

Change-Id: I125b1ca20a5b30d199d4a79ad0034533818a5e9c
Signed-off-by: Swarup Nayak <swarupnpvt@gmail.com>
6 years agosession: do not check transport for local table binds 31/9531/4
Florin Coras [Wed, 22 Nov 2017 18:39:09 +0000 (10:39 -0800)]
session: do not check transport for local table binds

Change-Id: I326c4472e5da8b6c0737655952d1983c7a0ea996
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years ago Makefile: make_parallel_flags via env variable 12/9512/3
Ed Kern [Wed, 22 Nov 2017 00:22:23 +0000 (17:22 -0700)]
 Makefile: make_parallel_flags via env variable

    /proc/cpuinfo with container builds may lead to jenkins failures
    ability to pass in MAKE_PARALLEL_FLAGS via env directly for
    container builds

Change-Id: Id02acb542d5ffbe3f4dec7712ae2cb07512b236d
Signed-off-by: Ed Kern <ejk@cisco.com>
6 years agodpdk: fix potential crash in buffer free function 23/9523/4
Damjan Marion [Wed, 22 Nov 2017 12:27:03 +0000 (13:27 +0100)]
dpdk: fix potential crash in buffer free function

Original code was not thread safe.

Change-Id: I3d473b976d2b9ff62f42955c5c2a7fd6b4990cc2
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agosession: more rules unit tests and cli improvements 13/9513/2
Florin Coras [Wed, 22 Nov 2017 06:13:03 +0000 (22:13 -0800)]
session: more rules unit tests and cli improvements

Change-Id: I7e5545297ab9f2db8d7d07e44c744bdb0a0874a7
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agouse intel intrinsics in clib_memcpy64_x4 22/9522/2
Damjan Marion [Wed, 22 Nov 2017 11:41:32 +0000 (12:41 +0100)]
use intel intrinsics in clib_memcpy64_x4

While my original attmept was to write this function to be portable
and work on non-x86 systems, seems that gcc-5 desn't respect aligment
attribute and issues alligned vector insutruciton which causes crash.

Change-Id: If165c8d482ac96f2b71959d326f9772b48097b48
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoCLI for interface MPLS enable returns errors to caller 19/9519/2
Neale Ranns [Wed, 22 Nov 2017 10:49:13 +0000 (02:49 -0800)]
CLI for interface MPLS enable returns errors to caller

Change-Id: I9eef6fb9d050552f0759080ea645b885d5b9cc12
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoFix MPLS local-label CLI 20/9520/2
Neale Ranns [Wed, 22 Nov 2017 11:05:29 +0000 (03:05 -0800)]
Fix MPLS local-label CLI

Change-Id: Ia3d3d7a75282dc3073eaa83e49cef756db19874a
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoVOM: stats: Associate stat obj to interface 10/9510/2
Mohsin Kazmi [Mon, 20 Nov 2017 09:23:47 +0000 (10:23 +0100)]
VOM: stats: Associate stat obj to interface

Change-Id: Id8b159dd72b92798538a32fe570fb0038d742ef2
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agoVCL: close-on-empty state transition refactoring. 02/9502/4
Dave Wallace [Tue, 21 Nov 2017 08:45:09 +0000 (03:45 -0500)]
VCL: close-on-empty state transition refactoring.

- Refactor session disconnect/close state
  transitions. Only remove session state
  when app calls close().  Add HUP/reset
  feedback by returning ECONNRESET.
- Update debug messages.
- Use VCL_LOCK_AND_GET_SESSION macro more
  extensively

Change-Id: I23d372834b901a6726e6d6c1061df73ad967882f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agosession: unset fifo event before reading fifo size 11/9511/1
Florin Coras [Tue, 21 Nov 2017 12:20:42 +0000 (04:20 -0800)]
session: unset fifo event before reading fifo size

Change-Id: Ic32a76e5f7c48fd52f2e93ee18ba23fb6ad1b855
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agotcp: initialize builtin client ns 01/9501/2
Florin Coras [Mon, 20 Nov 2017 21:33:33 +0000 (13:33 -0800)]
tcp: initialize builtin client ns

Change-Id: I992f7f60e463b81bbdbd53957f656131fd48632b
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agostn-plugin: do not assume all punted packets start with L3 header. 07/9507/2
Andrew Yourtchenko [Tue, 21 Nov 2017 13:37:43 +0000 (14:37 +0100)]
stn-plugin: do not assume all punted packets start with L3 header.

Some punt scenarios (notably, involving DNS traffic)
do not have the current_data set to the L3 header -
as a result, chaos ensues. To tackle this, approach
the parsing from the other side, and look at
the hopefully remaining ethernet header
to see whether the packet is IPv4 or IPv6.

Verified the STN'ed TCP traffic continues to work,
and that the STN'ed DNS traffic starts to work as well.

Change-Id: I0aa2ad1df2fb23dd4e54a564714103b19114d636
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agouse REV on aarch64 for endianness swapping (VPP-1067) 05/9505/3
Gabriel Ganne [Tue, 21 Nov 2017 10:33:45 +0000 (11:33 +0100)]
use REV on aarch64 for endianness swapping (VPP-1067)

Change-Id: I2de52725f40380422ca5019405df36cc05681603
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agolibmemif: unit test update, continue configure if check module missing 94/9494/3
Jakub Grajciar [Mon, 20 Nov 2017 12:11:50 +0000 (13:11 +0100)]
libmemif: unit test update, continue configure if check module missing

Change-Id: I11ef4e7dcf1759eb3545be5db2a7196d1217a6dd
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
6 years agodpdk: add l2_hdr_offset and l3_hdr_offset in vlib_buffer_t 06/9506/1
Damjan Marion [Tue, 21 Nov 2017 12:12:41 +0000 (13:12 +0100)]
dpdk: add l2_hdr_offset and l3_hdr_offset in vlib_buffer_t

Change-Id: I0a6d1257e391c3b6f7da6498bd5f7d4c545d17e9
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agosession/tcp: filtering improvements 86/9486/4
Florin Coras [Mon, 20 Nov 2017 02:06:58 +0000 (18:06 -0800)]
session/tcp: filtering improvements

- make allow action explicit (-3)
- add session lookup is_filtered return flag that is set if lookup hit a
  deny filter
- change tcp logic to drop filtered packets when punting is enabled

Change-Id: Ic38f294424663a4e108439b7571511f46f8e0be1
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agodpdk: add support for DPDK 17.11 69/9469/8
Damjan Marion [Fri, 17 Nov 2017 08:46:41 +0000 (09:46 +0100)]
dpdk: add support for DPDK 17.11

Also remove DPDK 17.05 support.

Change-Id: I4f96cb3f002cd90b12d800d6904f2364d7c4e270
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoVCL: Update lcl addr/port from connect session reply msg. 87/9487/2
Dave Wallace [Mon, 20 Nov 2017 07:31:48 +0000 (02:31 -0500)]
VCL: Update lcl addr/port from connect session reply msg.

Change-Id: Ic738448007e49b0b36e336ffd50e800b04ad3c6d
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoHave PAPI find its API definition files 81/9481/2
Chris Luke [Sat, 4 Nov 2017 03:32:38 +0000 (23:32 -0400)]
Have PAPI find its API definition files

- Add a basic heuristic to have vpp_papi search in several
  places for the JSON API files.
- It's clever enough to work out the path to these files
  from within several places in the source tree, falling
  back to the system location as a last resort.

Change-Id: I1f823588e5aa0064d545ce4206ab29dbdedc4c7f
Signed-off-by: Chris Luke <chrisy@flirble.org>
6 years agonowhere to set read_timeout 32/9332/4
dongjuan [Thu, 9 Nov 2017 06:46:36 +0000 (14:46 +0800)]
nowhere to set read_timeout

Change-Id: I8a16f2ba884451ca8028adb91383d57fdf1d9d50
Signed-off-by: dongjuan <dong.juan1@zte.com.cn>
6 years agosession: fix session rules api to use transport proto 84/9484/2
Florin Coras [Sun, 19 Nov 2017 02:45:20 +0000 (18:45 -0800)]
session: fix session rules api to use transport proto

Change-Id: Ie7b795715530e0920763098eb468c55fb17b1a2c
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoVCL-LDPRELOAD: Fix CID179207 85/9485/1
Dave Wallace [Sun, 19 Nov 2017 16:20:02 +0000 (11:20 -0500)]
VCL-LDPRELOAD: Fix CID179207

Change-Id: Ia6b9e39d5a2ef064cf71bfe87cb4b4a0648d735d
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoCall a plugin init function by name 80/9480/2
Dave Barach [Sat, 18 Nov 2017 13:43:06 +0000 (08:43 -0500)]
Call a plugin init function by name

Use this macro to arrange init function ordering between friend
plugins.  Fails in the usual manner if the plugin doesn't exist, or if
the init function symbol is AWOL.

clib_error_t *
thisplug_init (vlib_main_t *vm)
{
  clib_error_t *error = 0;

  if ((error = vlib_plugin_init_function ("otherplug.so", otherplug_init)))
     return error;

  <etc>
  return error;
}
VLIB_INIT_FUNCTION(thisplug_init);

Change-Id: Ideecaf46bc0b1546e85096e54be8ddef87946565
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agotest http server: prealloc fifos/segment options 78/9478/2
Florin Coras [Fri, 17 Nov 2017 22:26:01 +0000 (14:26 -0800)]
test http server: prealloc fifos/segment options

Change-Id: I5e36ea9335a9a633a112c27396997a765f279e06
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoRename classifier ip6-sr metadata set action 79/9479/1
Dave Barach [Sat, 18 Nov 2017 11:58:34 +0000 (06:58 -0500)]
Rename classifier ip6-sr metadata set action

There's nothing ip6-sr specific about it.

Change-Id: I9e3710162bd81b535c46599c988557abf5a5003b
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agounformat function for FIB paths 39/9439/3
Neale Ranns [Wed, 15 Nov 2017 20:54:46 +0000 (12:54 -0800)]
unformat function for FIB paths

Change-Id: I32de25890ac0a643314f650591d2479879d9a2a6
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoVOM fixes and logger improvements 70/9470/2
Neale Ranns [Fri, 17 Nov 2017 13:08:55 +0000 (05:08 -0800)]
VOM fixes and logger improvements

Change-Id: I5e3fa5e098a8ea26dbc3d3a1dc064e3507e33d8e
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoAdd a non interactive mode 29/9429/2
John DeNisco [Wed, 15 Nov 2017 13:50:57 +0000 (08:50 -0500)]
Add a non interactive mode

Change-Id: I2ebcb1acb43b4316e3dd48e83909d710dbef4e2f
Signed-off-by: John DeNisco <jdenisco@cisco.com>
6 years agoReplace tap interface using general interface 67/9467/4
Hongjun Ni [Fri, 17 Nov 2017 15:43:11 +0000 (23:43 +0800)]
Replace tap interface using general interface

Change-Id: Icd73f00162fb6aabe296c8bb6f2174ad4f6a17b7
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
6 years agosubunit is required on centos as well as fedora 56/9456/2
Gabriel Ganne [Thu, 16 Nov 2017 13:47:42 +0000 (14:47 +0100)]
subunit is required on centos as well as fedora

Remove fedora dependency restriction on subunit and subunit-devel packages.
libsunit is only called in test/ext/Makefile on all platforms safe opensuse.

Change-Id: I483f42f20f6ba8bd112c18a9c51753a5d816d1c1
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
Signed-off-by: Romain Ly <romain.ly@enea.com>
6 years agoacl-plugin: use ip.save_rewrite_length to calculate IP header offset on L3 egress... 34/9434/2
Andrew Yourtchenko [Wed, 15 Nov 2017 15:58:51 +0000 (16:58 +0100)]
acl-plugin: use ip.save_rewrite_length to calculate IP header offset on L3 egress path

L3 egress path does not set the ethernet flags reflecting the count of VLANs,
but rather has the offset explicitly, so use that.

Change-Id: Id3f6562dcd52ca24137c305f1a1c88c1f125da78
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agovppcom: improve listener session handling 66/9466/6
Florin Coras [Thu, 16 Nov 2017 23:32:50 +0000 (15:32 -0800)]
vppcom: improve listener session handling

Change-Id: I86b2e2c5a655e53a915fbf62ff04ee23c86de234
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoacl-plugin: also print human-friendly format of 5tuple in packet trace 27/9427/2
Andrew Yourtchenko [Wed, 15 Nov 2017 13:04:05 +0000 (14:04 +0100)]
acl-plugin: also print human-friendly format of 5tuple in packet trace

The original version printed just a few u64s, which is useful for
directly working on the code, but not when figuring out what is
possibly a config or environment-related issue. So, add printing
the 5-tuple struct in a way that is usable by an operator.

Change-Id: I84cc3a239cdaff05ed31c3458cea198e38b58e03
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agotcp: register with ip for header parsing by default 64/9464/1
Florin Coras [Thu, 16 Nov 2017 17:57:50 +0000 (09:57 -0800)]
tcp: register with ip for header parsing by default

Change-Id: I4e420bcc9241b03e179a939911059c0cc3704a51
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoDeal with double name-pointer chases 59/9459/3
Dave Barach [Thu, 16 Nov 2017 15:01:12 +0000 (10:01 -0500)]
Deal with double name-pointer chases

Change-Id: I153b07b4348133535b16b6bf55527d19a6b927c6
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agodpdk: add additional data to TX trace 49/9449/2
Damjan Marion [Thu, 16 Nov 2017 13:14:57 +0000 (14:14 +0100)]
dpdk: add additional data to TX trace

Change-Id: I02b2b69db1e2afe62e3d3413034feb3bdcb3123e
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agolibmemif: unmask head/tail pointers fix, additional ring info in memif_queue_details_t 48/9448/2
Jakub Grajciar [Thu, 16 Nov 2017 13:02:49 +0000 (14:02 +0100)]
libmemif: unmask head/tail pointers fix, additional ring info in memif_queue_details_t

Change-Id: I1dbf91c2a1575d5a82af70bfccdd990310323a8c
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
6 years agodpdk/ipsec: use physmem when creating pools 30/9430/2
Sergio Gonzalez Monroy [Wed, 15 Nov 2017 15:43:35 +0000 (15:43 +0000)]
dpdk/ipsec: use physmem when creating pools

Change-Id: Ic4f797cea6fa21fb29d646256210357cf5267b38
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
6 years agoAdd Support of DHCP VSS Type 0 where VPN-ID is ASCII 20/9420/4
John Lo [Tue, 14 Nov 2017 18:19:26 +0000 (13:19 -0500)]
Add Support of DHCP VSS Type 0 where VPN-ID is ASCII

Enhence support of DHCP VSS (Virtual Subnet Selection) to include
VSS type 0 where VSS info is a NVT (Network Virtual Terminal)
ASCII VPN ID where the ASCII string MUST NOT be terminated with a
zero byte. Existing code already support VSS type 1, where VSS
information is a RFC 2685 VPN-ID of 7 bytes with 3 bytes OUI
and 4 bytes VPN index, and VSS type 255 indicating global VPN.

Change-Id: I54edbc447c89a2aacd1cc9fc72bd5ba386037608
Signed-off-by: John Lo <loj@cisco.com>
6 years agomemif: fix uninitialized pointer read coverity error 41/9441/1
Steven [Thu, 16 Nov 2017 00:00:38 +0000 (16:00 -0800)]
memif: fix uninitialized pointer read coverity error

Set the content of tmp.sock prior to calling memif_msg_send_disconnect.
Also fix the problem socket was not close in the same spot due to
error encountered.

Change-Id: I8f54ebad2250d1944afcc52e71d2a59da05362af
Signed-off-by: Steven <sluong@cisco.com>
6 years agoBIER: coverity fixes 38/9438/2
Neale Ranns [Wed, 15 Nov 2017 18:44:07 +0000 (10:44 -0800)]
BIER: coverity fixes

Change-Id: I657bade082f9f754b294cd5f23ecfad4f0f46265
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoPunt DNS request/reply traffic when name resolution disabled 37/9437/1
Dave Barach [Wed, 15 Nov 2017 18:28:15 +0000 (13:28 -0500)]
Punt DNS request/reply traffic when name resolution disabled

Change-Id: Iaad22f25993783be57247aa1f050740f96d2566a
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoRevert "vnet: af_packet mark l3 offload cksum" 35/9435/2
Jakub Grajciar [Wed, 15 Nov 2017 16:25:50 +0000 (17:25 +0100)]
Revert "vnet: af_packet mark l3 offload cksum"

This reverts commit fa600c9169c0d7104af7a9be12a0471a8a8c8262.

Change-Id: I873b53b2c025d7aba2211cab9b3e2d780af33b32
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
6 years agovxlan extended tests - fix scapy-related issues 23/9423/2
Gabriel Ganne [Wed, 15 Nov 2017 09:55:22 +0000 (10:55 +0100)]
vxlan extended tests - fix scapy-related issues

- Add vxlan-gpe binding on udp port 4790 (taken from scapy upstream)
- VXLAN.VNI -> VXLAN.vni

Change-Id: If7ad38fa04fbfec01e01c81a06e88ffe70183672
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoadd libffi-dev to DEB_DEPENDS 54/8954/3
Gabriel Ganne [Mon, 23 Oct 2017 08:01:10 +0000 (10:01 +0200)]
add libffi-dev to DEB_DEPENDS

Package is already in the RPM_DEPENDS list, and is required for test-* targets

Change-Id: I3846e68855402b50a51adf3daf218e0244562cd6
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoarmv8 crc32 - fix macro name 18/9418/2
Gabriel Ganne [Tue, 14 Nov 2017 16:33:51 +0000 (17:33 +0100)]
armv8 crc32 - fix macro name

Change-Id: Iba2d20c0a3d4f07457d108d014a6fa4522cb8e2c
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoFix cosmetic issue in configure.ac 26/9426/2
Damjan Marion [Wed, 15 Nov 2017 12:57:20 +0000 (13:57 +0100)]
Fix cosmetic issue in configure.ac

Change-Id: I0a6a58b4ed0a6609382cce8bc2c6668a681823fc
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoVOM: interface's handle() retreives from singular instance 24/9424/2
Neale Ranns [Wed, 15 Nov 2017 10:52:13 +0000 (02:52 -0800)]
VOM: interface's handle() retreives from singular instance

Change-Id: I262f2113f5805c0f89b615a0383efa8520184dd1
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoVOM: interface RD update reconfigures L3 bindings 21/9421/2
Neale Ranns [Tue, 14 Nov 2017 19:04:28 +0000 (11:04 -0800)]
VOM: interface RD update reconfigures L3 bindings

Change-Id: I273e1ea28c3c146e4a88d031c790c1cc56dccf00
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoVOM: bridge-domain learning mode and route help commands 19/9419/2
Neale Ranns [Tue, 14 Nov 2017 16:40:43 +0000 (08:40 -0800)]
VOM: bridge-domain learning mode and route help commands

Change-Id: I2fa219d6530f1e7a3b8ae32d35a0c60ba57c5129
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoIp6 dump not showing fib table names (VPP-1063) 17/9417/2
Neale Ranns [Tue, 14 Nov 2017 16:10:41 +0000 (08:10 -0800)]
Ip6 dump not showing fib table names (VPP-1063)

Change-Id: Idc7e7c35f17d514589d1264f1d1be664192ee586
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoFix typos in configure.ac and dpdk/buffer.c 15/9415/3
Damjan Marion [Tue, 14 Nov 2017 14:21:19 +0000 (15:21 +0100)]
Fix typos in configure.ac and dpdk/buffer.c

Change-Id: I74ff693315a3ffc7aa2640f25d906ca0d6da6bc5
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agovppinfra: fix pool_get_aligned_will_expand for fixed pools 07/9407/2
Florin Coras [Tue, 14 Nov 2017 01:44:51 +0000 (17:44 -0800)]
vppinfra: fix pool_get_aligned_will_expand for fixed pools

Change-Id: Ia66ac0a2fa23a3d29370b54e2014900838a8d3ac
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoNULL-terminate load_balance_nsh_nodes[] 16/9416/2
Gabriel Ganne [Tue, 14 Nov 2017 15:07:34 +0000 (16:07 +0100)]
NULL-terminate load_balance_nsh_nodes[]

Change-Id: Ibc5528bea564f6c2b0ff34220405395bc78274fc
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agobier - fix node table declaration 13/9413/3
Gabriel Ganne [Tue, 14 Nov 2017 13:43:34 +0000 (14:43 +0100)]
bier - fix node table declaration

Need to be NULL-terminated.
Fix declarations of:
- bier_disp_table_bier_nodes
- bier_table_mpls_nodes
- bier_fmask_mpls_nodes

This was crashing during make test on aarch64 platform:
During the API call to bier_table_add_del, the crash happens during
dpo_default_get_next_node().

Change-Id: I16207ba38fc9ab65bad787878c4608740c312257
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoFix builtin http server static request free 03/9403/2
Florin Coras [Mon, 13 Nov 2017 20:07:38 +0000 (12:07 -0800)]
Fix builtin http server static request free

Change-Id: Ice61d4c6c281aa8c4e89447208e0ad047bcce639
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agovnet: af_packet_set_l4_cksum_offload device class check 12/9412/3
Jakub Grajciar [Tue, 14 Nov 2017 12:45:04 +0000 (13:45 +0100)]
vnet: af_packet_set_l4_cksum_offload device class check

Change-Id: Ie07b71977c46d2f1e030799a08cc5af0fdc397aa
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
6 years agovnet: af_packet mark l3 offload cksum 14/9414/1
Jakub Grajciar [Tue, 14 Nov 2017 13:56:05 +0000 (14:56 +0100)]
vnet: af_packet mark l3 offload cksum

Change-Id: I42ee5898e1f775692811eebab11bcfe458f1ec63
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
6 years agoVCL-LDPRELOAD: add sendfile/sendfile64 implementation. 08/9408/2
Dave Wallace [Tue, 14 Nov 2017 02:21:53 +0000 (21:21 -0500)]
VCL-LDPRELOAD: add sendfile/sendfile64 implementation.

Change-Id: If0c399269238912456d670432d7e953c9d91b9fb
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agol2-flood: fix restore vnet buffer's flags in the replication routine 06/9406/2
Steve Shin [Mon, 13 Nov 2017 23:46:35 +0000 (15:46 -0800)]
l2-flood: fix restore vnet buffer's flags in the replication routine

When BUM packets are flooded in the l2 domain, some data should be
kept and restored for recycling in the replication routine.
If l2 bridge domain has multiple interfaces mixed with normal and
vlan tagged, the vlan tag value of the vnet buffer can be changed
while flooding the replicated packets. The change is made to store
and restore the original vlan tag in the replication logic.

Change-Id: I399cf54cd2e74cb44a2be42241bdc4fba85032c5
Signed-off-by: Steve Shin <jonshin@cisco.com>
6 years agoReduce number of parallel builds 02/9402/1
Damjan Marion [Mon, 13 Nov 2017 19:09:21 +0000 (20:09 +0100)]
Reduce number of parallel builds

With recent introduction of C++ code required memory for each compiler
instance has significantly increased causing build issues.

Currently build system spins 2 compiler instances per logical CPU core.

As CPU can hardly execute more than one thread at a time, it should be
pretty safe to change that formula so it doesn't multiply number of cpu
cores by 2 and such change will signifucantly reduce amount of memory
needed.

Change-Id: Ic829fff6e45f4caf98a6d9c1c98c53ed003039ef
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agodpdk: introduce AVX512 variants of node functions 86/9386/8
Damjan Marion [Fri, 10 Nov 2017 20:55:45 +0000 (21:55 +0100)]
dpdk: introduce AVX512 variants of node functions

Change-Id: If581feca0d51d0420c971801aecdf9250c671b36
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoInstead of a min term size, use a default (VPP-1061) 92/9392/2
Chris Luke [Mon, 13 Nov 2017 03:26:37 +0000 (22:26 -0500)]
Instead of a min term size, use a default (VPP-1061)

- In the bug report, Docker was sometimes giving shells
  a 0,0 terminal size. The minimum-term-size logic meant
  that VPP assumed the terminal had 1 row. The pager
  functioned, but of course overwrote the one line with its
  own prompt.
- Instead of a minimum size, always use a default size when
  the either terminal dimension is 0.

Change-Id: Iee5a465f0e4cbb618ef2222b40a52994aefa54bf
Signed-off-by: Chris Luke <chrisy@flirble.org>
6 years agoNAT: Buufer overflow for memcpy() 96/9396/1
Ole Troan [Mon, 13 Nov 2017 07:14:07 +0000 (08:14 +0100)]
NAT: Buufer overflow for memcpy()

Change-Id: I11d1f9507d429ad8b25e9873272ede231623e622
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agosession: add handle to disconnect_session_reply api msg. 90/9390/2
Dave Wallace [Sun, 12 Nov 2017 03:41:34 +0000 (22:41 -0500)]
session: add handle to disconnect_session_reply api msg.

Change-Id: I40f80110f5224b676d60252f9721fd1bc8a10b58
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoVCL: clean up disconnect_session debug output. 91/9391/1
Dave Wallace [Sun, 12 Nov 2017 03:45:38 +0000 (22:45 -0500)]
VCL: clean up disconnect_session debug output.

- Run VPP in xfce4-terminal in VCL unit tests.

Change-Id: Iba6a870617a811261de0a54fa38cdb5109ae1d07
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoVCL/LDPRELOAD: Fix out-of-bounds access and inequality comparison coverity errors 28/9328/4
Steven [Wed, 8 Nov 2017 22:14:45 +0000 (14:14 -0800)]
VCL/LDPRELOAD: Fix out-of-bounds access and inequality comparison coverity errors

Fixed out-of-bounds access in vcom_socket.c by limiting the copy to the
size of the address field that was passed. Truncation will occur if
the address field is not big enough.

Fixed inequality comparison in vppcom.c by using the predefined macro
MAP_FAILED.

Change-Id: I9517c29ae811d08058621bd548a352b4d4f05139
Signed-off-by: Steven <sluong@cisco.com>
6 years agoACL: Add coding-style-patch-verification and indent. 89/9389/1
Jon Loeliger [Sun, 12 Nov 2017 01:50:46 +0000 (19:50 -0600)]
ACL: Add coding-style-patch-verification and indent.

Change-Id: I2397ada9760d546423e031ad45535ef8801b05e7
Signed-off-by: Jon Loeliger <jdl@netgate.com>
6 years agoACLs: Use better error return codes than "-1" everywhere. 83/9383/3
Jon Loeliger [Fri, 10 Nov 2017 19:15:12 +0000 (13:15 -0600)]
ACLs: Use better error return codes than "-1" everywhere.

Added two new errors:
    ACL_IN_USE_INBOUND
    ACL_IN_USE_OUTBOUND

Update ACL tests to expect new, precise return values.

Change-Id: I644861a18aa5b70cce5f451dd6655641160c7697
Signed-off-by: Jon Loeliger <jdl@netgate.com>
6 years agoMPLS disposition actions at the tail of unicast LSPs 77/9377/3
Neale Ranns [Tue, 31 Oct 2017 19:28:22 +0000 (12:28 -0700)]
MPLS disposition actions at the tail of unicast LSPs

Change-Id: I8c42e26152f2ed1246f91b789887bfc923418bdf
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoUpdate CPU list 88/9388/2
Damjan Marion [Sat, 11 Nov 2017 01:21:34 +0000 (02:21 +0100)]
Update CPU list

Change-Id: Ibee8973270366c38dced6eb3e8ca41784549183a
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agodpdk: optimize buffer alloc/free 58/9358/4
Damjan Marion [Thu, 9 Nov 2017 17:02:54 +0000 (18:02 +0100)]
dpdk: optimize buffer alloc/free

This reverts commit 45a588fa3efaaf52360986360ab1f6827bae3164.

Change-Id: I7e541545791f7743ee827bdec8b6fc46cbb0938f
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoHandle CPU flags from autotools project 82/9382/3
Damjan Marion [Fri, 10 Nov 2017 19:26:50 +0000 (20:26 +0100)]
Handle CPU flags from autotools project

Change-Id: Id085c1e3cbc7bf03df02755f9e35896cdb57e9e3
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoVCL: Fix accept state machine, EPOLLET logic. 87/9387/2
Dave Wallace [Fri, 10 Nov 2017 22:07:13 +0000 (17:07 -0500)]
VCL: Fix accept state machine, EPOLLET logic.

Change-Id: I909b717e5c62e91623483bdbb93d9fe4c14f0be7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoMap SVM regions at a sane offset on arm64 42/9342/2
Brian Brooks [Wed, 8 Nov 2017 03:28:42 +0000 (21:28 -0600)]
Map SVM regions at a sane offset on arm64

Mapping shared virtual memory at 0x30000000, which appears to be derived
from x86-32, turns out to be too close to the heap on arm64 systems. The
symptoms of memory corruption were random and included crashes in the
Python runtime and what appeared to be corruption of malloc's internal
mutex. Thanks to Gabriel Ganne for pointing out that disabling ASLR seemed
to mitigate the situation.

This patch maps SVM regions at an offset from the arm64 kernel constant
TASK_UNMAPPED_BASE and also assumes a 48-bit VA (for Ubuntu).

Change-Id: I642e5fe83344ab9b5c66c93e0cf1575c17251f3b
Signed-off-by: Brian Brooks <brian.brooks@arm.com>
6 years agoVCL-LDPRELOAD: Fix epoll_pwait timeout. 84/9384/2
Dave Wallace [Fri, 10 Nov 2017 20:49:32 +0000 (15:49 -0500)]
VCL-LDPRELOAD: Fix epoll_pwait timeout.

Change-Id: I5712f45c35dbdf34141c42b9d864cad1f918e5e8
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoBreak up vpe.api 75/9375/3
Neale Ranns [Fri, 10 Nov 2017 14:53:54 +0000 (06:53 -0800)]
Break up vpe.api

- makes the VAPI generated file more consumable.
- VOM build times improve.

Change-Id: I838488930bd23a0d3818adfdffdbca3eead382df
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agomake test: fix logic for CACHE_OUTPUT option 53/9253/2
Klement Sekera [Tue, 7 Nov 2017 02:19:16 +0000 (03:19 +0100)]
make test: fix logic for CACHE_OUTPUT option

Change-Id: I9938c0154c860913e27cecb18ec68f247943a2e6
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agoadd warning control macro set 66/9266/2
Gabriel Ganne [Tue, 7 Nov 2017 13:24:56 +0000 (14:24 +0100)]
add warning control macro set

Add a way to toggle on and off a warning for a specific section of code.
This supports clang and gcc, and has no effect for any other compilers.

This follows commit bfc29ba442dbb65599f29fe5aa44c6219ed0d3a8 and
provides a generic way to handle warnings in such corner cases.

To disable a warning enabled by "-Wsome-warning" for a specific code:
  WARN_OFF(some-warning)  // disable compiler warning
  ; /* some code */
  WARN_ON(some-warning)   // enable the warning again

Change-Id: I0101caa0aa775e2b905c7b3b5fef3bbdce281673
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoFurther fix to SHG handling for ARP/ICMPv6 from BVI in a BD 81/9381/2
John Lo [Fri, 10 Nov 2017 17:24:32 +0000 (12:24 -0500)]
Further fix to SHG handling for ARP/ICMPv6 from BVI in a BD

For ARP/ICMPv6 packets received from a BVI in a BD, allow flood
to all remote VTEPs via VXLAN tunnels irrespective of SHG check
for ARP request or ICMPv6 neighbor solicitation packets only.
All other packets types will flood normally as per SHG check.

Change-Id: I17b1cef9015e363fb684c2b6506ed6c4efe70bba
Signed-off-by: John Lo <loj@cisco.com>
(cherry picked from commit 5b99133cff1ff0eb9043dd8bd3648b0b3aafa47e)

6 years agoadd classify session action set-sr-policy-index 37/8637/9
Gabriel Ganne [Mon, 2 Oct 2017 09:41:24 +0000 (11:41 +0200)]
add classify session action set-sr-policy-index

This allows to use the classifier to steer source routing packets instead
of using the "sr steer" command.
This way we can steer on anything instead of only the dst ip address.

test:
 * add add_node_next function to the VppPapiProvider class.
 * add simple test scenario using the classifier to steer packets with
   dest ip addr == a7::/8 to the source routing insert node.
 * use new interface indexes (3,4) instead of (0,1) to prevent a cleanup
   conflict with the other tests which attach a specific fib to the
   interface.

The test creates interfaces sepsrated from the other tests to prevent a
conflict in the cleaning of the ip6 fib index 1 which causes vpp not to
be able to find a default route on this table.

Change-Id: Ibacb30fab3ce53f0dfe848ca6a8cdf0d111d8336
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoAllow Openssl 1.1.0 54/9354/4
Marco Varlese [Thu, 9 Nov 2017 14:16:20 +0000 (15:16 +0100)]
Allow Openssl 1.1.0

This patch addresses all the code changes required to VPP to support
openssl 1.1.0 API.
All the changes have been done so that VPP can still be built against
current openssl API whilst forward-looking to version 1.1.0.

Change-Id: I65e22c53c5decde7a15c7eb78a62951ee246b8dc
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agomake test: automatically seed random generator 57/9357/4
Klement Sekera [Thu, 9 Nov 2017 08:16:39 +0000 (09:16 +0100)]
make test: automatically seed random generator

Change-Id: I286b61d41cc2b557de3eb8801ff95c643f680acd
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agovppinfra: add 512-bit vector definitions and types 80/9380/2
Damjan Marion [Fri, 10 Nov 2017 19:20:32 +0000 (20:20 +0100)]
vppinfra: add 512-bit vector definitions and types

Change-Id: I245c034684ba8585c8f5bb5353027aba13f8a53e
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoFix bug in key calculation for IPsec tunnel interface 44/9244/2
Matthew Smith [Mon, 6 Nov 2017 18:12:13 +0000 (12:12 -0600)]
Fix bug in key calculation for IPsec tunnel interface

When IPsec tunnel interface has the inbound SA updated,
the key used to find the right interface for inbound
packets was being generated using the destination
address instead of the source.

Change-Id: Id5a6fb1511637c912b329aad65188789646a5889
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
6 years agosession: add app ns index to ns create api 78/9378/3
Florin Coras [Fri, 10 Nov 2017 17:03:54 +0000 (09:03 -0800)]
session: add app ns index to ns create api

Change-Id: I86bfe4e8b0a899cc54c9b37eeb5eec701d0baf3d
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoAdd sw_if_index to the ip_neighbor_details_t response. 25/9325/3
Jon Loeliger [Wed, 8 Nov 2017 19:07:39 +0000 (13:07 -0600)]
Add sw_if_index to the ip_neighbor_details_t response.

When a DUMP with sw_if_index == ~0 is used to get all Neighbor
entries for all interfaces, it is unclear in the details to
which interface the neighbor belongs.

Clear that up by returning the associated sw_if_index as well.

Change-Id: Ib584a57138f7faceffed64d7c1854f7af92e0e42
Signed-off-by: Jon Loeliger <jdl@netgate.com>
6 years agosession: use listener logic for proxy rules 65/9365/3
Florin Coras [Fri, 10 Nov 2017 03:30:17 +0000 (19:30 -0800)]
session: use listener logic for proxy rules

This moves session proxy logic from session rules tables to table/logic
used to manage session listeners in order to avoid overlap of
semantically different rules.

Change-Id: I463522cce91b92d942f6a2086fb14c3366b9f023
Signed-off-by: Florin Coras <fcoras@cisco.com>