vpp.git
5 years agoAPI sw_interface_dump: Dump all if index is zero 06/19106/2
Vratko Polak [Tue, 23 Apr 2019 10:26:44 +0000 (12:26 +0200)]
API sw_interface_dump: Dump all if index is zero

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

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

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

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

Remove the duplicated code and unnecessary operations.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Update various python dependencies package names.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Remove duplicate error check

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

This reverts commit 5d0d5494db58422eb528c0f8b39a86ea966505e9.

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

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

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

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

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

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

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

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

Change-Id: Ia8cea13f7b937294e6a080a55fb2ceff30063acf
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agocrypto-ipsecmb: enable GCM 43/18943/2
Neale Ranns [Tue, 16 Apr 2019 21:39:37 +0000 (21:39 +0000)]
crypto-ipsecmb: enable GCM

Change-Id: I670d7899bcc63a419daf481167dc445a6386cce8
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoDefault nums of RX/TX descriptors changed to 512 for 2M page on DVN 05/16805/9
Zhiyong Yang [Mon, 14 Jan 2019 08:51:06 +0000 (03:51 -0500)]
Default nums of RX/TX descriptors changed to 512 for 2M page on DVN

As DVN has fewer DTLB entries supported for 2M page, default numbers of
RX/TX descriptors are changed to 512 if nums of RX/TX descriptors are not
specified by VPP users.

Change-Id: I076493b802b15d12750a5b49d1554da4d19ad460
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
5 years agoDuplicate pcap tx trace fix 44/18944/2
Neale Ranns [Tue, 16 Apr 2019 22:02:46 +0000 (15:02 -0700)]
Duplicate pcap tx trace fix

Change-Id: I0657cb44f58942ef281046dd3841bda669b10589
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoADJ: crash in format/show (VPP-1648) 51/18951/1
Neale Ranns [Wed, 17 Apr 2019 02:17:05 +0000 (19:17 -0700)]
ADJ: crash in format/show (VPP-1648)

Change-Id: I26279c19b879e59c68fda31426fe42dae62a858d
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoIPSEC: SA format; don't print keys when there's no algo 47/18947/1
Neale Ranns [Tue, 16 Apr 2019 23:21:57 +0000 (16:21 -0700)]
IPSEC: SA format; don't print keys when there's no algo

Change-Id: I4d1d22cb24564896264e77c1810804ea3f54cb37
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovppinfra: more AVX2 and AVX512 inlines 39/18939/2
Damjan Marion [Tue, 16 Apr 2019 16:41:01 +0000 (18:41 +0200)]
vppinfra: more AVX2 and AVX512 inlines

Change-Id: I81bd967a580ae3b476dfd731e9933a9898568a91
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agodlmalloc: honor 8 byte alignment requests 40/18940/2
Florin Coras [Tue, 16 Apr 2019 18:27:54 +0000 (11:27 -0700)]
dlmalloc: honor 8 byte alignment requests

Change-Id: Ie504603c2e42cae3ad592952b2b166919420e5f7
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agogbp: Add support for allow sclass/dclass 1 35/18935/2
Mohsin Kazmi [Tue, 16 Apr 2019 13:15:07 +0000 (15:15 +0200)]
gbp: Add support for allow sclass/dclass 1

Change-Id: I51f61a399e3eace93011f9431cbd7968e9be627c
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agoStatic http server 25/18825/15
Dave Barach [Thu, 11 Apr 2019 21:06:21 +0000 (17:06 -0400)]
Static http server

Good enough to serve the vpp sphinx and doxygen docs. Knows about
html, css, and javascript files.

Change-Id: Ib18c19f07f35f91ba935ea26ed7be406dacf2205
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agosvm_fifo rework to avoid contention on cursize 23/18223/13
Sirshak Das [Tue, 5 Feb 2019 07:33:33 +0000 (01:33 -0600)]
svm_fifo rework to avoid contention on cursize

Problems Addressed:
- Contention of cursize by producer and consumer.
- Reduce the no of modulo operations.

Changes:
- Synchronization between producer and consumer changed from cursize
  to head and tail indexes
  Implications: reduces the usable size of fifo by 1.
- Using weaker memory ordering C++11 atomics to access head and tail
  based on producer and consumer role.
- Head and tail indexes are unsigned 32 bit integers. Additions and
  subtraction on them are implicit 32 bit Modulo operation.
- Adding weaker memory ordering variants of max_enq, max_deq, is_empty
  and is_full Using them appropriately in all places.

Perfomance improvement (iperf3 via Hoststack):

iperf3 Server: Marvell ThunderX2(AArch64) - iperf3 Client: Skylake(x86)
   ~6%(256 rxd/txd) - ~11%(2048 rxd/txd)

Change-Id: I1d484e000e437430fdd5a819657d1c6b62443018
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
5 years agoQUIC: Initial multi stream support 61/18761/3
Aloys Augustin [Tue, 9 Apr 2019 09:36:40 +0000 (11:36 +0200)]
QUIC: Initial multi stream support

To connect a stream, apps should call connect while passing the id of the QUIC
connection in the new transport_opts field in session_endpoint_cfg_t.
Apps are notified of new streams with their accept callback, which is called
each time a peer opens a stream.

Change-Id: I0f82ec344db58008d54641553eddec2973768435
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
5 years agoAllow sessions to be allocated in app's RX callbacks 60/18760/3
Aloys Augustin [Tue, 9 Apr 2019 09:25:56 +0000 (11:25 +0200)]
Allow sessions to be allocated in app's RX callbacks

This enables applications to create sessions in their RX callbacks, which can
invalidate the session pointer. This is required for the QUIC protocol
implementation.

Change-Id: I6072c1c368fd9d17a960ec086a788089dd6f54b4
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
5 years agostats: Add name vectors to Python client 74/18874/4
Ole Troan [Mon, 15 Apr 2019 06:53:46 +0000 (08:53 +0200)]
stats: Add name vectors to Python client

Change-Id: Ic62dfa0bf3e082a0b999026830c64a9c543da586
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoIPSEC: support GCM in ESP 34/18834/8
Neale Ranns [Thu, 11 Apr 2019 15:14:07 +0000 (15:14 +0000)]
IPSEC: support GCM in ESP

Change-Id: Id2ddb77b4ec3dd543d6e638bc882923f2bac011d
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoAdd direct packets to specific flow action in dpdk flow 12/18912/3
Simon Zhang [Tue, 16 Apr 2019 14:00:15 +0000 (22:00 +0800)]
Add direct packets to specific flow action in dpdk flow

Change-Id: I48cd8052f9509efdf13f64ab279edb66a2d4a0a9
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
5 years agoVPP-1576: nsim-plugin coverity issues 22/18922/2
Dave Barach [Tue, 16 Apr 2019 11:28:25 +0000 (07:28 -0400)]
VPP-1576: nsim-plugin coverity issues

Change-Id: I832e780b00955e01871874544f3d0afc553b75f7
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agovppinfra: add basic rbtree 98/18898/15
Florin Coras [Tue, 16 Apr 2019 00:28:51 +0000 (17:28 -0700)]
vppinfra: add basic rbtree

Algorithm from CLRS, Introduction to Algorithms 3rd Edition, Ch. 13

Change-Id: I5bc2c507593770939cd5584f21dacf36ebd2b4c1
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoflow: add rte_flow check before creating by rte_flow_validate 80/18780/3
Simon Zhang [Wed, 10 Apr 2019 12:05:46 +0000 (20:05 +0800)]
flow: add rte_flow check before creating by rte_flow_validate

Change-Id: Idfcf1644952d647c6e1b61216d9b365d58b77814
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
5 years agoIPSEC-GRE: return correct API code 02/18902/2
Neale Ranns [Tue, 16 Apr 2019 06:13:29 +0000 (23:13 -0700)]
IPSEC-GRE: return correct API code

Change-Id: I4f72989885ecfc6a0b27553194c6611fd71f7e5b
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovpp-1647: fix typo in pcap_trace_command_internal 23/18923/1
Dave Barach [Tue, 16 Apr 2019 12:07:06 +0000 (08:07 -0400)]
vpp-1647: fix typo in pcap_trace_command_internal

pcap rx trace on max 100 intfc tap0
then
pcap rx trace status

Displays "local0" instead of "tap0" due to a typo in
pcap_trace_command_internal(...).

Change-Id: Id2de6a24174aac24d9051b7404f01edc806a6573
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoAPI: Handle pthread cond signal case where signal is missed. 01/18801/3
Ole Troan [Wed, 10 Apr 2019 17:32:02 +0000 (19:32 +0200)]
API: Handle pthread cond signal case where signal is missed.

Especially on a single core setup the RX thread could signal the main thread
that it was done, before main thread listened to the signal.

Change-Id: Ib70337b21bcf77787ce4ee0aa9cf80c6da2215af
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agovppinfra: add SHA-2 family of hash algorithms (including HMAC) 54/18854/7
Damjan Marion [Fri, 12 Apr 2019 22:13:34 +0000 (00:13 +0200)]
vppinfra: add SHA-2 family of hash algorithms (including HMAC)

Change-Id: I54d6fb1a2721b548620eb66cea254d0103deca32
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agotap: fix the crash 82/18882/2
Mohsin Kazmi [Mon, 15 Apr 2019 11:17:55 +0000 (13:17 +0200)]
tap: fix the crash

Crash will happen when someone will try to setup a tap interface
in host namespace without providing the host side of tap interface
custom name. This patch fixes the problem by using the default name
in this case.

Change-Id: Ic1eaea5abd01bc6c766d0e0fcacae29ab7a7ec45
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agocrypto: fix coverity warnings 72/18872/3
Filip Tehlar [Mon, 15 Apr 2019 08:48:10 +0000 (08:48 +0000)]
crypto: fix coverity warnings

Change-Id: Id9dfd912517c44cf812953bd05ac04c9e172a2b7
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agocrypto: openssl - IV len not passed by caller. Callee knows from algo type 62/18862/3
Neale Ranns [Sun, 14 Apr 2019 20:43:51 +0000 (20:43 +0000)]
crypto: openssl - IV len not passed by caller. Callee knows from algo type

Change-Id: Ib80e9bfb19a79e1adc79aef90371a15954daa993
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agocrypto-openssl-gcm: account for failed decrypts 63/18863/2
Neale Ranns [Sun, 14 Apr 2019 20:48:55 +0000 (20:48 +0000)]
crypto-openssl-gcm: account for failed decrypts

Change-Id: I749c5a9d58128fd6d0fb8284e56b8f89cf91c609
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoIPSEC: crypto overflow 61/18861/2
Neale Ranns [Sat, 13 Apr 2019 15:30:21 +0000 (15:30 +0000)]
IPSEC: crypto overflow

decrypting too many bytes.

Change-Id: I4663e70271d9734eda7f9a127967b9224c0e5efc
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoip4: don't format upper layer if it's a fragment 34/18134/2
faicker.mo [Wed, 14 Nov 2018 08:51:34 +0000 (16:51 +0800)]
ip4: don't format upper layer if it's a fragment

Parsing ipv4 upper layer is not meaningful
if it's a fragment packet except the first.

Change-Id: I442fb7ec01244fde8c4f7656a8ba633d0aa0f97e
Signed-off-by: Faicker Mo <faicker.mo@ucloud.cn>
5 years agocrypto: add support for AES-CTR cipher 58/18858/2
fituldo [Fri, 12 Apr 2019 12:26:43 +0000 (12:26 +0000)]
crypto: add support for AES-CTR cipher

Change-Id: I7d84bab7768421ed37813702c0413e52167f41ab
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agovppinfra: AVX-512 transpose (u32x16 and u64x8) 46/18846/2
Damjan Marion [Fri, 12 Apr 2019 15:44:35 +0000 (17:44 +0200)]
vppinfra: AVX-512 transpose (u32x16 and u64x8)

Change-Id: Iefe9d20799a6f5f271aa5b675ea2b19ac3efbe1e
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoTrivial: Update doxygen comments. 16/18816/2
Paul Vinciguerra [Thu, 11 Apr 2019 13:32:19 +0000 (06:32 -0700)]
Trivial: Update doxygen comments.

Change-Id: I2f7f3898b913c9b1a37b1c8c84a8df3799c49c5d
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agosession: drop lock on segment allocation error 49/18849/1
Florin Coras [Fri, 12 Apr 2019 20:04:16 +0000 (13:04 -0700)]
session: drop lock on segment allocation error

Change-Id: Ib346570daa3e40f4f53100a05e9355ce60d533a4
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agostats: Off by one error in stats directory vector. 30/18830/1
Ole Troan [Fri, 12 Apr 2019 08:01:17 +0000 (10:01 +0200)]
stats: Off by one error in stats directory vector.

Change-Id: Ic75af8bbd52c8a08e34ff2a847f60be5479b814b
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoAdding check to ensure acl_id matches existing acl_id in abf_policy_update 24/18824/2
Parixit Gokhale [Thu, 11 Apr 2019 21:00:52 +0000 (14:00 -0700)]
Adding check to ensure acl_id matches existing acl_id in abf_policy_update

Change-Id: Ia86387ca5a52d6b4b9e5aff0c01c92df13a5dde5
Signed-off-by: Parixit Gokhale <pgokhale@cisco.com>
5 years agoIPSEC: ESP with ESN tests and fixes 99/18799/3
Neale Ranns [Wed, 10 Apr 2019 17:24:29 +0000 (17:24 +0000)]
IPSEC: ESP with ESN tests and fixes

Change-Id: Ie42b26e6d5cdb7b23f370ea2933c65079e8d1089
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agocrypto: add more AES-GCM test cases 17/18817/3
Filip Tehlar [Thu, 11 Apr 2019 09:55:56 +0000 (09:55 +0000)]
crypto: add more AES-GCM test cases

Change-Id: Ibb3e2f3ba5f31482fc2f0dce53d68f8476608f4b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoIPSEC-MB: Use random & non-repeating IV (VPP-1642) 07/18807/5
Neale Ranns [Thu, 11 Apr 2019 08:18:34 +0000 (08:18 +0000)]
IPSEC-MB: Use random & non-repeating IV (VPP-1642)

hard code IV and key lengths based on cipher.
Init IV from random data, use AES instruction to rotate.

Change-Id: I13a6507d12267b823c528660a903787baeba47a0
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovppinfra: fix the issue that mheap_get_trace record wrong pointer 55/18755/2
Wei CHEN [Tue, 9 Apr 2019 04:38:40 +0000 (12:38 +0800)]
vppinfra: fix the issue that mheap_get_trace record wrong pointer
when mspace_get_aligned try to malloc a chunk with align greater than 16

Change-Id: Ic3b91fc9532248482662f019bbfa073da18645ed
Signed-off-by: Wei CHEN <weichen@astri.org>
5 years agoStats: Spelling mistake: s/tx-unicast-miss/tx-unicast/ 06/18806/2
Ole Troan [Thu, 11 Apr 2019 07:08:39 +0000 (09:08 +0200)]
Stats: Spelling mistake: s/tx-unicast-miss/tx-unicast/

Change-Id: Ie71235e5a0ff84222d8a35f5d4e99e9b20447d61
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agocrypto: add performace test to unittest plugin 40/18740/5
Damjan Marion [Fri, 5 Apr 2019 17:42:21 +0000 (19:42 +0200)]
crypto: add performace test to unittest plugin

Change-Id: I49c710c5ace24a4c1f083120fd4c2972566a1695
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoTests: Refactor tearDown show command logging, add lifecycle markers. 69/18269/6
Paul Vinciguerra [Wed, 13 Mar 2019 16:23:05 +0000 (09:23 -0700)]
Tests: Refactor tearDown show command logging, add lifecycle markers.

This change adds a consistent interface for adding test-specific show commands to
log.txt.

It also adds log markers for the execution of setUp[Class], tearDown[Class]
in the logs.

Change-Id: I7d42e396e594a59e866a7d55dac0af25548e657a
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoMake the loss / delay sim available as an output feature 71/18671/9
Dave Barach [Wed, 3 Apr 2019 15:20:06 +0000 (11:20 -0400)]
Make the loss / delay sim available as an output feature

Add binary api and debug cli support.

Rewrite for speed: enqueue vlib_buffer_t's to the wheel, instead of
memcpy'ing data. Quad-loop the output feature / x-connect (interior)
node. Prefetch wheel entries in the input node.

Save packet-generator-based unit-test setup in extras/nsim.

Simple config example:

set nsim delay 20 ms bandwidth 1 gbit packet-size 1024
nsim output-feature enable-disable GigabitEthernet3/0/0

Change-Id: I852a32d4eb596e7e2aa1d9b30bf3b53525e39fd1
Signed-off-by: Dave Barach <dave@barachs.net>c
5 years agoudp: fix copyright typo 94/18794/2
Florin Coras [Wed, 10 Apr 2019 14:08:01 +0000 (07:08 -0700)]
udp: fix copyright typo

Change-Id: I74a61e941176321da0767affff0fb023f4c54c35
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoInitial 19.08-rc0 commit 03/18803/1 v19.08-rc0
Dave Wallace [Wed, 10 Apr 2019 21:51:47 +0000 (17:51 -0400)]
Initial 19.08-rc0 commit

- Add 19.08 Release notes placeholder.

Change-Id: Ide5978b584e608298c37a15175360c4b16c46f30
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
5 years agomake test: fix redundant setUp() in template_ipsec.py 98/18798/2
Dave Wallace [Wed, 10 Apr 2019 16:46:43 +0000 (12:46 -0400)]
make test: fix redundant setUp() in template_ipsec.py

Change-Id: I81b3888816b064bd6bf0f38f5380dae93d7bb349
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
5 years agocmake: fix errors in external when building past point-release 51/18551/2
Andrew Yourtchenko [Wed, 27 Mar 2019 14:22:40 +0000 (15:22 +0100)]
cmake: fix errors in external when building past point-release

Change-Id: I23b4816e4ef2c6a2fa825fbd063ea25ff2024151
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agocrypto: Intel IPSEC-MB engine 48/18748/8
Neale Ranns [Mon, 8 Apr 2019 07:36:50 +0000 (07:36 +0000)]
crypto: Intel IPSEC-MB engine

A plugin to use Intel IPSec MB library as a VPP crypto engine

This changes uses concepts from:
  https://gerrit.fd.io/r/#/c/17301/
hence that author's work is acknowledge below

Change-Id: I2bf3beeb10f3c9706fa5efbdc9bc023e310f5a92
Signed-off-by: Neale Ranns <nranns@cisco.com>
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agoethernet: fix packet tracing 93/18793/3
Benoît Ganne [Wed, 10 Apr 2019 12:21:11 +0000 (14:21 +0200)]
ethernet: fix packet tracing

Node tracing condition was wrongly reversed by commit "5ecd5a5d15 Move
pcap rx/tx trace code out of the dpdk plugin".
This prevented packet tracing in ethernet-input node and also impacted
performance in the no tracing case.

Change-Id: I345a11191d027c6c4ec474a2901995338050680a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
5 years agomake test: Initial QUIC test 78/18778/3
Dave Wallace [Wed, 10 Apr 2019 01:01:09 +0000 (21:01 -0400)]
make test: Initial QUIC test

- QUIC echo client/server transfer test

Change-Id: I69874975c9789fe9b4e85c5993bf09b7255d87d0
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
5 years agoIPSEC: for each engine and algorithm tests 95/18795/4
Neale Ranns [Wed, 10 Apr 2019 12:39:10 +0000 (12:39 +0000)]
IPSEC: for each engine and algorithm tests

refactor the IPSEC tests a bit so we can parameterise
the setup.

Change-Id: I777e5eb8f29ca1dce3dd273ebd05dae5846790af
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agosession: binary api app names as vectors 75/18775/3
Florin Coras [Tue, 9 Apr 2019 23:13:18 +0000 (16:13 -0700)]
session: binary api app names as vectors

Change-Id: Iae358365de8ccbc0441b14f21ba6b365cbfec09a
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoTests Cleanup: Fix missing calls to setUpClass/tearDownClass. 30/18230/4
Paul Vinciguerra [Wed, 13 Mar 2019 02:23:27 +0000 (19:23 -0700)]
Tests Cleanup: Fix missing calls to setUpClass/tearDownClass.

Continuation/Part 2 of https://gerrit.fd.io/r/#/c/17092/

Change-Id: Id0122d84eaf2c05d29e5be63a594d5e528ee7c9a
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoAPI: Fix shared memory only action handlers. 85/18785/2
Ole Troan [Wed, 10 Apr 2019 07:44:23 +0000 (09:44 +0200)]
API: Fix shared memory only action handlers.

Some API action handlers called vl_msg_ai_send_shmem()
directly. That breaks Unix domain socket API transport.

A couple (bond / vhost) also tried to send a sw_interface_event
directly, but did not send the message to all that had
registred interest. That scheme never worked correctly.
Refactored and improved the interface event code.

Change-Id: Idb90edfd8703c6ae593b36b4eeb4d3ed7da5c808
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoquic: add dummy accepted cb 77/18777/2
Florin Coras [Wed, 10 Apr 2019 00:13:11 +0000 (17:13 -0700)]
quic: add dummy accepted cb

Add dummy function to avoid session layer warning. Also, decrease
default debug level to avoid startup quic init notifications.

Change-Id: I2964fc15a8d93d78c976ed7c333e0cc5746c069e
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoIPSEC: remove double byte swap of IP addresses 86/18786/1
Neale Ranns [Wed, 10 Apr 2019 08:24:03 +0000 (08:24 +0000)]
IPSEC: remove double byte swap of IP addresses

Change-Id: I8c03c4aa90fb0056e11e0f234999c25d7839d759
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoMake tcp/udp/icmp compute checksum safer for buffer-chain case 65/18765/3
John Lo [Tue, 9 Apr 2019 14:23:56 +0000 (10:23 -0400)]
Make tcp/udp/icmp compute checksum safer for buffer-chain case

Change-Id: I046e481a67fbeffdaa8504c8d77d232b986a61ee
Signed-off-by: John Lo <loj@cisco.com>
5 years agordma: add multiqueue support 68/18768/2
Benoît Ganne [Wed, 3 Apr 2019 13:16:28 +0000 (15:16 +0200)]
rdma: add multiqueue support

Add support for multiqueue for RDMA devices.

Change-Id: I78a2481cec6747494c670cc776475828be3af55b
Signed-off-by: Benoît Ganne <bganne@cisco.com>
5 years agordma-core: add debug build option 67/18767/2
Benoît Ganne [Tue, 9 Apr 2019 07:00:42 +0000 (09:00 +0200)]
rdma-core: add debug build option

Add option RDMA_CORE_DEBUG=[yn] build option. rdma-core package is built
in Release (-O2) mode by default, but Debug (-O0 -g) mode can be
selected by eg.
 make install-ext-deps RDMA_CORE_DEBUG=y

Change-Id: Id4db5ef1e7b13c44d478755a0bfbdbe56cfc13df
Signed-off-by: Benoît Ganne <bganne@cisco.com>
5 years agosession: fix session flags 69/18769/3
Florin Coras [Tue, 9 Apr 2019 18:05:13 +0000 (11:05 -0700)]
session: fix session flags

Change-Id: I681169b82c661b7f0bf19f09d07d76ac1d3ed173
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoFix some python3, cleanup cpu allocation 15/18715/3
jdenisco [Fri, 5 Apr 2019 16:25:50 +0000 (12:25 -0400)]
Fix some python3, cleanup cpu allocation

Change-Id: I97cecc964f341720d8c4894656637082db5886d7
Signed-off-by: jdenisco <jdenisco@cisco.com>