vpp.git
5 years agoVXLAN-GBP: use common types on the API 63/14763/3
Neale Ranns [Tue, 11 Sep 2018 14:39:43 +0000 (07:39 -0700)]
VXLAN-GBP: use common types on the API

Change-Id: I11ec0d7048d36c30a97d437e5b0abd05f06ab0eb
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agodevice flags will set in dpdk_update_link_state. 47/14647/8
Khers [Tue, 4 Sep 2018 12:00:37 +0000 (16:30 +0430)]
device flags will set in dpdk_update_link_state.

Change-Id: If74acb0168bed2201d2a8b47bf3f860540d1574b
Signed-off-by: Khers <s3m2e1.6star@gmail.com>
5 years agoAdd patch for ixgbe x550 SFP+ to DPDK 18.08 66/14766/2
Matthew Smith [Tue, 11 Sep 2018 18:50:48 +0000 (13:50 -0500)]
Add patch for ixgbe x550 SFP+ to DPDK 18.08

Patch for ixgbe which has been used with DPDK 18.02, 18.05.
If the link flaps before link status has been successfully
collected, the MAC will be reset and the PMD will not wait
long enough for it to come back up before giving up, which
will continue happening every time an attempt is made to
check the link status.

This patch was submitted to upstream DPDK in July 2018 but
it has not been included in a release yet.

Change-Id: Ib2100b33d2a986f3cf74e42fc5538412f76f42c7
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agoAdd and enable u32x4_extend_to_u64x2_high for aarch64 NEON intrinsics. 06/14606/7
Sirshak Das [Wed, 22 Aug 2018 00:46:52 +0000 (08:46 +0800)]
Add and enable u32x4_extend_to_u64x2_high for aarch64 NEON intrinsics.

This is the high version of extendto. This function accomplishes the
same task as both shuffling and extending done by SSE intrinsics.
This enables the NEON version for buffer indexes to buffer pointer
translation.

Change-Id: I52d7bbf3d76ba69c9acb0e518ff4bc6abf3bbbd4
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Yi He <yi.he@arm.com>
Verified-by: Lijian Zhang <lijian.zhang@arm.com>
5 years agoFix create memif socket 24/13824/2
Ed Warnicke [Mon, 30 Jul 2018 20:48:32 +0000 (15:48 -0500)]
Fix create memif socket

create interface memif [id <id>] [socket-id <socket-id>] ...

Can optionally take a socket-id.

You create a socket-id with:

create memif socket [id <id>] [filename <path>]

Unfortunately, this doesn't work because "create memif" was
deprecated.  It results in:

vpp# create memif socket id 0 filename /run/vpp/test.socket
command deprecated. Please use 'create interface memif' instead.

This fixes it by clipping out the

create memif

command entirely.

Change-Id: If503758706bf758b6cb46e958200527a5856c600
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
5 years agovcl: add apis that expos fifo as buffer 68/14768/3
Florin Coras [Tue, 11 Sep 2018 23:33:36 +0000 (16:33 -0700)]
vcl: add apis that expos fifo as buffer

Change-Id: I4bd9c9f73499711e04b38d53daa5c917a4285bf5
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovcl: improve read and fifo event handling 64/14764/9
Florin Coras [Tue, 11 Sep 2018 07:10:41 +0000 (00:10 -0700)]
vcl: improve read and fifo event handling

Change-Id: Ic1c51818b8aa8dbd164e70bb3b7471868e5af6f6
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agobihash 32/64 bit shared memory interop 67/14767/1
Dave Barach [Tue, 11 Sep 2018 21:20:23 +0000 (17:20 -0400)]
bihash 32/64 bit shared memory interop

This patch makes 32/64 bit interoperable shared memory bihash tables
work regardless of where they're mapped.

Change-Id: If5b4a37ccdaa75410eba755c7d7195633de1b30b
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoindent off in ip_lookup_set_buffer_fib_index 62/14762/2
Neale Ranns [Tue, 11 Sep 2018 12:55:50 +0000 (05:55 -0700)]
indent off in ip_lookup_set_buffer_fib_index

when the name of the structure crosses a line boundary it's painful to parse...

Change-Id: I5d0606900802fb8d64a065f31f3e2a53bd8a5f40
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoL2-learn; cache prefetch fix 40/14740/4
Neale Ranns [Sun, 9 Sep 2018 08:41:02 +0000 (04:41 -0400)]
L2-learn; cache prefetch fix

the header is written (STORE) the data is only read (LOAD)

Change-Id: Ia3ac0c81224a0db736c329ed3e2e55b7417f08a0
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoGBP Endpoint Updates 09/14709/8
Neale Ranns [Wed, 5 Sep 2018 22:42:26 +0000 (15:42 -0700)]
GBP Endpoint Updates

- common types on the API
- endpoints keyed in various ways for DP lookup
- conparison functions for VPP IP address types

Change-Id: If7ec0bbc5cea71fd0983fe78987d147ec1bd7ec8
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
5 years agovat: remove the endiness for u8 59/14759/2
Mohsin Kazmi [Tue, 11 Sep 2018 11:06:42 +0000 (13:06 +0200)]
vat: remove the endiness for u8

Change-Id: I9636a4e631cacf22d3189e292888c34f615298b0
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agoVAT: plugin load errors 56/14756/3
Ole Troan [Tue, 11 Sep 2018 09:26:12 +0000 (11:26 +0200)]
VAT: plugin load errors

- NSH plugin overrode vat_api_hookup()
- Missing format function in mactime.

Change-Id: I2dcbc2522d8f525d223c2ee3bb667111d1b3b78e
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoremove libvlib from libvlibmemoryclient libs 39/14739/3
Matthew Smith [Fri, 7 Sep 2018 22:14:30 +0000 (17:14 -0500)]
remove libvlib from libvlibmemoryclient libs

On CentOS 7, having libvlibmemoryclient link libvlib causes
a SEGV when a program or library is run which links against
libvlibmemoryclient and dlopen() is called. This is because
dlopen() executes any functions with __attribute((constructor))
set. The VLIB_CLI_COMMAND macro creates CLI registration
functions that have this attribute set. So CLI registration
functions end up being run by applications which are clients
of the VPP API.

This doesn't occur on ubuntu 16.04, because ld seems to
omit shared libraries that were listed on the command line
if they are not used to resolve any symbols.

Removing the link to libvlib on vlibmemoryclient to fix this
problem results in another problem. Tests of libvcl_preload
fail when running 'make test'. This happens because
libvcl_preload calls dlopen but does not link against libdl.
When libvlibmemoryclient had libvlib linked, these errors
did not occur since libvlib links libdl. Adjusted the build
of libvcl_preload to explicitly link libdl.

Change-Id: I271ba2f9226ce1602e1f6c1525f3b093bb0345ed
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agonat: fix busy ports of each thread 42/14642/8
dongjuan [Tue, 4 Sep 2018 09:40:53 +0000 (17:40 +0800)]
nat: fix busy ports of each thread

which can create dead loop in
nat_alloc_addr_and_port_default function

Change-Id: I468c25ce0f0a0b3f881de564623dea208b2ca700
Signed-off-by: dongjuan <dong.juan1@zte.com.cn>
5 years agoReplacing vtbl NEON intrinsic with rev NEON intrinsic for byte_swap. 07/14607/6
Sirshak Das [Wed, 22 Aug 2018 04:02:04 +0000 (12:02 +0800)]
Replacing vtbl NEON intrinsic with rev NEON intrinsic for byte_swap.

Using rev16 vector intrinsic to reverse byteorder in each word
independently.

Change-Id: I071c40780baffe0bda614ec5d9dd92858f574b0d
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Brian Brooks <brian.brooks@arm.com>
Reviewed-by: Yi He <yi.he@arm.com>
Verified-by: Lijian Zhang <lijian.zhang@arm.com>
5 years agoAdd u32x4_extend_to_u64x2 for aarch64 using NEON intrinsics 08/14608/5
Sirshak Das [Wed, 22 Aug 2018 06:04:33 +0000 (14:04 +0800)]
Add u32x4_extend_to_u64x2 for aarch64 using NEON intrinsics

This is used in vlib_get_buffers_with_offset.

Change-Id: If4ff776bc97d21a22e870300b164eeb6a5ec3638
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Brian Brooks <brian.brooks@arm.com>
Reviewed-by: Yi He <yi.he@arm.com>
Verified-by: Lijian Zhang <lijian.zhang@arm.com>
5 years agoAdd horizontal add (hadd) vector intrinsic via NEON. 04/14604/5
Sirshak Das [Fri, 3 Aug 2018 16:24:51 +0000 (11:24 -0500)]
Add horizontal add (hadd) vector intrinsic via NEON.

Having the NEON equivalent of u32x4_hadd for CLIB_HAVE_VEC128

Change-Id: I210f96f7ecb9b80b4753311a68e5e09ccda7e95b
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Brian Brooks <brian.brooks@arm.com>
Reviewed-by: Yi He <yi.he@arm.com>
Verified-by: Lijian Zhang <lijian.zhang@arm.com>
5 years agovapi: support VLAs in typedefs 04/14704/4
Klement Sekera [Thu, 6 Sep 2018 17:31:36 +0000 (19:31 +0200)]
vapi: support VLAs in typedefs

Change-Id: I3af3916b68189c2174020e5ecc29a7bc45b25efa
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agodpdk: clean interface link information on admin down / stop 48/14748/3
Damjan Marion [Mon, 10 Sep 2018 11:55:46 +0000 (13:55 +0200)]
dpdk: clean interface link information on admin down / stop

Change-Id: Ie68814c8afc6cd67eb75da0b95dffa7b404cb7ba
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agodpdk-plugin: do not request SCTP offload, some cards do not support it while supporti... 50/14750/3
Andrew Yourtchenko [Mon, 10 Sep 2018 15:26:36 +0000 (15:26 +0000)]
dpdk-plugin: do not request SCTP offload, some cards do not support it while supporting TCP/UDP

The DPDK plugin sets all of the offload flags, which may cause an initialization failure
on the NICs that do not support SCTP offload. The VPP code does not deal with the SCTP
offload at the moment at all, so after discussing with Damjan, we agreed
the best approach to fix the issue is to not request the SCTP offload.

The output of "show hardware" for the NIC in question before this patch:

            Name                Idx   Link  Hardware
GigabitEthernet1/0/0               1    down  GigabitEthernet1/0/0
  Ethernet address 00:e0:67:09:90:4b
  Intel 82540EM (e1000)
    carrier down
    flags: pmd pmd-init-fail maybe-multiseg tx-offload intel-phdr-cksum
    rx queues 1, rx desc 1024, tx queues 1, tx desc 1024
    cpu socket 0
  Errors:
    rte_eth_dev_configure[port:0, errno:-22]: Unknown error -22

And the excerpt from "show log":

1970/ 1/ 1 00:00:00:739 notice     dpdk       Ethdev port_id=0 requested Tx offloads 0x1c doesn't match Tx offloads capabilities 0xf in rte_eth_dev_configure()

Change-Id: I159d65c02fc3f044441972205f1f0ac08e52050c
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agocmake VOM: j factor chosen based on number of cores 49/14749/2
Neale Ranns [Mon, 10 Sep 2018 12:42:56 +0000 (05:42 -0700)]
cmake VOM: j factor chosen based on number of cores

Change-Id: If1c27359cd93f6de6da9a93c3573997a51201959
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agonew multiversioning on ethernet input nodes 46/14746/2
Damjan Marion [Mon, 10 Sep 2018 11:09:21 +0000 (13:09 +0200)]
new multiversioning on ethernet input nodes

Change-Id: I1aa196756b3ff4969b8ff2f117778d2cd87d6dd5
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agovxlan-gbp: Add support for vxlan gbp 71/14371/15
Mohsin Kazmi [Mon, 20 Aug 2018 16:32:39 +0000 (18:32 +0200)]
vxlan-gbp: Add support for vxlan gbp

This patch implements vxlan with extension of group based
policy support.

Change-Id: I70405bf7332c02867286da8958d9652837edd3c2
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agocmake: put vpp_api_test back to packaging 44/14744/2
Damjan Marion [Mon, 10 Sep 2018 08:11:17 +0000 (10:11 +0200)]
cmake: put vpp_api_test back to packaging

Change-Id: I1ccd9bd2861d5d8e57b1bd7f9e2439147f603a58
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agosession: lock app worker mq for io events 43/14743/5
Florin Coras [Sun, 9 Sep 2018 16:40:51 +0000 (09:40 -0700)]
session: lock app worker mq for io events

Also fixes vcl client/server stats and closing procedure.

Change-Id: I7d5a274ea0a3c8ea13062bf61bf402248dfe1a19
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovlib: crash in linux_epoll_input_inline for accessing free file index [VPP-1412] 41/14741/2
Steven [Sat, 8 Sep 2018 21:06:16 +0000 (14:06 -0700)]
vlib: crash in linux_epoll_input_inline for accessing free file index [VPP-1412]

Under rare scenario, epoll may still post an event to VPP although the file
descriptor is already deleted via epoll_ctl (EPOLL_CTL_DEL) and the file
descriptor is close. VPP tries to access the free file index entry and crash.

The fix is to throw away the events which the file descriptor is already deleted.

Change-Id: Ieca3a1873aecb28630c3abc42c40341f27c2faa7
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit aec7297ba012e1fe4bbf85cdaec8e810aa476cea)

5 years agocmake: Move VOM to cmake 28/14628/11
Mohsin Kazmi [Mon, 3 Sep 2018 13:25:43 +0000 (15:25 +0200)]
cmake: Move VOM to cmake

Change-Id: I352dbb8e972e59a4caae4acd507153446470ce6b
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agoL2 BVI/FIB: Update L2 FIB table when BVI's MAC changes 02/14702/5
Neale Ranns [Thu, 6 Sep 2018 16:50:26 +0000 (09:50 -0700)]
L2 BVI/FIB: Update L2 FIB table when BVI's MAC changes

also some moving of l2 headers to reduce dependencies

Change-Id: I7a700a411a91451ef13fd65f9c90de2432b793bb
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovcl: set worker pthread stop key 37/14737/4
Florin Coras [Sat, 8 Sep 2018 00:09:35 +0000 (17:09 -0700)]
vcl: set worker pthread stop key

Otherwise the key destructor is not called on pthread_exit.

Change-Id: I11e6b9683a926eecd3f40a44aab41924ff9c3101
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovcl: register workers in order 36/14736/2
Florin Coras [Fri, 7 Sep 2018 21:32:58 +0000 (14:32 -0700)]
vcl: register workers in order

Change-Id: Ibc74e7f7587f8b17fc0dcec20cc4530b9dd4c3ca
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: detect namespace for transport apps 35/14735/4
Florin Coras [Fri, 7 Sep 2018 20:29:17 +0000 (13:29 -0700)]
session: detect namespace for transport apps

Change-Id: I770607cb213d538a29d7bd5762682981b01e9d18
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: fix reentrant listens 33/14733/2
Florin Coras [Fri, 7 Sep 2018 16:13:15 +0000 (09:13 -0700)]
session: fix reentrant listens

Change-Id: I72d400401a308012b43513179870823f6f921e44
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoupdate regex used by rpm build to find lib files 05/14705/2
Matthew Smith [Thu, 6 Sep 2018 15:59:49 +0000 (10:59 -0500)]
update regex used by rpm build to find lib files

The old expression was '*.so.*.*.*' to find shared library
files with 3 components in the version.

Building from master gives you files with 2 components in
the version (e.g. libvnet.so.18.10). So most libs were not
getting included in vpp-lib.

Change-Id: Ib89d2f5aeb2417eed1b6b851089b9d22f540a226
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agoImprove NTP / kernel time change event handling 31/14731/3
Dave Barach [Fri, 7 Sep 2018 15:12:27 +0000 (11:12 -0400)]
Improve NTP / kernel time change event handling

clib_time_verify_frequency(...) rejects clock frequency changes
greater than 1%.

vlib_worker_thread_barrier_sync_int (...) continuously checks that the
barrier hold-down timer is not unreasonably far in the future.

Change-Id: I00ecb4c20e44de5d6a9c1499fa933e3dd834d11a
Signed-off-by: Dave Barach <dbarach@cisco.com>
5 years agocmake: set packaging component for different files 19/14719/2
Damjan Marion [Fri, 7 Sep 2018 10:39:02 +0000 (12:39 +0200)]
cmake: set packaging component for different files

Change-Id: I033a1f5cdb24f77462cb5ec90a62226d93f52925
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoCavium OcteonTX: cache line fix 16/14716/3
Marco Varlese [Fri, 7 Sep 2018 09:02:26 +0000 (11:02 +0200)]
Cavium OcteonTX: cache line fix

According to Nitin Saxena ThunderX2 machine has 64B cache line whilst
all others are 128B. According to Damjan, Nitin's previous patch broke
compilation for all non-Cavium machines. This patch should make
everything happy again.

Change-Id: I8c5c2661f9f2f9c3e9b0965a277712f9a1eefa5f
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
5 years agoVPP-API: Cancel timeout thread without sending READ_TIMEOUT message. 15/14715/2
Ole Troan [Fri, 7 Sep 2018 09:01:47 +0000 (11:01 +0200)]
VPP-API: Cancel timeout thread without sending READ_TIMEOUT message.

This caused a spurious message to be sent on the API ring causing debug messages.

Change-Id: Ief4ca655ae048aad386a88fed11e8c1114378dc7
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoL2-FIB: replace bit-fields with flags 99/14699/4
Neale Ranns [Thu, 6 Sep 2018 13:22:56 +0000 (06:22 -0700)]
L2-FIB: replace bit-fields with flags

Change-Id: Ic31da442a0e0477569d53b4a72627bbb25e93365
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoIP route update fix when multipath and drop set 14/14714/2
Neale Ranns [Fri, 7 Sep 2018 08:48:54 +0000 (01:48 -0700)]
IP route update fix when multipath and drop set

Change-Id: I9cec7486cb6e3c5261d74d2b15a4d19469285a30
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoPAPI: Unpack embedded types with variable length arrays. 07/14707/2
Ole Troan [Thu, 6 Sep 2018 20:58:05 +0000 (22:58 +0200)]
PAPI: Unpack embedded types with variable length arrays.

Change-Id: Ic952ed5b837ac8409fd95e2b5cb92eb028ba0c40
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agopost move-to-cmake cleanup 62/14662/3
Damjan Marion [Tue, 4 Sep 2018 10:36:11 +0000 (12:36 +0200)]
post move-to-cmake cleanup

Change-Id: I87b8f054bbb54895429578dfe565e72331beb5b2
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoRemove qsort.c from vppinfra 11/14711/2
Damjan Marion [Fri, 7 Sep 2018 08:26:04 +0000 (10:26 +0200)]
Remove qsort.c from vppinfra

Change-Id: Ifcc2717efd242ae2016563d6f3e5cd57fe161e00
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agovcl: refactor test client to support workers 59/14659/10
Florin Coras [Wed, 5 Sep 2018 05:07:27 +0000 (22:07 -0700)]
vcl: refactor test client to support workers

Change-Id: I7fcfddc2bc7d9a64f8aa0d57ba5d11d325a15ce1
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoAdd flush flag on del as command 02/14402/5
Hongjun Ni [Wed, 22 Aug 2018 12:21:19 +0000 (20:21 +0800)]
Add flush flag on del as command

This patch depends on https://gerrit.fd.io/r/#/c/13260

Change-Id: If94968342935ebd24cf4ebed238e6a27d94959b7
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
5 years agogeneve: fix variable initial value 56/14656/2
Zhiyong Yang [Wed, 5 Sep 2018 01:43:57 +0000 (21:43 -0400)]
geneve: fix variable initial value

It is not good enough to initialize sw_if_index0 = 0,
sw_if_index1 = 0, as it maybe causes the first two
incoming packets to miss necessary computation.

Change-Id: Ifcab408d9514820e0daa280f4c73956db13b59be
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
5 years agodocs: what is vpp and features and performance 94/14694/2
Scott Keeler [Thu, 6 Sep 2018 11:52:59 +0000 (07:52 -0400)]
docs: what is vpp and features and performance

Change-Id: I5a9ae39ed0429b3de001b5109268d577a281cd46
Signed-off-by: Scott Keeler <skeeler@cisco.com>
5 years agolibmemif: slave connecting bugfix 64/14664/4
Jakub Grajciar [Wed, 5 Sep 2018 10:11:35 +0000 (12:11 +0200)]
libmemif: slave connecting bugfix

in case first connecting slave fails continue connecting others
add disconnect string to memif details

Change-Id: I9d83db4724de1cab60786dca566e004016cf1e59
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
5 years agocmake: Fix compilation for OCTEONTx 01/14701/2
Nitin Saxena [Thu, 6 Sep 2018 13:45:41 +0000 (13:45 +0000)]
cmake: Fix compilation for OCTEONTx

Change-Id: I7b7183b4603076e5afac096545d820091ee7c495
Signed-off-by: Nitin Saxena <nitin.saxena@cavium.com>
5 years agoSilence warning over ignored return value (CID 187932) 06/14706/2
Chris Luke [Thu, 6 Sep 2018 19:37:28 +0000 (15:37 -0400)]
Silence warning over ignored return value (CID 187932)

- We deliberately ignore the return value.

Change-Id: If467911b019e7336cf9dc6d4c95c2cd53a5af33f
Signed-off-by: Chris Luke <chrisy@flirble.org>
5 years agovxlan: improve encap performance 60/14660/2
Zhiyong Yang [Wed, 5 Sep 2018 02:45:17 +0000 (22:45 -0400)]
vxlan: improve encap performance

1. For vxlan, prefetching one cacheline is enough.
2. Reduce vlib_increment_combined_counter functtion calling
if possible.

Change-Id: If3a72ac40c8988caaf0d5915b695f86d799f15a9
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
5 years agoeth_mac_equal takes const pointers 00/14700/2
Neale Ranns [Thu, 6 Sep 2018 12:49:55 +0000 (08:49 -0400)]
eth_mac_equal takes const pointers

Change-Id: I5a47d30d783dcf000e3ca2bcdc46e7d93654cc37
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovxlan_gpe: optimize encap performance 44/14644/4
Zhiyong Yang [Tue, 4 Sep 2018 10:33:18 +0000 (06:33 -0400)]
vxlan_gpe: optimize encap performance

The patch can reduce 13 cycles per packet for the graph node
vxlan-gpe-encap and increases 5% or so vxlan_gpe encap throughput
on Haswell platform for the best case (All pkts have the same
sw_if_index).

Change-Id: I9c70fd3e0f2f0a9d922cf64970d0b0d51b772024
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
5 years agoDOC ONLY: cmake / ninja build system doc 52/14652/2
Dave Barach [Tue, 4 Sep 2018 20:55:53 +0000 (16:55 -0400)]
DOC ONLY: cmake / ninja build system doc

Change-Id: I69cdcf3f0940f8a5f60203034688a0c63446f65c
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoFix Telnet option processing issue 84/14684/2
Chris Luke [Thu, 6 Sep 2018 01:00:52 +0000 (21:00 -0400)]
Fix Telnet option processing issue

- A check for the length of the buffer should have used the provided
  'len' variable, not 'vec_len' since the buffer pointer may be
  within a vector, but not the start of one. 'vec_len' reports 0
  in that case, causing premature exit from the options processing
  loop and a wait for further input before it checks the next option.
- Also add TCP_NODELAY to CLI sockets to disable Nagle on TCP
  connections for a possible improvement in interactive response.

Change-Id: Ie1f53c003ca7d66bed51f437d298183215bad38c
Signed-off-by: Chris Luke <chrisy@flirble.org>
5 years agoacl-plugin: VPP-1400: fix crash when removing a session entry 92/14692/1
Andrew Yourtchenko [Wed, 5 Sep 2018 10:30:35 +0000 (12:30 +0200)]
acl-plugin: VPP-1400: fix crash when removing a session entry

bihash deletion operation may in turn do underlying memory operations,
so ensure it is using the correct (private) heap.

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

5 years agovcl/session/svm: fix coverity warnings 57/14657/3
Florin Coras [Wed, 5 Sep 2018 02:47:52 +0000 (19:47 -0700)]
vcl/session/svm: fix coverity warnings

Change-Id: I27532b3ab244dc95955e836a42b229a6e4e32818
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: support multiple worker binds 03/14603/15
Florin Coras [Fri, 31 Aug 2018 21:31:41 +0000 (14:31 -0700)]
session: support multiple worker binds

Allows app workers to listen on the same session endpoint. Incoming
connects are spread across the workers in a round-robin fashion

Change-Id: Ib5f5817230d9abc6127a85cdbdcad70d980c0f7f
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoEnum type on the API for QoS sources 80/14680/3
Neale Ranns [Wed, 5 Sep 2018 16:36:05 +0000 (09:36 -0700)]
Enum type on the API for QoS sources

Change-Id: I877541ede6e26581c659821502f23b777903b82f
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoNAT: fix maximum out of order fragments (VPP-1399) 72/14672/2
Matus Fabian [Wed, 5 Sep 2018 13:01:55 +0000 (06:01 -0700)]
NAT: fix maximum out of order fragments (VPP-1399)

All fragments should be dropped when max_frag is 1 and 2 non-initial fragments are received before first fragment.

Change-Id: Id0c968f45629698e347e8226c5926f27b48b82d6
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoNAT: test cleanup (VPP-1252) 61/14661/2
Matus Fabian [Wed, 5 Sep 2018 06:45:13 +0000 (23:45 -0700)]
NAT: test cleanup (VPP-1252)

"assertEqual(len(capture), <expected packet count>)" no more needed since it is done by get_capture

Change-Id: I1cbe223cf55198cec946b8ea0883f2a4fa632005
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoFix test summary and retries 79/14679/2
juraj.linkes [Wed, 5 Sep 2018 16:13:45 +0000 (18:13 +0200)]
Fix test summary and retries

There was an issue when tests crashed and weren't properly retried.

Change-Id: Id5ef828ecc9a8dc0f08c50183721db06e162e6c3
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
5 years agoSTATS: Update Prometheus port 70/14670/3
Ole Troan [Wed, 5 Sep 2018 12:16:54 +0000 (14:16 +0200)]
STATS: Update Prometheus port

Update temporary port allocation with fixed allocated from:
https://github.com/prometheus/prometheus/wiki/Default-port-allocations

Change-Id: I99a7e069fb95d00884458aeacaba06e4713fbb76
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoAdd missing API MAC address encode implementation 73/14673/1
Neale Ranns [Wed, 5 Sep 2018 12:56:29 +0000 (08:56 -0400)]
Add missing API MAC address encode implementation

Change-Id: I4cb073f23a7f24f0fc16f2eda8b869dbe657f71b
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoacl-plugin: VPP-1400: VPP may crash when performing ACL modifications on applied... 34/14634/3
Andrew Yourtchenko [Wed, 29 Aug 2018 15:23:03 +0000 (17:23 +0200)]
acl-plugin: VPP-1400: VPP may crash when performing ACL modifications on applied ACLs

The partition_split() did not increment the refcount when using a mask type index,
thus subsequent modifications potentially resulted in double frees and in the best case
immediate crash, in the worst case delayed crash in another place.

Introduce the lock_mask_type_index() and call it, move the mask type index
related functions closer to the top of the file.

Make the assignment of the new mask type indices
for the tuplemerge case to use the assign_mask_type_index().

Keep some debugs in case we need to investigate this further at some point.

Change-Id: Iae370f5cd92e1fe1442480db34656a8a3442dbc0
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 1edc406da3d4f6e63de2f278360b5753f55c00df)

5 years agoNAT: add support for configurable port range (VPP-1346) 43/14643/2
Matus Fabian [Tue, 4 Sep 2018 10:55:45 +0000 (03:55 -0700)]
NAT: add support for configurable port range (VPP-1346)

Change-Id: I6882b6daa05db866fe6e78a62b380ec331507f74
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoAdd Load Balancer plugin Maintainers 36/14636/3
Hongjun Ni [Tue, 4 Sep 2018 09:45:06 +0000 (17:45 +0800)]
Add Load Balancer plugin Maintainers

Change-Id: Ic6da1584ad8e03f2142fe10a8348fb0278c5060b
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
5 years agoavf: fix random rss key 41/14641/2
Jakub Grajciar [Tue, 4 Sep 2018 09:20:23 +0000 (11:20 +0200)]
avf: fix random rss key

Change-Id: I622cdb969ea489d333888b90c15ab57c1820e2db
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
5 years agol2_output:skip processing if no features are enabled 14/14614/3
Eyal Bari [Sun, 2 Sep 2018 14:08:22 +0000 (17:08 +0300)]
l2_output:skip processing if no features are enabled

Change-Id: I7fcc082376b451c6179ec2ef58f98c931adfed27
Signed-off-by: Eyal Bari <ebari@cisco.com>
5 years agoAdd JVPP for NSH plugin 49/14649/2
Hongjun Ni [Tue, 4 Sep 2018 22:46:20 +0000 (06:46 +0800)]
Add JVPP for NSH plugin

Change-Id: Ie904cbaf571165021e49c6c1052cee3205cde3ae
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
5 years agovcl: refactor test apps to use multiple workers 85/14585/8
Florin Coras [Fri, 31 Aug 2018 01:49:13 +0000 (18:49 -0700)]
vcl: refactor test apps to use multiple workers

Change-Id: Ia931377004c2996826a5f504d16c3c934ca3b70d
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoFixed showing negative count in stats show CLI 37/14637/2
Naoyuki Mori [Tue, 4 Sep 2018 01:36:54 +0000 (10:36 +0900)]
Fixed showing negative count in stats show CLI

Some counters (bytes, pkts) are formatted as signed instead of unsigned
in "show hardware-interfaces" and "show lb".
These stats counters are declared as u64.

Change-Id: Id1b588188bff4e36402beb8d07f779e9a5193956
Signed-off-by: Naoyuki Mori <naoyuki.mori@intel.com>
5 years agoadd option to allow user to set ciphers 90/14490/2
Ping Yu [Mon, 27 Aug 2018 13:07:13 +0000 (09:07 -0400)]
add option to allow user to set ciphers

Orignal code hard code TLS ciphers, and this patch allows user to
set ciphers via CLI, so that user can perform the TLS testing
without re-building the code.

Change-Id: I0d497f6d906af25bc7a33cee5747f9a1d63e0683
Signed-off-by: Ping Yu <ping.yu@intel.com>
5 years agoDeprecate old buffer replication scheme 27/14627/4
Damjan Marion [Mon, 3 Sep 2018 13:41:45 +0000 (15:41 +0200)]
Deprecate old buffer replication scheme

Change-Id: I1f54b994425c58776e1445c8d9fe142e7a644d3d
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoacl-plugin: fix the memory leak with colliding entries storage 33/14633/2
Andrew Yourtchenko [Tue, 28 Aug 2018 20:37:47 +0000 (22:37 +0200)]
acl-plugin: fix the memory leak with colliding entries storage

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

5 years agoCompile vppinfra on macOS 18/14618/3
Damjan Marion [Mon, 3 Sep 2018 10:30:36 +0000 (12:30 +0200)]
Compile vppinfra on macOS

Add missing calls to clib_mem_init to vppinfra test codes.

Change-Id: I53ffc6fc287d1a378065bb86c18b6e995ecdb775
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoNAT44: client-IP based session affinity for load-balancing (VPP-1297) 21/14621/2
Matus Fabian [Mon, 3 Sep 2018 12:02:23 +0000 (05:02 -0700)]
NAT44: client-IP based session affinity for load-balancing (VPP-1297)

Enable client-IP based session affinity per LB NAT rule with specific timeout.

Change-Id: I9aade152e330218d21dfda99cc5e984d769ab806
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agovapi: init clib mem heap on connect if needed 19/14619/1
Klement Sekera [Mon, 3 Sep 2018 10:35:27 +0000 (12:35 +0200)]
vapi: init clib mem heap on connect if needed

Change-Id: Id45a3a37dd77771289622314406dccf50b64f04d
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agoSTATS: Python binding to access VPP statistics and counters. 84/14584/4
Ole Troan [Thu, 30 Aug 2018 22:29:48 +0000 (00:29 +0200)]
STATS: Python binding to access VPP statistics and counters.

from vpp_papi.vpp_stats import VPPStats
s = VPPStats(socketname='/var/run/stats.sock')
c = s.ls('/if/rx')
counters = s.dump(c)
print(s.set_error_str())

Change-Id: I203ebe60b0c9ee5742aadc737c0f29051757959d
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoSwitch to cmake 59/14459/14
Damjan Marion [Fri, 24 Aug 2018 11:37:45 +0000 (13:37 +0200)]
Switch to cmake

Change-Id: I982b69390c55b5ffbd744f355efc0aaf425b360c
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agocmake: cache line size detection 13/14613/1
Damjan Marion [Sun, 2 Sep 2018 09:16:00 +0000 (11:16 +0200)]
cmake: cache line size detection

Change-Id: I9a0df8d15deefdf31cfead56c96433cd7220b802
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agocmake: respect TERM 12/14612/1
Damjan Marion [Sat, 1 Sep 2018 13:17:02 +0000 (15:17 +0200)]
cmake: respect TERM

Change-Id: I8e2dd1902f57ee173dd266743b46f5602548a4c1
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agocmake: pass linker flags, use devtoolset on centos 7 11/14611/1
Damjan Marion [Sat, 1 Sep 2018 18:06:10 +0000 (20:06 +0200)]
cmake: pass linker flags, use devtoolset on centos 7

Change-Id: I8439fd070dc47a080e2df859c9f9ac67d8a08f04
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agocmake: detect vpp version, set soversion, pretty config print 02/14602/1
Damjan Marion [Fri, 31 Aug 2018 15:38:57 +0000 (17:38 +0200)]
cmake: detect vpp version, set soversion, pretty config print

Change-Id: I5d0777421debe6c3e4b93d62ad6790912063a9e6
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoSupport lb on both vip and per-port-vip case 60/13260/23
Hongjun Ni [Thu, 28 Jun 2018 12:14:19 +0000 (20:14 +0800)]
Support lb on both vip and per-port-vip case

Previously, a service is specified by vip.
This patch extend that a service is specified
by both vip and per-port-vip cases.

Change-Id: Icbfd1f972c6bafde7d85c6abb498576bd9ba250d
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
5 years agoIPx address query functions take a const pointer 95/14595/2
Neale Ranns [Fri, 31 Aug 2018 10:30:16 +0000 (06:30 -0400)]
IPx address query functions take a const pointer

Change-Id: I45b0c48e89cb1ea556c795f6163a8346f2e2e0da
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoFix typo 00/14600/1
Dave Barach [Fri, 31 Aug 2018 13:32:34 +0000 (09:32 -0400)]
Fix typo

Change-Id: Iadf4ce27f56400b669b80f2e718b6d4330c949a5
Signed-off-by: Dave Barach <dbarach@cisco.com>
5 years agoDocs: update MPLS FIB section with text from the wiki 90/14590/2
Neale Ranns [Fri, 31 Aug 2018 07:45:19 +0000 (00:45 -0700)]
Docs: update MPLS FIB section with text from the wiki

Change-Id: I9d903db89facc916fb5dd23d564417230e1c76e0
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoAdd INFO.yaml file 69/14269/4
Vanessa Rene Valderrama [Wed, 15 Aug 2018 20:16:23 +0000 (15:16 -0500)]
Add INFO.yaml file

Add INFO.yaml to list:
- Project description
- Properties
- Issue Tracking
- Contacts
- PTL information
- Meeting information
- Committer information

Change-Id: Ifed54c1cc648dc3dc7e276c63d87144812197505
Signed-off-by: Vanessa Rene Valderrama <vvalderrama@linuxfoundation.org>
5 years agoFIB path CLI fix for lookup-table IDs 89/14589/2
Neale Ranns [Fri, 31 Aug 2018 07:11:19 +0000 (00:11 -0700)]
FIB path CLI fix for lookup-table IDs

Change-Id: I8c127d472e0010036061a8a076599d1ff85abab5
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoIntroduce a mac_address_t on the API and in VPP 50/14550/4
Neale Ranns [Wed, 29 Aug 2018 13:37:18 +0000 (06:37 -0700)]
Introduce a mac_address_t on the API and in VPP

Change-Id: I05d6c2cb5d34de469eb050e4ee10dc6b954c986d
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
5 years agoVPP-1407: Fix the wrong length of udp header for buffer chains 71/14571/4
shubing guo [Thu, 30 Aug 2018 03:09:49 +0000 (11:09 +0800)]
VPP-1407: Fix the wrong length of udp header for buffer chains

Change-Id: I1669faeac15dfb69e335a1e96b6da118dc1892c1
Signed-off-by: shubing guo <guo.shubing@zte.com.cn>
5 years agoVPP-1408: Fix bug that wrong tx fifo drop in buffer chains flow of dgram mode 72/14572/7
shubing guo [Thu, 30 Aug 2018 05:29:49 +0000 (13:29 +0800)]
VPP-1408: Fix bug that wrong tx fifo drop in buffer chains flow of dgram mode

-- Not drop session dgram hdr when to drop processed udp message from tx fifo

Change-Id: Id5ce5780817041bca05011f7b9b53e97a6d78da4
Signed-off-by: shubing guo <guo.shubing@zte.com.cn>
5 years agovcl: add support for multi-worker apps 38/14538/19
Florin Coras [Tue, 28 Aug 2018 18:32:04 +0000 (11:32 -0700)]
vcl: add support for multi-worker apps

Add basic support for app registration of multiple workers. LDP does not
work with multi-worker apps.

Change-Id: I3fc421a2a591a077b275827463f874b261415a63
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agocmake: add missing header 83/14583/1
Damjan Marion [Thu, 30 Aug 2018 20:56:59 +0000 (22:56 +0200)]
cmake: add missing header

Change-Id: Ie1aa5c34fa3a4f9940741b8ae55b93e021ced404
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agocmake: fix vppapigen install permissons 82/14582/1
Damjan Marion [Thu, 30 Aug 2018 20:56:10 +0000 (22:56 +0200)]
cmake: fix vppapigen install permissons

Change-Id: I0f49842d3e6690d0965bd310321495a2dc4c2350
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agodocs: Add features by release section 80/14580/2
Scitt Keeler [Thu, 30 Aug 2018 17:09:34 +0000 (13:09 -0400)]
docs: Add features by release section

Change-Id: Ibcae8c8ecdf8a3c2d7bcf96bf7cd5b741e2fad22
Signed-off-by: Scitt Keeler <skeeler@cisco.com>
5 years agoCrude stat segment lock recovery 49/14549/3
Dave Barach [Wed, 29 Aug 2018 12:50:40 +0000 (08:50 -0400)]
Crude stat segment lock recovery

Make sure that vpp_get_stats main heap does not address-collide with
the stats segment, which lands "somewhere" in the vpp address space.

Add mising MAP_ANONYMOUS flag in clib_mem_vm_map

Change-Id: I8a671d174eefd8dd24771ad2ed9f1250e2c7a9f8
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agocmake: missing dependencies 81/14581/1
Damjan Marion [Thu, 30 Aug 2018 18:27:32 +0000 (20:27 +0200)]
cmake: missing dependencies

Change-Id: Iae03deb10d437286989dd3d45f8cc9690d463100
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoRefactor the ARP throttle into a common type so it can be reused 54/14554/4
Neale Ranns [Wed, 29 Aug 2018 17:23:58 +0000 (10:23 -0700)]
Refactor the ARP throttle into a common type so it can be reused

Change-Id: Ic7f7af983d5b6d756748023aa0c650f53e9285cf
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>