vpp.git
4 years agofib: Adjacency realloc during rewrite update walk (VPP-1822) 93/24293/3
Neale Ranns [Sun, 12 Jan 2020 21:16:55 +0000 (21:16 +0000)]
fib: Adjacency realloc during rewrite update walk (VPP-1822)

Type: fix

Change-Id: I0e826284c50713d322ee7943d87fd3363cfbdfbc
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agofib: FIB crash removing labelled route (VPP-1818) 19/24419/4
Neale Ranns [Mon, 20 Jan 2020 02:28:00 +0000 (02:28 +0000)]
fib: FIB crash removing labelled route (VPP-1818)

Type: fix

The crash occured trying to retreive a NULL path list to walk the path
extensions. A walk shoul not be required, because there should be no
extensins, since all paths are removed. The problem is that when the
paths were added, they were not sorted, hence neither were the
extensions and when they were updated, duplicate extensions were added,
and hence a path removal did not remove them all.
Fix is to make sure paths are sorted.

Change-Id: I069d937de8e7bc8aae3d92f588db4daff727d863
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agol2: fix MAC learn counter update on adding MAC entry 44/24244/1
John Lo [Tue, 7 Jan 2020 21:35:29 +0000 (16:35 -0500)]
l2: fix MAC learn counter update on adding MAC entry

Type: fix

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

4 years agobonding: drop traffic on backup interface for active-backup mode 79/24079/2
Steven Luong [Sat, 7 Dec 2019 05:12:41 +0000 (21:12 -0800)]
bonding: drop traffic on backup interface for active-backup mode

For active-backup mode, we transmit on one and only one interface. However,
we might still receive traffic on the backup interface. We should drop them
and strictly process incoming traffic on only the active interface.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Idb6b798b30033e84044b151c616be3c157329731
(cherry picked from commit 6dfd3785e4d65418f4330a73bf837912c37b8ec2)

4 years agogso: fix the number of buffers required for segmentation 24/24124/2
Mohsin Kazmi [Tue, 24 Dec 2019 22:00:49 +0000 (23:00 +0100)]
gso: fix the number of buffers required for segmentation

Ticket: VPPSUPP-51
Type: fix

Change-Id: I34d4237eb0644705ce0f523fdd0d6b70308e8bcd
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 years agofib: Adjacency walk fix for IPv6 26/24026/2
Neale Ranns [Mon, 16 Dec 2019 23:14:14 +0000 (23:14 +0000)]
fib: Adjacency walk fix for IPv6

Type: fix

Change-Id: Id3a1950e49d5eb1883af06a14df97e98f55162a8
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit e7ee300923d23b6a6eab42676c8dcce85da89bed)

4 years agovxlan: reuse inner packet flow hash for tunnel outer header load balance 05/24105/1
Shawn Ji [Wed, 18 Dec 2019 02:10:54 +0000 (10:10 +0800)]
vxlan: reuse inner packet flow hash for tunnel outer header load balance

Type: fix

Several tunnels encapsulation use udp as outer header and udp src port
is set by inner header flow hash, such as gtpu, geneve, vxlan, vxlan-gbd
Since flow hash of inner header is already been calculated, keeping it
to vnet_buffere[b]->ip.flow_hash should save load-balance node work to
select ECMP uplinks.

Change-Id: I0e4e2b27178f4fcc5785e221d6d1f3e8747d0d59
Signed-off-by: Shawn Ji <xiaji@tethrnet.com>
(cherry picked from commit 623b4f85e6ee4611ae15bb3103fe30725ca977ed)

4 years agoapi: fix dead client scan heap issue 05/23505/2
Nathan Skrzypczak [Thu, 7 Nov 2019 15:00:57 +0000 (16:00 +0100)]
api: fix dead client scan heap issue

Type: fix

On multiworker setup when an app client dies, the
vec_reset_length call fails the assert in
clib_mem_is_heap_object. Same thing might happen for
the clib_warnings

Change-Id: I369f9d2dbe60407c84994a4e8d25f6df7848ca93
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
(cherry picked from commit 5ed3fe3dd4320a7b4080f18de32ef491b5a1c7f0)

4 years agovxlan: fix vxlan hw offload issue 14/23814/1
Chenmin Sun [Wed, 4 Dec 2019 17:41:35 +0000 (01:41 +0800)]
vxlan: fix vxlan hw offload issue

Type: fix

Since Vxlan hw offload jumps the ethernet-input node, so needs to
adjust the data offset accordingly

In original code, the current_data is 0 when arriving vxlan-flow-input
node(due to no graph node before it, except the dpdk-input), so this
code block cannot find the correct vxlan header:
enum
  { payload_offset = sizeof (ip4_vxlan_header_t) };
vlib_buffer_advance (b0, payload_offset);
see code in src/vnet/vxlan/decap.c, function vxlan4_flow_input_node

This patch fixes this issue

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: Iab4af7a7dc3b69a117a4c9ea1c59662669a6438c
(cherry picked from commit 1ec9fdbf29aedcdd4040feb635971c3f87a1cfdf)

4 years agotcp: fix ip check in lookup validation 04/23504/3
Florin Coras [Thu, 7 Nov 2019 16:26:06 +0000 (08:26 -0800)]
tcp: fix ip check in lookup validation

Type: fix

Change-Id: Ia18632c8fe22bdcfdf3cb48a4234f8703a7ac1d7
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 07df79150f15291af9793397d6182a4168c6bfc5)

4 years agoip: IP address and prefix types (moved from LISP) 67/23667/2
Neale Ranns [Tue, 12 Nov 2019 17:16:47 +0000 (17:16 +0000)]
ip: IP address and prefix types (moved from LISP)

Type: refactor

Change-Id: I2c6b59013bfd21136a2955442c779685f951932b
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit ea93e48cf6e918937422638cb574964b88a146b6)

4 years agoclassify: debug cli %v not %s 98/23698/2
Dave Barach [Fri, 29 Nov 2019 13:40:58 +0000 (08:40 -0500)]
classify: debug cli %v not %s

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I294f0b773375f6dce020b771db0726ceb5d812cc
(cherry picked from commit 3268a64d3c9e60d69b3b12d6c6bf1987394275d2)

4 years agovcl: if the ldp user send buf with 0 len, it will assert failed. 76/23676/2
jiangxiaoming [Thu, 21 Nov 2019 15:34:56 +0000 (23:34 +0800)]
vcl: if the ldp user send buf with 0 len, it will assert failed.

Type: fix

Change-Id: I8ff60cf8726c463491c687e170ad0b1026a1303a
Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
(cherry picked from commit ff31ac6809d9913ebd2f58a3a4153a0f419b9a77)

4 years agodpdk: fix non-NULL terminated string 72/23672/2
Benoît Ganne [Tue, 19 Nov 2019 12:40:48 +0000 (13:40 +0100)]
dpdk: fix non-NULL terminated string

Type: fix

Change-Id: Ic221cd4fcad89aece71239ed96152bf0311f3286
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit ab9b9a5c0e3257136701cde6cdfdc66c35bf8f3d)

4 years agovirtio: fix use-after-free 73/23673/2
Benoît Ganne [Wed, 20 Nov 2019 13:32:38 +0000 (14:32 +0100)]
virtio: fix use-after-free

Type: fix

Change-Id: Ic67d9da65d937f56ecf994a5504c6351624b32ff
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 8f011830b2e01dfdbf8449b3145a4dd806b5515f)

4 years agovlib: pci: fix non-NULL terminated C-string 75/23675/1
Benoît Ganne [Wed, 20 Nov 2019 08:07:50 +0000 (09:07 +0100)]
vlib: pci: fix non-NULL terminated C-string

Type: fix

Change-Id: I6f25d9295b973ab7133071b6dc325ecd86386898
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 0b91bd6c52460c3bff9ae7b1c0405d258a016c32)

4 years agotcp: close session on retransmit failure 18/23518/2
Florin Coras [Fri, 15 Nov 2019 07:32:08 +0000 (23:32 -0800)]
tcp: close session on retransmit failure

Type: fix

Since the connection is closed, also mark the session as closed.

Change-Id: Ica3849c3ff12fa7a65ba64e563a60d6c94f5ceca
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 52be67435eb4615b899950b42b8ff72d258fbcb3)

4 years agotests: Add UT to test incomplete MPLS adjacencies send ARP requests 17/23517/2
Neale Ranns [Wed, 6 Nov 2019 13:13:01 +0000 (13:13 +0000)]
tests: Add UT to test incomplete MPLS adjacencies send ARP requests

Type: test

Change-Id: I81e07233aec54c786e4e9beb8c4f06d0a3dca90f
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 1976f36b09ead86874feb630277dfaeceed9c0fe)

4 years agointerface: send proper link/admin status in event 16/23516/2
Alexander Chernavin [Wed, 6 Nov 2019 14:58:18 +0000 (09:58 -0500)]
interface: send proper link/admin status in event

Type: fix

Change-Id: I7cba9f911abe1ae82d8381a48f65e81b615ede76
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
(cherry picked from commit aa27dcb84cb312277370b77370a69b2a3596c4c5)

4 years agovcl: Handle newer Glibc (>2.28) where fcntl is actually fcntl64 15/23515/2
Carl Smith [Wed, 13 Nov 2019 01:37:39 +0000 (14:37 +1300)]
vcl: Handle newer Glibc (>2.28) where fcntl is actually fcntl64

Glibc 2.28 now provides fcntl64 which is used instead of fcntl
by defining fcntl as fcntl64 in fcntl.h

Type: fix

Change-Id: I87fedfbf3e0d241aafdc920e90f824d71353e0e6
Signed-off-by: Carl Smith <carl.smith@alliedtelesis.co.nz>
(cherry picked from commit e16707b5b2195fda47c1a3db7ba61f30055d2dbc)

4 years agovcl: fix nonblocking accept with >1 event in the queue 12/23512/3
Carl Smith [Tue, 12 Nov 2019 01:57:37 +0000 (14:57 +1300)]
vcl: fix nonblocking accept with >1 event in the queue

We discard unwanted events until we get an ACCEPTED.
But if we are non-blocking we need to check the queue
length every time and EAGAIN if empty before waiting.

Type: fix

Signed-off-by: Carl Smith <carl.smith@alliedtelesis.co.nz>
Change-Id: Ie0c7e5cb00f0d37d2e1534f8bb384221ff56f2e3
(cherry picked from commit 592a909a302262cf4088a5468b8e427f577725e8)

4 years agocrypto: not use vec api with opt_data[VNET_CRYPTO_N_OP_IDS] 11/23511/2
Lijian Zhang [Fri, 27 Sep 2019 08:25:35 +0000 (16:25 +0800)]
crypto: not use vec api with opt_data[VNET_CRYPTO_N_OP_IDS]

opt_data is defined as a array, while in some code, e.g., function
 vnet_crypto_get_op_type, it's used as vec.
vec api is not applicable to static arraies.

src/vnet/crypto/crypto.h:234:70: error: address of array 'cm->opt_data' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
  vnet_crypto_op_data_t *od = ({ do { if ((0 > 0) && ! ((id) < ((cm->opt_data) ? (((vec_header_t *) (cm->opt_data) - 1)->len) : 0)))

Type: fix

Change-Id: I0b6754406e4216ca975bc1da4b5d4ce293a9bb45
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
(cherry picked from commit b15d796dbf1da6a229df4e10a3a2bdd700f0354e)

4 years agosvm: improve fifo segment verbose cli 09/23509/2
Florin Coras [Fri, 8 Nov 2019 01:00:15 +0000 (17:00 -0800)]
svm: improve fifo segment verbose cli

Type: feature

Also make sure that size for dlmalloc allocated private segments is
accurate.

Change-Id: I6ec81ff99a13dd29b9664d768835a68019f0c96c
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit f8461bfb4822ca20f64df19dfbb3170e99f7e89d)

4 years agovcl: fix epoll connected events sid 06/23506/2
Florin Coras [Wed, 6 Nov 2019 23:41:37 +0000 (15:41 -0800)]
vcl: fix epoll connected events sid

Type: fix

Use sid returned by vcl_session_connected_handler instead of trying to
infer it from vpp session handle.

Change-Id: Ic0fbb90ec2bd851b435fc3f2a34265ac9a8ab29f
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit f1653e62fe41e3df429aadaaab22d0cc8aaa227a)

4 years agotcp: validate the IP address while checking TCP connection 03/23503/3
Srikanth Akula [Thu, 7 Nov 2019 02:53:13 +0000 (18:53 -0800)]
tcp: validate the IP address while checking TCP connection

Type: feature

Along with the port information, we need to validate the IP address details as well.
This is very useful in the case port re-use scenario

Signed-off-by: Srikanth Akula <srakula@cisco.com>
Change-Id: I11e1ebcd3e56aae47ac235a89606a83c928aa6bb
(cherry picked from commit cf4c2102d9dc3ccc939cca1137b24a75341f1b0c)

4 years agosession tcp: refactor pacer time 02/23502/2
Florin Coras [Wed, 23 Oct 2019 02:01:39 +0000 (19:01 -0700)]
session tcp: refactor pacer time

Type: refactor

Change-Id: Ic1c3e1f7987702cd88972acc34849dc1f585d5fe
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit a8e71c8981f039588a7ca94e6ab66b4ebac784a5)

4 years agotests: test tls case 01/23501/2
haiyanx1.zhang [Sat, 12 Oct 2019 08:44:44 +0000 (08:44 +0000)]
tests: test tls case

Type: feature

Signed-off-by: haiyanx1.zhang <haiyanx1.zhang@intel.com>
Change-Id: I071f5face0d489dc967cce1edcffbc1f8fac5c7e
Signed-off-by: haiyanx1.zhang <haiyanx1.zhang@intel.com>
(cherry picked from commit 419d31f817af0436c699c0b565e2d6a058c487db)

4 years agotests: add cli_return_response to vpp_papi_provider 34/23534/2
Dave Barach [Wed, 9 Oct 2019 21:28:04 +0000 (17:28 -0400)]
tests: add cli_return_response to vpp_papi_provider

To improve gcov/lcov code coverage stats, it's necessary to send
incorrect debug CLI commands; to force vpp into debug CLI error paths.

cli_return_response() sends commands and returns the response object,
so test vectors can handle failures.

Type: feature

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I4fab591c9d2e30c996f016e18e4fd69b9c5bed06
(cherry picked from commit 5932ce17e128c096fcc56eb04b27e780da3cf255)

4 years agoipsec: fix trailing data overflow 35/23535/1
Filip Tehlar [Mon, 18 Nov 2019 22:21:37 +0000 (22:21 +0000)]
ipsec: fix trailing data overflow

IPsec writes trailing data at the end of the buffer without checking
if there is enough space. If the packet length equals buffer size this
leads to rewiting of the next buffer header in the pool.

Type: fix

Change-Id: Iceb27bb724c7243863a4b532aad0808051b7d74c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agocrypto: do not crash if no crypto engine loaded 13/23513/2
Benoît Ganne [Wed, 6 Nov 2019 13:21:07 +0000 (14:21 +0100)]
crypto: do not crash if no crypto engine loaded

Do not overflow ops_handlers vector.

Type: fix

Change-Id: I8d5e7fb8125a7bd87ecfe6f4f1390fb9f43dad8f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 6545df7913b53d71415c7c9643cb824c2ffbaaa7)

4 years agosession: unify buffer tx dispatching 83/23183/4
Florin Coras [Thu, 17 Oct 2019 05:35:18 +0000 (22:35 -0700)]
session: unify buffer tx dispatching

Type: refactor

Use pending tx buffer vector to postpone dispatching of all buffers,
i.e., either generated as a result of tx events or custom tx event.

Change-Id: Ic5894c4653c338cfb04555d20857f954b245ee83
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 8a754f1a55fb16a4d42efd5c606e5a07b4afffe9)

4 years agofib: Copy the prefix before use in case the underlying entry reallocs. 25/23425/2
Neale Ranns [Wed, 6 Nov 2019 11:17:54 +0000 (11:17 +0000)]
fib: Copy the prefix before use in case the underlying entry reallocs.

Type: fix

all other uses of the fib_entry_get_preifx in the code base don't pass
the prefix into recursive functions.

Change-Id: Ic1c56acd406a733b215ee2fd98b6bed58b490a4f
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 320dfcf2aa8f4617b51a2bb15f3d0f93ee62d4dc)

4 years agogtpu: check packet has enough data for gtpu header 63/23463/2
Benoît Ganne [Fri, 25 Oct 2019 14:53:10 +0000 (16:53 +0200)]
gtpu: check packet has enough data for gtpu header

Type: fix

Change-Id: I604e4dd2b29962bfcd8e950a0074637dab53c79e
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 318fbfe89d4143824cec1ed81f9f7fbcddc21639)

4 years agobonding: fix non-null terminated vector 62/23462/2
Benoît Ganne [Wed, 6 Nov 2019 13:36:38 +0000 (14:36 +0100)]
bonding: fix non-null terminated vector

Type: fix

Change-Id: Iea7d73a304236b525b95bdad3bfdb41e711f8cdb
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit a03c7d5b9280e1cd5d89cb7cc15bd05b56062c95)

4 years agovlib: fix handoff queue sequencing bug 61/23461/2
Dave Barach [Fri, 8 Nov 2019 13:22:28 +0000 (08:22 -0500)]
vlib: fix handoff queue sequencing bug

Set vm->check_frame_queues after actually enqueuing a frame. Under
obscure circumstances, the code managed to set check_frame_queues so
far in advance that 100 dispatch cycles could elapse before the frame
enqueue succeeded. That resulted in permanent lack of queue service.

Type: fix
Ticket: VPP-1734
Fixes: 18191

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: If2d398202b4ba2b96581d25e8142daef3f74c9e5
(cherry picked from commit 320998a8126766c0db92d9c7652f765f9565a7b5)

4 years agotcp: avoid retransmits post reset 60/23460/2
Florin Coras [Thu, 7 Nov 2019 20:33:12 +0000 (12:33 -0800)]
tcp: avoid retransmits post reset

Type: fix

Change-Id: Ib6a8f5ca597389700e5746f089a5cec7eee65ab5
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit fd4c3fe364becc02527ed5f9088d904c7bc34a6f)

4 years agordma: fix name auto-generation on create 58/23458/2
Benoît Ganne [Wed, 6 Nov 2019 16:24:51 +0000 (17:24 +0100)]
rdma: fix name auto-generation on create

When creating rdma interface without specifying a name, we need to
generate one instead of NULL.

Type: fix

Change-Id: If41870691dec47e8e673d48ac4b4ddffd2385a03
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit a50892e1504401e243076f08d9077675eb0b030e)

4 years agotap: fix cli parser 57/23457/2
Damjan Marion [Fri, 8 Nov 2019 14:15:11 +0000 (15:15 +0100)]
tap: fix cli parser

Type: fix

Change-Id: I38ee9efd23774cce7790565825527cca9ba6f200
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 0ba86cb1bdcc273ebc3d5a92f765639a64894a7a)

4 years agodpdk: ipsec gcm fixes 56/23456/2
Christian Hopps [Sun, 3 Nov 2019 05:02:18 +0000 (01:02 -0400)]
dpdk: ipsec gcm fixes

- Fix AAD initialization. With use-esn the aad data consists of the SPI
and the 64-bit sequence number in big-endian order. Fix the u32 swapped
code.

- Remove salt-reinitialization. The GCM code seems inspired by the GCM
RFCs recommendations on IKE keydata and how to produce a salt
value (create an extra 4 octets of keying material). This is not IKE
code though and the SA already holds the configured salt value which
this code is blowing away. Use the configured value instead.

Type: fix

Change-Id: I5e75518aa7c1d91037bb24b2a40fe4fc90bdfdb0
Signed-off-by: Christian Hopps <chopps@labn.net>
(cherry picked from commit d58419f19b33560d224471bc16674a525427308e)

4 years agocrypto: fix crypto perf unittest crash 55/23455/2
Fan Zhang [Mon, 4 Nov 2019 16:01:59 +0000 (16:01 +0000)]
crypto: fix crypto perf unittest crash

Type: fix

crypto perf test crashes for key size different than 16 bytes.
This patch fixes the issue

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: Ic8a8ca83ca189c879815dc5d065b8c6f7826cd41
(cherry picked from commit bc2e640db7533394a3de7bdffd78fadf2a2ffd9f)

4 years agosvm: fix byte accounting when allocating fifo header 54/23454/2
Florin Coras [Thu, 7 Nov 2019 00:24:29 +0000 (16:24 -0800)]
svm: fix byte accounting when allocating fifo header

Type: fix

Change-Id: Ie50625271d257da814445ce13c2e6cd98986d523
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit c9dff181c8d135b95a12297c44bb4aa87b95b21d)

4 years agotests: make threads in punt tests join when finished 53/23453/2
Andrew Yourtchenko [Tue, 5 Nov 2019 18:38:08 +0000 (19:38 +0100)]
tests: make threads in punt tests join when finished

The 42693521f6046997133c8f63bcfc9d615d96f69d added the timeout
to the child process join + print the name of the offending
child process.

Upon testing the issue furher, appeared the offenders were
always the same - punt tests. The processes running them
were stuck trying to acquire lock, even if all
the user-accessible execution has finished. Some searching
revealed that one needs to tread carefully when dealing
with Thread and Multiprocessing at the same time.

punt tests used threads but did not call thread.join. Somehow
it worked in some cases but not the others. This fix makes
the threads exit cleanly - which also makes the timeouts
waiting for the process to join disappear.

Type: test
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I05d99bb48a9987544bbfe45118755c09d7867aa0
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 3f8c87132d63c14f1ba90d7db6cf2a2aba0f8cb9)

4 years agonat: NAT udp counter & unit test fixes 52/23452/2
Filip Varga [Tue, 5 Nov 2019 13:14:08 +0000 (14:14 +0100)]
nat: NAT udp counter & unit test fixes

Ticket: VPP-1798
Type: fix

Change-Id: I42f02d5824575720e95b9fc99cfa864252221a82
Signed-off-by: Filip Varga <fivarga@cisco.com>
(cherry picked from commit 5854b43de4c04a7c52b0cf03cd548c9cac86c325)

4 years agotcp: correct validity check return value 50/23450/2
Ryujiro Shibuya [Tue, 5 Nov 2019 07:24:32 +0000 (07:24 +0000)]
tcp: correct validity check return value

Type: fix

Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com>
Change-Id: Ib59bf664d8da20516d8f16d716c5e8698675da4b
(cherry picked from commit 3ea17d54a9a00c81bc672a7be1d48b765ac87ed2)

4 years agotests: support setting random seed 49/23449/2
Klement Sekera [Tue, 5 Nov 2019 11:18:25 +0000 (11:18 +0000)]
tests: support setting random seed

Log the random seed used when running tests and provide means to re-use
it in a later run.

Type: feature

Change-Id: I18d2a36ee802b901d4cca5577df41cec07f09cc0
Signed-off-by: Klement Sekera <ksekera@cisco.com>
(cherry picked from commit 45a95dd782b91e9ae5665b5f95be4b6d7f99b879)

4 years agolibmemif: reset number of queues on disconnect 47/23447/2
Jakub Grajciar [Tue, 5 Nov 2019 09:58:00 +0000 (10:58 +0100)]
libmemif: reset number of queues on disconnect

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: If4df47b1109ac90d4d5834b3aa7d326f6b3761d2
(cherry picked from commit 718a19b8f9aa3dca26aaf4eb6bd9f60eb6376d30)

4 years agotests: avoid test runner hanging on child test process join 48/23448/2
Andrew Yourtchenko [Tue, 5 Nov 2019 00:08:26 +0000 (01:08 +0100)]
tests: avoid test runner hanging on child test process join

In parallel test, the single process is spawning
a bunch of child processes running the tests,
and communicates to them. When the child process
signals that it has finished, the parent calls
child.join(). Sometimes this join never returns.
The result is a lot of defunct python processes,
and the test run just hangs.

I have seen this failure intermittently a fair bit
in a busy containerized environment, and by chance,
consistently reproduced it on a Thinkpad X280
with 8G of RAM and Ubuntu 19.04, which allowed
to diagnose it.

Type: test
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: If0a3110fc2d23e73d77c310d61c3ea90a2b53610
(cherry picked from commit 42693521f6046997133c8f63bcfc9d615d96f69d)

4 years agoipsec: ipsec-input: check for too-short packets 46/23446/2
Benoît Ganne [Fri, 25 Oct 2019 13:26:27 +0000 (15:26 +0200)]
ipsec: ipsec-input: check for too-short packets

Make sure packet is big enough before processing it.
Policy matching is done speculatively but is discarded if packet is too
short.

Type: fix

Change-Id: I647db2c4e568b0d9bf2cfd5056e1b1c2e25132fe
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit f7f49640bbb4339d71f8b713b04b8f401d5fc270)

4 years agovlib: fix for vlib_node_add_next_with_slot 45/23445/2
Christian Hopps [Sun, 3 Nov 2019 04:59:49 +0000 (00:59 -0400)]
vlib: fix for vlib_node_add_next_with_slot

- vlib_node_add_next_with_slot was not cleaning the old next node
references to the given slot when replacing it with new next node. This mostly
worked until one tried to set the slot to a previously (but not currently) used
next node for that slot.

Type: fix

Signed-off-by: Christian Hopps <chopps@labn.net>
Change-Id: I7ee607625da874e320158b80f12ddc16e377f8e9
(cherry picked from commit 2e8b0618b12d317f2a4632e69a0663dcd8dde472)

4 years agompls: number of mpls tunnel paths returns zero 44/23444/2
IJsbrand Wijnands [Mon, 28 Oct 2019 16:19:27 +0000 (17:19 +0100)]
mpls: number of mpls tunnel paths returns zero

The number of paths on the mpls tunnel returned through the bapi is
always zero. Doing a ntohl on a uint32 and poking it into a uint8 causes the problem.

Type: fix
Signed-off-by: IJsbrand Wijnands <ice@cisco.com>
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I4135ad43a891e7818ca673c8067ef1f11cb34530
(cherry picked from commit bf103d99e651f3b221361f6d964ae84870fd7a6b)

4 years agosession: reschedule asap when snd space constrained 41/23441/2
Florin Coras [Sat, 2 Nov 2019 21:32:52 +0000 (14:32 -0700)]
session: reschedule asap when snd space constrained

Type: feature

Improves fairness for sessions that are snd space or pacer constrained.

Change-Id: Ida5f523090f1dcbfb17bf5116bc7917747ac8593
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit dd97a48d9fac91c7f16a31aa661dd6c968c3b760)

4 years agovlib: Handle race in thread barrier processing 40/23440/2
Alexander Kabaev [Fri, 1 Nov 2019 22:26:20 +0000 (18:26 -0400)]
vlib: Handle race in thread barrier processing

When CLIB_DEBUG is enabled, vlib_foreach_main macro asserts that
vlib_main it currently looks at is safely parked in barrier, by
checkling that vlib_main->parked_at_barrier is not 0.
Unfortunately, the check is racy - workers first increment the
atomic counter to indicate that they have reached the barrier
and _then_ set this_main->parked_at_barrier to 1. For the last
worker to suspend this opens the race - main thread is free
to execute and assert immediately after atomic counter has been
incremented, before worker gets to write to own parked_at_barrier.

Fix this by simply swapping the order of two operations.

Type: fix

Signed-off-by: Alexnader Kabaev <kan@FreeBSD.org>
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Iae47abd6ca0be1c5413f5ecaefabc64cd7eac2ed
(cherry picked from commit feda545105106d673fdca61028331c86eeb1f408)

4 years agotls: fifo size is u32 53/23253/2
Dave Wallace [Wed, 30 Oct 2019 17:53:56 +0000 (17:53 +0000)]
tls: fifo size is u32

- unformat_memory_size() writes to a uword *
- Limit cli input to u32

Type: fix

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

4 years agotests: decode worker stdout/stderr output 50/23250/2
Dave Wallace [Tue, 29 Oct 2019 23:12:03 +0000 (19:12 -0400)]
tests: decode worker stdout/stderr output

Type: fix

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

4 years agovcl: handle segment map errors 38/23438/2
Florin Coras [Wed, 25 Sep 2019 23:37:43 +0000 (16:37 -0700)]
vcl: handle segment map errors

Type: fix

Change-Id: Ibd122a4565c067627c4bbc8cac7df2d5b6497392
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit dbc9c599b9d4453c7433ac59dd21f088778e024b)

4 years agosession tcp: infra for transports to send buffers 51/23451/2
Florin Coras [Thu, 17 Oct 2019 05:06:08 +0000 (22:06 -0700)]
session tcp: infra for transports to send buffers

Type: feature

Add infra that allows transpors to enqueue pending buffers without the
need to build and manage their own pending frames. An important benefit
is the fact that buffer wire/tx ordering is ensured by session layer.

Change-Id: I764fd1693d610b321a1d0c84b648a314f14583db
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 2a7ea2ee92d6dc4800ee21323d3324a9e8449dcf)

4 years agoip: Punt rather than drop unkown IPv6 ICMP packets 49/23249/2
Neale Ranns [Fri, 25 Oct 2019 14:20:42 +0000 (07:20 -0700)]
ip: Punt rather than drop unkown IPv6 ICMP packets

Type: feature

Change-Id: Ib137c453ff2dd5b9d028c653afa80e6b2b81b9e0
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 1afe95272672ae0ff42109a9a682907fd169973e)

4 years agohttp_static: fifo-size is u32 54/23254/2
Dave Wallace [Wed, 30 Oct 2019 18:47:46 +0000 (18:47 +0000)]
http_static: fifo-size is u32

- Limit cli input to u32

Type: fix

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

4 years agordma: fix next node rx redirect 56/23356/2
Benoît Ganne [Tue, 5 Nov 2019 16:46:17 +0000 (17:46 +0100)]
rdma: fix next node rx redirect

Type: fix

Change-Id: I694db40c3a0361852d01b84c7a45e32e39e9f4af
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 972d71da8683259c238b3b0e69665655f2d35b70)

4 years agoikev2: fix traffic selector match 62/23262/2
Filip Tehlar [Wed, 23 Oct 2019 11:11:42 +0000 (11:11 +0000)]
ikev2: fix traffic selector match

Type: fix

Change-Id: I81ab3dcd03f397b3d275da6cfa094e048ad92f95
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit cb3cfe876b3bbe2f360e3b32a43a060bdcb8bf9e)

4 years agosession: fix show cli with closed session 59/23259/2
Florin Coras [Fri, 1 Nov 2019 21:03:28 +0000 (14:03 -0700)]
session: fix show cli with closed session

Type: fix

Change-Id: Ifb6ead644c0273b84a5647f7923053f1db7c5a76
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 2d0b2bbb97d57cb4bac30e4f3138b70c277aee47)

4 years agovlib: enhance the "show cli" debug CLI command 58/23258/2
Dave Barach [Fri, 1 Nov 2019 15:24:43 +0000 (11:24 -0400)]
vlib: enhance the "show cli" debug CLI command

Dump the entire CLI, mp-safe commands, non-mp-safe commands, commands
which have been executed. Optionally, clear the hit counters.

Type: feature

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ie38fc664b7deaabc35ca35be68db7e159272f551
(cherry picked from commit a1f5a956e5b2cfeb591dcdfb34d23ebed84d0bca)

4 years agosession: avoid double dispatch of new events 55/23255/2
Florin Coras [Thu, 31 Oct 2019 02:22:51 +0000 (19:22 -0700)]
session: avoid double dispatch of new events

Type: fix

Avoid re-dispatching new events if they've just been added to the old
events linked list.

Change-Id: Ie5d0b799eae6cebb118d97204e5111eb194c0b8e
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 45b7973dddc9f1b50d7f20cc1abe150b2ad9931f)

4 years agovlib: Trivial - fix typo in short help 52/23252/2
Paul Vinciguerra [Wed, 30 Oct 2019 15:14:58 +0000 (11:14 -0400)]
vlib: Trivial - fix typo in short help

Type: fix

Change-Id: Ifada594088984291ce2e79da0bbbbd1f500640c9
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 43d8cf6fad25ed8d53be38f824739c59a3aff716)

4 years agodpdk: use local logger 51/23251/2
Paul Vinciguerra [Wed, 30 Oct 2019 18:10:56 +0000 (14:10 -0400)]
dpdk: use local logger

Type: fix

Change-Id: I44922f70aef6a3c53f0f56c6d0656502c8fd69b2
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 59c110736bb173b9d65ced3020ea794daa0ff000)

4 years agosession: app-closed to transport-deleted on delete notify 47/23247/2
Florin Coras [Fri, 25 Oct 2019 23:23:39 +0000 (16:23 -0700)]
session: app-closed to transport-deleted on delete notify

Type: refactor

As a result, transport-deleted is the only session state that has no
transport data structure.

Change-Id: I2da2bc4bbb141d8a7b52faae66a4733de8f8513b
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 3b5e222f8a4d0ccd4ec4eace2551491f13de85d9)

4 years agoip: reassembly: fix use-after-free 46/23246/2
Benoît Ganne [Wed, 23 Oct 2019 11:53:49 +0000 (13:53 +0200)]
ip: reassembly: fix use-after-free

When processing the last buffer of a reassembled packet, the current
buffer will be freed and must be reloaded using the updated index.

Type: fix

Change-Id: Ib39e29e60eb527b4cd4828a3aa37d82c8dddd709
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit cf7803d2e864fb71f14943a544ac309d3d0510cb)

4 years agotests: DEBUG=gdb[server]-all to debug worker(s) 45/23245/2
Dave Wallace [Mon, 21 Oct 2019 02:53:14 +0000 (02:53 +0000)]
tests: DEBUG=gdb[server]-all to debug worker(s)

Type: test

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

4 years agovcl: add api to set lcl ip 44/23244/2
Florin Coras [Thu, 17 Oct 2019 16:56:27 +0000 (09:56 -0700)]
vcl: add api to set lcl ip

Type: feature

Change-Id: I40169fbbe8a20670dd612c341b6c78b5c925bf74
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit ef7cbf6adf1882af4d4ae8657632d4a2a59efcb2)

4 years agovlib: linux: fix wrong iommu_group value issue when using dpdk-plugin 43/23243/2
Yulong Pei [Thu, 17 Oct 2019 10:41:52 +0000 (18:41 +0800)]
vlib: linux: fix wrong iommu_group value issue when using dpdk-plugin

When VPP work with dpdk-plugin, linux_vfio_main_t->container_fd is always -1
since it never have chance to run open("/dev/vfio/vfio") to get the fd.

But this lead to a potential issue of VPP, that is, when start VPP without
uio-driver field setup in /etc/vpp/startup.conf, VPP will run to automatical
select uio driver in vlib_pci_bind_to_uio() and the function depend on
iommu_group value to decide to work on vfio or vfio-noiommu mode.

Since in vlib_pci_get_device_info() have the condition container_fd != -1,
so the iommu_group value will be always -1 at this scenario, this caused
that VPP mistake to run with vfio-noiommu driver on intel_iommu=on state.

Actually in order to get iommu_group and iommu_group/name value, no need to
depend on linux_vfio_main_t->container_fd value, so the fix remove the
condition lvm->container_fd != -1, then it can get the correct iommu_group
value.

Type: fix

Change-Id: I3f162fc4971b9a2b8717205f8f3b52e30c5e5b69
Signed-off-by: Yulong Pei <yulong.pei@intel.com>
(cherry picked from commit 45495480c8165090722389b08075df06ccfcd7ef)

4 years agotcp: fix retransmit with no sacks 84/23384/1
Florin Coras [Mon, 4 Nov 2019 22:39:33 +0000 (14:39 -0800)]
tcp: fix retransmit with no sacks

Type: fix

Change-Id: I6f7df0d358f57f7feadb9b7a3fcffb99558b2af8
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit bf1f8b7f288c29bfcc128b1d09eae1c1eac2b7cc)

4 years agonat: reapply respect udp checksum 26/23326/1
Filip Varga [Mon, 21 Oct 2019 16:18:00 +0000 (18:18 +0200)]
nat: reapply respect udp checksum

Type: fix

Signed-off-by: Filip Varga <fivarga@cisco.com>
(cherry picked from commit 16572355c9069e2e8e4836dc6bd6a65feed2d390)
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I119ee45f7007e0a689d46c9f75eb6314f15990e2

4 years agonat: revert respect udp checksum 25/23325/1
Ole Troan [Thu, 7 Nov 2019 21:15:47 +0000 (22:15 +0100)]
nat: revert respect udp checksum

This reverts commit 00be6b18862273f832bc524601a34448a61b0e3e.
Type: fix

Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ibef710319222e311bbdfd3221acc4df82139d12d

4 years agonat: respect udp checksum 71/23271/2
Filip Varga [Mon, 21 Oct 2019 16:18:00 +0000 (18:18 +0200)]
nat: respect udp checksum

Type: fix

Change-Id: I732be02d2e2b854eb589c3fa10f980ef2dbe8dfc
Signed-off-by: Filip Varga <fivarga@cisco.com>
(cherry picked from commit 16572355c9069e2e8e4836dc6bd6a65feed2d390)

4 years agonat: Revert "nat: respect udp checksum" 72/23272/2
Andrew Yourtchenko [Tue, 5 Nov 2019 17:34:08 +0000 (17:34 +0000)]
nat: Revert "nat: respect udp checksum"

This reverts commit 80276a7101f23ddd7207983f48f85422daf2cb7f.

The commit in master was found to be wrong, was reverted, and replaced by 16572355c9069e2e8e4836dc6bd6a65feed2d390

This reverts the corresponding commit in stable/1908, to replace with the correct fix.

Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Idc27c0d81edf2263e523088f7ee7b66655db20f1

4 years agoapi: Add API support for PP2 plugin to stable/1908 74/23074/3
Jianlin Lv [Wed, 30 Oct 2019 05:35:38 +0000 (13:35 +0800)]
api: Add API support for PP2 plugin to stable/1908

Support create/delete interface with marvell PP2 API

Type: feature

Signed-off-by: Jianlin Lv <Jianlin.Lv@arm.com>
Change-Id: I2a81024e0fcf2f389d39a5498167a752f8f807e5

4 years agodpdk: fix tso not properly check the 'enable-tcp-udp-checksum' option issue 00/23200/2
Chenmin Sun [Thu, 10 Oct 2019 16:28:13 +0000 (00:28 +0800)]
dpdk: fix tso not properly check the 'enable-tcp-udp-checksum' option issue

Type: fix

Fix tso did not properly check the 'enable-tcp-udp-checksum' option issue
Add description of 'tso' and 'enable-tcp-udp-checksum' in startup.conf

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: Id659067a9fa9e1db6c3f8dc533a2e90351b86831
(cherry picked from commit 5bec5f7860dafcef6aefd50b74de15d08910c6f4)

4 years agovlib: only dump 1st buffer in chain by default 99/23199/2
Benoît Ganne [Mon, 21 Oct 2019 13:13:54 +0000 (15:13 +0200)]
vlib: only dump 1st buffer in chain by default

Several nodes include buffers in their traces, but only the 1st. When
formatting the trace we must not try to iterate through all chained
buffers.
Default to display only the 1st buffer.

Type: fix

Change-Id: Ib3c668bbf4ab70ae68eba2ac402c7b7329825b70
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 4354317bf3592d81fcafd94e33b320c3e49f45d3)

4 years agoipsec: fix esp trace seq number overflow 98/23198/2
Benoît Ganne [Tue, 29 Oct 2019 10:13:05 +0000 (11:13 +0100)]
ipsec: fix esp trace seq number overflow

Do not copy invalid seq number if packet is too small.

Type: fix

Change-Id: I1e78f5920e9645521f57efccaf35bbf9ce0676a8
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit c520fe7ab9db6fa60f9e69be990dd5c83eb40522)

4 years agosession: fix dispatch event logging 97/23197/2
Florin Coras [Thu, 31 Oct 2019 00:11:53 +0000 (17:11 -0700)]
session: fix dispatch event logging

Type: fix

Change-Id: Icf3c73cd7eb7565ed6e1b0371da172b5408a9d36
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit ba13c3b3695cb4758848d856174b725afcc7cdb8)

4 years agotcp: track lost rxt segments in byte tracker 96/23196/2
Florin Coras [Tue, 22 Oct 2019 20:34:30 +0000 (13:34 -0700)]
tcp: track lost rxt segments in byte tracker

Type: feature

Change-Id: I18dfac9c3d2f539edf20dba64cd2b7b541154144
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 46ec6e018e95a10d46d018dbc15d90c309b5dccc)

4 years agovlib: fix subclass name being truncated in output 95/23195/2
Paul Vinciguerra [Wed, 30 Oct 2019 18:43:08 +0000 (14:43 -0400)]
vlib: fix subclass name being truncated in output

Type: fix

Change-Id: I50816cca4eb88f58209138a348fc5954ab835f5b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit c9832e3df839d164a801b57cd5f4ee014efe496b)

4 years agodns: fix typo in counter 94/23194/2
Paul Vinciguerra [Wed, 30 Oct 2019 19:03:56 +0000 (15:03 -0400)]
dns: fix typo in counter

Type: fix

Change-Id: Id8a0ce8278816d2839d229799daa3735a097bc7b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit e74718fa987df415f2e2c6509461b2b3a9936331)

4 years agol2: fix typo in doxygen 93/23193/2
Paul Vinciguerra [Wed, 30 Oct 2019 19:07:20 +0000 (15:07 -0400)]
l2: fix typo in doxygen

Type: style

Change-Id: I286280fffa6ab5d3e15986911a4ccc35efbf41c3
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit ddbd90aae332e6c4b59e35bf44a735e592a3a053)

4 years agoip: cleanup typos in documentation 92/23192/2
Paul Vinciguerra [Sat, 26 Oct 2019 23:34:40 +0000 (19:34 -0400)]
ip: cleanup typos in documentation

Type: style

Change-Id: I7d44b7fab1b8b196e4934cb4832ee51084c5bf98
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 5b755e2f9fce239b5280ac1e5e21f835464fa017)

4 years agotcp: rx fifo size is u32 91/23191/2
Dave Wallace [Wed, 30 Oct 2019 17:25:24 +0000 (17:25 +0000)]
tcp: rx fifo size is u32

- Limit cli input for rx fifo size to u32

Type: fix

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

4 years agotls: fix on tcp connection reset 90/23190/2
Zeyu Zhang [Sat, 12 Oct 2019 06:21:59 +0000 (14:21 +0800)]
tls: fix on tcp connection reset

VPP would fail in tcp_connection_reset() if the tls
or app session was just created.

Type: fix

Change-Id: I45d107f57e4f3fc468c15ca3392d5e1c413bd690
Signed-off-by: Zeyu Zhang <zeyu.zhang@intel.com>
(cherry picked from commit cbbc4a2558eca8d78e0bd713ff58c54e294b1819)

4 years agolisp: fix lisp-gpe db hash 89/23189/2
Benoît Ganne [Tue, 29 Oct 2019 10:19:52 +0000 (11:19 +0100)]
lisp: fix lisp-gpe db hash

lgt->key is already a pointer to the key, hash the pointed data instead
of the pointer value.

Type: fix

Change-Id: I4d29d8c6519afc3843cb2e5ef88795d60f715e23
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 0c4def0e84e3f563d9b2729f16b159f18d382602)

4 years agovcl: handle rx notifications on reused sessions 88/23188/2
Florin Coras [Mon, 28 Oct 2019 20:22:37 +0000 (13:22 -0700)]
vcl: handle rx notifications on reused sessions

Type: fix

Ignore events on sessions that have been reused but not fully
initialized.

Change-Id: Ided020eb5245d665d0a2e4a9e1f8a6dddebae009
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit bd52e46fe8193182cce150292e9df1c517795011)

4 years agosession: allow transport cleanup only if not deleted 87/23187/2
Florin Coras [Mon, 28 Oct 2019 15:46:37 +0000 (08:46 -0700)]
session: allow transport cleanup only if not deleted

Type: fix

Change-Id: I51282182952a66be698226bace39626df4d67b9f
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 5afea129ed0c85f5313791d1d55fed6cdcc079c7)

4 years agotests: make RA tests run on VPP time 86/23186/2
Andrew Yourtchenko [Sun, 13 Oct 2019 18:56:03 +0000 (18:56 +0000)]
tests: make RA tests run on VPP time

the IPv6 RA tests take timing into the account,
but the time inside VPP may go slightly differently compared
to the time inside the driving python thread,
if the machine running the tests is heavily loaded.
Make a sleep function which sleeps "on VPP time" and use it.

Change-Id: I3b34b0164f6e0ec7a619b92ee308089a4a8935e3
Type: test
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 63cb8827e586f02f53512d23a8e7596fe9c19aa8)

4 years agovlib: unix trivial- clean up typos in docs 85/23185/2
Paul Vinciguerra [Sun, 27 Oct 2019 18:00:53 +0000 (14:00 -0400)]
vlib: unix trivial- clean up typos in docs

seen while reading through the code.

Type: style

Change-Id: I7a2f021b9f06d0eebb2ea3d0cafb6955ccb14781
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit d29422cbeeefb58d0213b295b35d04a673b380e7)

4 years agoip: trivial typos in docs 84/23184/2
Paul Vinciguerra [Fri, 18 Oct 2019 01:08:17 +0000 (21:08 -0400)]
ip: trivial typos in docs

Type: style

Change-Id: I620f15b96ee5401e0145a139f06d343d7c4fadb4
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit f158944cc4f1bfcc21bed16f5c6f9177734adecd)

4 years agotcp: avoid sending acks when data available 82/23182/2
Florin Coras [Thu, 17 Oct 2019 02:28:17 +0000 (19:28 -0700)]
tcp: avoid sending acks when data available

Type: fix

Change-Id: I02e2cb2d349f9ddb2bfed040a08ca448f379d565
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit cb711a4ec908b89edc9da29d3c2e093dab85fbbf)

4 years agosession: avoid old io dispatch if no slots left to send 42/23142/2
Ryujiro Shibuya [Wed, 9 Oct 2019 01:54:04 +0000 (02:54 +0100)]
session: avoid old io dispatch if no slots left to send

Type: fix

Signed-off-by: Ryujiro Shibuya <Ryujiro.Shibuya@owmobility.com>
Change-Id: I8e1f6cbd905ad5c21aed1b2e358540d0fbd7fc47
(cherry picked from commit 2a1118411deed799e079bf34d3f6d8bccb37f8c5)

4 years agogso: fix buffers trace 48/23148/2
Andrew Yourtchenko [Thu, 31 Oct 2019 15:44:02 +0000 (15:44 +0000)]
gso: fix buffers trace

When segmenting, new buffers must inherit the original buffer trace
handle.

Type: fix

Change-Id: Ibd1859a501b2862906dfc563b98652cfee5681da
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
4 years agoipsec: fix tunnel protection removal 26/22926/3
Filip Tehlar [Fri, 18 Oct 2019 22:24:41 +0000 (22:24 +0000)]
ipsec: fix tunnel protection removal

Type: fix

Change-Id: I4d5546d1f9b3a162291997f6f0c094c5c3d6cf31
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 89b24950005914317c142149fa1ba8a167a978ca)

4 years agordma: build: fix ibverb compilation test 64/23164/1
Benoît Ganne [Tue, 22 Oct 2019 14:55:19 +0000 (16:55 +0200)]
rdma: build: fix ibverb compilation test

Type: fix

Change-Id: Ib6389ecbcf4a1b7bae25b2bd9e7fbdec49545aaa
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 386ebb6e2baa7d3b2535d646c04ccf852f859869)

4 years agotcp: correct tcp connection lookup condition 57/23057/2
Ryujiro Shibuya [Mon, 28 Oct 2019 00:32:12 +0000 (00:32 +0000)]
tcp: correct tcp connection lookup condition

Type: fix

Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com>
Change-Id: Ibdbac568d5f765e6b5c959cab5e32dc33335064d
(cherry picked from commit c8be851161739d9f0b1c4bfbda4e991461ff0bc9)

4 years agonat: respect udp checksum 56/23056/2
Filip Varga [Mon, 21 Oct 2019 16:18:00 +0000 (18:18 +0200)]
nat: respect udp checksum

Type: fix

Change-Id: I73895fa0101bd50483160c8dc6faac2c67513077
Signed-off-by: Filip Varga <fivarga@cisco.com>
(cherry picked from commit 0d75f783644a24b219ed79d9f9c17387783f67ca)