vpp.git
3 years agovcl: fix ldp writev 0 vecs 65/28365/1
Florin Coras [Mon, 23 Mar 2020 16:00:35 +0000 (16:00 +0000)]
vcl: fix ldp writev 0 vecs

Type: fix

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

3 years agoavf: proper promisc handling 64/28364/2
Damjan Marion [Tue, 24 Mar 2020 12:51:13 +0000 (13:51 +0100)]
avf: proper promisc handling

Type: fix
Change-Id: Id20a0fe77372602fd211156ccee01c18d829d8df
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 1839fe165c7ffb834775b8582fe0ee2321ff2ab6)

3 years agovirtio: vhost gso checksum error when both indirect and mrg_rxbuf are off 63/28363/2
Steven Luong [Tue, 17 Mar 2020 16:01:30 +0000 (09:01 -0700)]
virtio: vhost gso checksum error when both indirect and mrg_rxbuf are off

Turn on gso, turn off both indirect and mrg_rxbuf caused traffic received
and sent with checksum error. The problem is we are not mapping the hdr
correctly in the shared memory address.

Type: fix

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

3 years agodpdk: false link down issue with ixgbe NIC 62/28362/2
Lijian.Zhang [Thu, 19 Mar 2020 02:22:52 +0000 (10:22 +0800)]
dpdk: false link down issue with ixgbe NIC

This issue is observed with X520-2 NICs on FD.io lab Taishan server.
After VPP booting up and bringing up  the interfaces with command "set
interface state <interface> up", it still shows link down status from
the command "show hardware-interfaces". However, the hardware link
status is actually up. dpdk_process() cannot get the hardware link
status correctly via rte_eth_link_get_nowait().

In ixgbe_dev_link_update_share(), if the media type is fiber and the
link is down, a flag (IXGBE_FLAG_NEED_LINK_CONFIG) is set. A callback to
ixgbe_dev_setup_link_alarm_handler() is scheduled trying to set up the
link and clear the flag afterwards.

If the device is started or stopped before the flag is cleared, the
scheduled callback is canceled. This causes the flag to remain set and
subsequent calls to ixgbe_dev_link_update_share() return without trying
to retrieve the link state because the flag is set.

When the callback is canceled by either interface start or stop
operation, in ixgbe_dev_cancel_link_thread(), after cancelling the
callback/thread, unset the flag on the device to avoid this condition.

Type: fix

Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
Reviewed-by: Jieqiang Wang <Jieqiang.Wang@arm.com>
Change-Id: I04de377dc048307a78a5b7109ebdfaf376d5e029
(cherry picked from commit 1690dcb49527934e83748e7b6db8501b33c3758a)

3 years agovlib: complain if workers are configured twice 61/28361/2
Vladimir Isaev [Tue, 17 Mar 2020 09:30:11 +0000 (12:30 +0300)]
vlib: complain if workers are configured twice

Right now following configuration leads to crash:
cpu {
    corelist-workers 2
    workers 2
}

because threads count will be set to 2, but we have only
one core in coremask.

Type: fix
Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: Ia93b892733971e7c8ddfceaaec5f4eb8bf9063ac
(cherry picked from commit 18a4a371646bccfd299e6a509e801a524aeb4c92)

3 years agovlib: fix error when creating avf interface on SMP system 60/28360/2
Jieqiang Wang [Mon, 13 Jan 2020 09:15:13 +0000 (17:15 +0800)]
vlib: fix error when creating avf interface on SMP system

On SMP architecture, '/sys/bus/pci/devices/<devices id>/numa_node' file
will return -1 as a valid value if it does not have any NUMA node information.
Using -1 as a valid node id to access data structures will cause memory issue.
Fix the error by setting the value of numa_node to 0 if '/sys/bus/pci/devices/
<devices id>/numa_node' returns -1 and it is a SMP system.

Type: fix

Change-Id: Ib60e79c3656fe5b17e08fd9011122683e8b08b6f
Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
(cherry picked from commit 76c6159d83c2dfe29f84dc4b05d399cdbbdf2878)

3 years agoip: provide extern declaration for ip punt nodes 59/28359/2
Jawahar Santosh Gundapaneni [Thu, 19 Mar 2020 20:42:28 +0000 (16:42 -0400)]
ip: provide extern declaration for ip punt nodes

Type: fix

Signed-off-by: Jawahar Santosh Gundapaneni <jgundapa@cisco.com>
Change-Id: Ife0f7749a72cc834a3d811f8cf6b5a0840157014
(cherry picked from commit 62ad2aaff3810f4ec0f010700091c2f59fbfe466)

3 years agotcp: count dupacks with no sacks 58/28358/2
Florin Coras [Thu, 12 Mar 2020 15:50:57 +0000 (15:50 +0000)]
tcp: count dupacks with no sacks

Type: fix

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

3 years agoethernet: Copy only 6 bytes of mac address into a u64 57/28357/2
Jon Loeliger [Mon, 9 Mar 2020 18:13:35 +0000 (13:13 -0500)]
ethernet: Copy only 6 bytes of mac address into a u64

Rather than leaving 2 bytes of junk in the upper word
of a mac address represented as a u64, zero them out.
That way later compairsons stand a chance of matching
when deleting a bridge's arp termination entries.

The volatile qualifier shouldn't be needed here, but
without it the compiler removes the clib_memcpy() at -O2.
Bad compiler.  No biscuit.

Type: fix
commit: faf22cb303b65e2a6bf8dad959d7f5ee6d031c4f

Change-Id: Iebcf35fdd421293dccbcaefadef767f7e139438e
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit 6a32ce326495bfe48ebef74dfbb8a9c1cf37a530)

3 years agopg: update packet generator test scripts 56/28356/2
ShivaShankarK [Wed, 18 Mar 2020 10:04:11 +0000 (15:34 +0530)]
pg: update packet generator test scripts

update packet generator test scripts to reflect latest code changes

Type: fix

Signed-off-by: ShivaShankarK <shivaashankar1204@gmail.com>
Change-Id: I048a5e8b9b0506dcb0b664e5549d13f51b2e2ea6
(cherry picked from commit b0f956c255de7aa61fead96b7b94bcf937d92c05)

3 years agolb: fix coverity warning 54/28354/1
Dave Barach [Tue, 10 Mar 2020 11:13:20 +0000 (07:13 -0400)]
lb: fix coverity warning

Type: fix
Ticket: VPP-1837
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I357eb72d478d8175ab9c7cf502d312ab3112213e
(cherry picked from commit a53068905eb3f005a5a6d324c37f51056fb49b3e)

3 years agoudp: fix UDP socket byte order in lookup 52/28352/1
Andreas Schultz [Mon, 9 Mar 2020 10:36:15 +0000 (11:36 +0100)]
udp: fix UDP socket byte order in lookup

The port registry uses host byte order for while the session API
uses network order. In a single place the conversion was missing.

Type: fix
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
Change-Id: Ic8cfe2cb4e0711b3e0614060ff6b4f2fe4ed4391
(cherry picked from commit 49a11cff8e7892858d946d3f93ae19502236c358)

3 years agomisc: Fix vpp-selinux-policy dependency on CentOS 8 51/28351/1
Renato Botelho do Couto [Fri, 6 Mar 2020 19:42:22 +0000 (13:42 -0600)]
misc: Fix vpp-selinux-policy dependency on CentOS 8

policycoreutils-python is now called python3-policycoreutils on
CentOS 8.

Type: fix

Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
Change-Id: I46264c66a2a719d546e0926f3bd716e986461963
(cherry picked from commit 1d94ab5f1b4557c9e017af7e9da0f821cae1fa72)

3 years agofib: path flag FIB_API_PATH_TYPE_INTERFACE_RX not copied to client 50/28350/1
IJsbrand Wijnands [Thu, 5 Mar 2020 14:25:32 +0000 (06:25 -0800)]
fib: path flag FIB_API_PATH_TYPE_INTERFACE_RX not copied to client

This path flag FIB_API_PATH_TYPE_INTERFACE_RX is not copied to the client bin_api.

Type: fix

Change-Id:

Signed-off-by: IJsbrand Wijnands <ice@cisco.com>
Change-Id: I612044d2f564c852f83fceb63ce750a6330e1365
(cherry picked from commit 79437c8dbc707e6f60e7a2425fac15c4153f71b3)

3 years agovppapigen: crc is a negative value for some messages when using python 2.7 49/28349/1
Mark Nelson [Wed, 4 Mar 2020 20:32:09 +0000 (15:32 -0500)]
vppapigen: crc is a negative value for some messages when using python 2.7

Type: fix

Signed-off-by: Mark Nelson <manelso2@cisco.com>
Change-Id: I4f121e49d3c05c21eed3fed2469bd88fc84e2271
(cherry picked from commit ea2abbaeaf34a4652e970fd1e2f60c0d377ebde4)

3 years agoebuild: fix the distclean target 48/28348/1
Dave Barach [Fri, 28 Feb 2020 14:50:33 +0000 (09:50 -0500)]
ebuild: fix the distclean target

Type: fix

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

3 years agovppapigen: list imports in JSON 47/28347/1
Ondrej Fabry [Mon, 3 Feb 2020 22:25:23 +0000 (23:25 +0100)]
vppapigen: list imports in JSON

Type: fix

Change-Id: If50477f2487d8c13f91c119a1492370e6e937904
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
(cherry picked from commit eec5d48040695e45c4880adb59bb18ebacd667c1)

3 years agolb: Fix generating illegal key in per-port vip 46/28346/1
Yasuhiro Nakamura [Mon, 17 Feb 2020 04:03:38 +0000 (13:03 +0900)]
lb: Fix generating illegal key in per-port vip

VIP prefix index becomes always 0 when adding a VIP which is already registered different port, causing LB config crash.
This change assigns the same VIP prefix index to the same VIP.

Ticket: https://jira.fd.io/browse/VPP-1834
Type: fix

Signed-off-by: Yasuhiro Nakamura <yanakamu@yahoo-corp.jp>
Change-Id: Ib63b3e58db9bd85714d68cd1292aadd0c8580da8
(cherry picked from commit 551775eaaa9c162c73e15690e4d7580935e9a70a)

3 years agovat: add ip api types parser definitions 45/28345/1
Jakub Grajciar [Wed, 26 Feb 2020 10:01:43 +0000 (11:01 +0100)]
vat: add ip api types parser definitions

build vat with src/vnet/ip/ip_types_api.c

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Iab0f18bf7a89cf9512beab0629bc3a349edec383
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
(cherry picked from commit 23a386b71b287bc95000a8980856c5dbe7cdaf5a)

3 years agomap: handle IPv6 extension headers for TCP/UDP 44/28344/1
Vladimir Isaev [Wed, 26 Feb 2020 10:21:35 +0000 (13:21 +0300)]
map: handle IPv6 extension headers for TCP/UDP

Without this patch offset for TCP/UDP headers was not calculated
correctly if there is one or more IPv6 extension headers.

Type: fix
Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: I04d6f5e42f8f072987192d6236085afbd74a4420
(cherry picked from commit 7d4cd0cf6f1a94953ef97ab885752424dea6948c)

3 years agounittest: Skip string test case for sizeof (src) > sizeof (dst) 43/28343/1
Steven Luong [Tue, 25 Feb 2020 19:06:17 +0000 (11:06 -0800)]
unittest: Skip string test case for sizeof (src) > sizeof (dst)

coverity complains that the subject test may cause dst buffer overrun
problem and it is right. The problem is when __builtin_constant_p (n)
returns true, memcpy_s_inline skips all the errors checking and does the
copy blindly. Please see the code in memcpy_s_inline.

The fix is to skip the subject test when the aformentioned builtin function
returns true.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I50de91cc0c853a134b3bcf3b0cd8d45d7668b092
(cherry picked from commit 2da39718f560478678caacccd198ee4c0c9673c3)

3 years agocrypto-openssl: fix coverity warnings 38/28338/2
Filip Tehlar [Mon, 24 Feb 2020 21:06:38 +0000 (21:06 +0000)]
crypto-openssl: fix coverity warnings

Type: fix

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

3 years agotcp: remove useless prediction 37/28337/2
Simon Zhang [Sat, 22 Feb 2020 19:51:42 +0000 (03:51 +0800)]
tcp: remove useless prediction

Type: fix

Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Change-Id: Ie2dc2653baec92347eb2cbcd197a2e5ec6a80c79
(cherry picked from commit 487507f40f4e443ff1e683641206db80875f3477)

3 years agogbp: Coverity warnings for unitialized variables 36/28336/2
Neale Ranns [Thu, 20 Feb 2020 12:56:22 +0000 (12:56 +0000)]
gbp: Coverity warnings for unitialized variables

Type: fix

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

3 years agofib: Uninitialised pad in the prefix (coverity warning) 35/28335/2
Neale Ranns [Thu, 20 Feb 2020 13:10:47 +0000 (13:10 +0000)]
fib: Uninitialised pad in the prefix (coverity warning)

Type: fix

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

3 years agoipip: Unintialized return variable (coverity warning) 34/28334/2
Neale Ranns [Thu, 20 Feb 2020 13:16:49 +0000 (13:16 +0000)]
ipip: Unintialized return variable (coverity warning)

Type: fix

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

3 years agoip: Unintialized variables in prefx setup (coverity warning) 33/28333/2
Neale Ranns [Thu, 20 Feb 2020 13:13:45 +0000 (13:13 +0000)]
ip: Unintialized variables in prefx setup (coverity warning)

Type: fix

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

3 years agotcp: fix coverity warning in bt 32/28332/2
Florin Coras [Thu, 20 Feb 2020 16:04:03 +0000 (16:04 +0000)]
tcp: fix coverity warning in bt

Type: fix

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

3 years agolisp: fix coverity warnings 31/28331/2
Florin Coras [Thu, 20 Feb 2020 16:11:23 +0000 (16:11 +0000)]
lisp: fix coverity warnings

Type: fix

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

3 years agofib: adjacency midchain teardown (VPP-1841) 30/28330/2
Neale Ranns [Tue, 18 Feb 2020 13:56:24 +0000 (13:56 +0000)]
fib: adjacency midchain teardown (VPP-1841)

Type: fix

Change-Id: I57f8bfbce4feed9d2775875cb8b1b729a47900a4
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 24064d02aa9810ebc64c16dc778a179bb0ef5483)
(cherry picked from commit 3ebebc3a2fe47f1222ba035e04ccd8caed0cf58f)

3 years agomap: honor pre-resolve param in map-t 29/28329/2
Alexander Chernavin [Tue, 11 Feb 2020 14:57:09 +0000 (09:57 -0500)]
map: honor pre-resolve param in map-t

With this commit, forward the translated packet directly to the
specified next-hop if pre-resolve param is enabled in MAP-T.

Type: fix

Change-Id: Ie26080c7820318c7982599577a4af6e4d01a0574
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
(cherry picked from commit f145c15631ba62e798395499f83a2f8a91ae83c7)
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
3 years agomisc: fix coverity warnings 28/28328/1
Dave Barach [Mon, 17 Feb 2020 14:13:26 +0000 (09:13 -0500)]
misc: fix coverity warnings

Add an ALWAYS_ASSERT (...) macro, to (a) shut up coverity, and (b)
check the indicated condition in production images.

As in:
 p = hash_get(...);
 ALWAYS_ASSERT(p) /* was ASSERT(p) */
 elt = pool_elt_at_index(pool, p[0]);

This may not be the best way to handle a specific case, but failure to
check return values at all followed by e.g. a pointer dereference
isn't ok.

Type: fix
Ticket: VPP-1837
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ia97c641cefcfb7ea7d77ea5a55ed4afea0345acb
(cherry picked from commit 47d41ad62c5d6008e72d2e9c137cf8f49ca86353)

3 years agotls: remove session lookup operation in TLS 27/28327/1
Yu Ping [Fri, 14 Feb 2020 11:14:36 +0000 (19:14 +0800)]
tls: remove session lookup operation in TLS

Type: fix

Change-Id: I50329bda365d98f9f9d56a58187fb4fb2a4eb461
Signed-off-by: Yu Ping <ping.yu@intel.com>
(cherry picked from commit 985d9293a08dc3da016fbeeaa3f8fff10e1b504e)

3 years agovcl: fix ldp read on closing session 26/28326/1
Florin Coras [Fri, 14 Feb 2020 05:33:46 +0000 (05:33 +0000)]
vcl: fix ldp read on closing session

Type: fix

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

3 years agodpdk: fix flow(with mark action) deletion crash issue 25/28325/1
Chenmin Sun [Mon, 20 Jan 2020 12:17:09 +0000 (20:17 +0800)]
dpdk: fix flow(with mark action) deletion crash issue

Type: fix

this patch fixes mark flow deletion crash issue, see below

test flow add src-ip any proto udp src-port 111 dst-port 222 mark 100
test flow enable index 0 1/1
test flow disable index 0 1/1
test flow enable index 0 1/1
test flow disable index 0 1/1 -> [crash]

This is because the code resets a wrong vector in flow lookup entry
recycle logic. See function dpdk_flow_ops_fn().

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

3 years agonsim: fix quad-loop packet trace 24/28324/1
Dave Barach [Thu, 13 Feb 2020 15:08:01 +0000 (10:08 -0500)]
nsim: fix quad-loop packet trace

Type: fix

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

3 years agovcl: clear accept msg flags 23/28323/1
Florin Coras [Thu, 13 Feb 2020 20:04:28 +0000 (20:04 +0000)]
vcl: clear accept msg flags

Type: fix

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

3 years agoapi: do not truncate api dump file size 22/28322/1
Benoît Ganne [Tue, 21 Jan 2020 17:35:49 +0000 (18:35 +0100)]
api: do not truncate api dump file size

Type: fix

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

3 years agosession: avoid scanning new io list under load 21/28321/1
Florin Coras [Sun, 9 Feb 2020 20:03:12 +0000 (20:03 +0000)]
session: avoid scanning new io list under load

Type: fix

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

3 years agovppinfra: remove unused variable from timing wheel 20/28320/1
Klement Sekera [Mon, 10 Feb 2020 11:51:05 +0000 (11:51 +0000)]
vppinfra: remove unused variable from timing wheel

Type: fix

Change-Id: I77b03efcac04cc46550d03657464ab8de5d7da78
Signed-off-by: Klement Sekera <ksekera@cisco.com>
(cherry picked from commit 90d28846f963a86d760b4a6b83aed62b862f1c61)

3 years agoip: fix ip-local errors 19/28319/1
Florin Coras [Tue, 11 Feb 2020 03:01:19 +0000 (03:01 +0000)]
ip: fix ip-local errors

Type: fix

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

3 years agovlib: Skip core 0 if workers are configured. 18/28318/1
Jon Loeliger [Fri, 31 Jan 2020 19:34:56 +0000 (13:34 -0600)]
vlib: Skip core 0 if workers are configured.

According to the description in the startup.conf, the assignment
of worker threads starts with the lcore following the main_lcore.
A non-zero skip_cores will correctly achieve this assignment.
However, prior to this patch when workers are assigned, the code
picks up and assigns core 0 even thought it shouldn't.
This patch determins if a non-zero number of workers are desired
and if so, marks CPU unavailable for a worker assignment.

Type: fix

Change-Id: I1fdf73a6f218dcbf146fda2efc90c553f7cd6d20
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit 4a06846dd668d7f687e6770215c38e8feb5f1740)

3 years agotcp: fix input error counters 17/28317/1
Florin Coras [Tue, 11 Feb 2020 02:42:36 +0000 (02:42 +0000)]
tcp: fix input error counters

Type: fix

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

3 years agoipsec: fix AES-GCM block size 16/28316/1
Damjan Marion [Mon, 10 Feb 2020 18:21:14 +0000 (19:21 +0100)]
ipsec: fix AES-GCM block size

Type: fix

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

3 years agoip6: fix l4 checksum with hop-by-hop header 15/28315/1
Matthew Smith [Wed, 5 Feb 2020 17:46:40 +0000 (11:46 -0600)]
ip6: fix l4 checksum with hop-by-hop header

L4 checksums for IPv6 should be calculated using a pseudo header that
includes the source/destination addresses, payload length, and payload
protocol.

ip6_tcp_udp_icmp_compute_checksum() was using the payload length and
protocol from the IPv6 header. If there is a hop-by-hop header (or any
other extension header), the payload length used for the pseudo header
should only include the upper layer header and payload and not the
extension header bytes. Same deal with the protocol, the upper layer
next header value should be used instead of the extension header.

Type: fix
Fixes: cb9cadad57

Change-Id: Ifa2c9ad41c0fc4eea674f0671255b637c8e01f71
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
(cherry picked from commit 97677a26f7c857e7ee0acbdb2c13eef214aa70a8)

3 years agofib: fix non-NULL terminated vectors in cli output 14/28314/1
Benoît Ganne [Tue, 4 Feb 2020 15:45:09 +0000 (16:45 +0100)]
fib: fix non-NULL terminated vectors in cli output

Type: fix

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

3 years agosvm: use default SVM address in fifo unit tests 13/28313/1
Benoît Ganne [Fri, 7 Feb 2020 10:59:32 +0000 (11:59 +0100)]
svm: use default SVM address in fifo unit tests

Using random addresses can confuse AddressSanitizer

Type: fix

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

3 years agovcl: fix session closing error 12/28312/1
Florin Coras [Mon, 3 Feb 2020 16:00:56 +0000 (16:00 +0000)]
vcl: fix session closing error

Type: fix

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

3 years agostats: fix state counter removal 11/28311/1
Vladimir Isaev [Tue, 4 Feb 2020 08:54:27 +0000 (11:54 +0300)]
stats: fix state counter removal

Avoid using vec_del1() for directory vector to keep indexes valid all
the time.

There are state counters for each slave in LACP bond mode which can be
dynamically created and removed. Vector index is used to access these
counters. But also vec_del1() is used to remove counter from vector.
This function changes the index of the last element, so after this we
are unable to access ex-last element using old index.

As a result it is not possible to add-del-add two interfaces to the LACP
bond:

DBGvpp# create bond mode lacp
BondEthernet0
DBGvpp# create packet-generator interface pg1
DBGvpp# create packet-generator interface pg2
DBGvpp# bond add BondEthernet0 pg1
DBGvpp# bond add BondEthernet0 pg2
DBGvpp# bond del pg1
DBGvpp# bond del pg2
DBGvpp# bond add BondEthernet0 pg1
DBGvpp# bond add BondEthernet0 pg2
bond add: /if/lacp/1/3/partner-state is already register

Type: fix

Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: I2c86e13905eefdef6233369cd4ab5c1b53d123bd
(cherry picked from commit 72e31bc2d9b910147c09e1c329713fccc873a018)

3 years agodpdk: patch ixgbe driver to solve race condition 10/28310/1
Matthew Smith [Fri, 31 Jan 2020 21:39:21 +0000 (15:39 -0600)]
dpdk: patch ixgbe driver to solve race condition

Type: fix

Some fiber ports that are managed by the ixgbe PMD have the
possibility to get into a state where link can never be brought up.

This patch should fix it and will be submitted to upstream DPDK.

Change-Id: Ia4d0df2e70d098b2151e513b96e8bd742151e8ce
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
(cherry picked from commit 0860b2e19365c092f10dd1ce639caaded0e87ded)

3 years agovirtio: vhost gso is broken in some topology 09/28309/1
Steven Luong [Thu, 30 Jan 2020 23:18:45 +0000 (15:18 -0800)]
virtio: vhost gso is broken in some topology

Recent modification added a call to vnet_gso_header_offset_parser in the
beginning of vhost_user_handle_tx_offload. The former routine may set tcp or
udp->checksum to 0. While it is appropriate to set it to 0 for the GSO packet,
it is broken and causes checksum error if the aformentiooned routine is called
by a non-GSO packet. The fix is to not call vhost_user_handle_tx_offload
if the buffer does not indicate checksum offload is needed.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I6e699d7a40b7887ff149cd8f77e8f0fa9374ef19
(cherry picked from commit 564e1672917e205d7ae79525bb937df18f8d764b)

3 years agomap: Prevent IPv4 prefix spoofing during IPv6 -> IPv4 08/28308/1
Jon Loeliger [Tue, 28 Jan 2020 13:30:28 +0000 (07:30 -0600)]
map: Prevent IPv4 prefix spoofing during IPv6 -> IPv4

Prevent malicious packets with spoofed embedded IPv4 addresses
by limiting the IPv6 ingress packets to known MAP-T domains.
Drop spoofed packets.

Add several tests that ensure spoofing isn't allowed.

Type: fix
Fixes: fc7344f9be

Change-Id: I80a5dd10d5fe7492e3a1b04de389d649a78065e2
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit 65866f03d96bd41b99b1c823ea6f38cd77fac58c)

3 years agosession tcp: fix packet tracing 07/28307/1
Florin Coras [Tue, 28 Jan 2020 03:21:28 +0000 (19:21 -0800)]
session tcp: fix packet tracing

Type: fix

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

3 years agosr: fix possible null-pointer dereference 06/28306/1
Ignas Bacius [Fri, 3 Jan 2020 13:05:46 +0000 (15:05 +0200)]
sr: fix possible null-pointer dereference

Steps to reproduce VPP crash:
1. configure localsid End behavior
2. ping the localsid address

Type: fix

Signed-off-by: Ignas Bacius <ignas@noia.network>
Change-Id: Id780e0875ec9cdb25252217990919fb3dddbf06a
(cherry picked from commit bd5c49a1615e36260a86184d087b5b47a5e747be)

3 years agoclassify: pcap / packet trace debug CLI bugs 05/28305/1
Dave Barach [Mon, 27 Jan 2020 14:56:58 +0000 (09:56 -0500)]
classify: pcap / packet trace debug CLI bugs

"classify filter trace ... " and "classify filter pcap ..." are
mutually exclusive.

vnet_pcap_dispatch_trace_configure needs to check for
set->table_indices == NULL.

Type: fix
Ticket: VPP-1827

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

3 years agointerface: Add missing ip4 udp->checksum = 0 prior to computing checksum 04/28304/1
Steven Luong [Mon, 27 Jan 2020 18:37:56 +0000 (10:37 -0800)]
interface: Add missing ip4 udp->checksum = 0 prior to computing checksum

For ip4 tcp, ip6 tcp, and ip6 udp packet, we set checksum = 0 prior to
computing the checksum. We missed ip4 udp case. This oversight requires all
clients to set udp->checksum = 0 if ip4 udp checksum offload is needed.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ic608811e82099f3bec469e123671e9b281f38d76
(cherry picked from commit 03328ec8bb86b93fa70bb6b2a9b37c40e686a1f7)

3 years agomap: api: fix tag overflow and leak 03/28303/1
Benoît Ganne [Tue, 21 Jan 2020 17:24:44 +0000 (18:24 +0100)]
map: api: fix tag overflow and leak

The 'tag' parameter is expected to be a NULL-terminated C-string in
callees:
 - make sure it is null-terminated in both API and CLI cases
 - do not allocate & copy the string into a non-NULL-terminated vector
   in API case
 - fix leak in CLI case

Type: fix

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

3 years agosession: fix node runtime in pre-input queue handler 02/28302/1
Florin Coras [Wed, 18 Dec 2019 17:38:40 +0000 (09:38 -0800)]
session: fix node runtime in pre-input queue handler

Call session queue node with the right node runtime instead of the
pre-input node runtime.

Type: fix

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

3 years agovcl: always report EPOLLHUP/EPOLLRDHUP on close 01/28301/1
Florin Coras [Wed, 22 Jan 2020 15:32:12 +0000 (07:32 -0800)]
vcl: always report EPOLLHUP/EPOLLRDHUP on close

Type: fix

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

3 years agonsim: enable output scheduling on main thread 00/28300/1
Dave Wallace [Tue, 21 Jan 2020 16:56:19 +0000 (16:56 +0000)]
nsim: enable output scheduling on main thread

Type: fix

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

3 years agoclassify: fix pcap filter set init 99/28299/1
Florin Coras [Thu, 16 Jan 2020 19:15:54 +0000 (11:15 -0800)]
classify: fix pcap filter set init

Type: fix

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

3 years agolb: fix that lb_add_del_vip and lb_add_del_as api doesn't work correctly 98/28298/1
Yulong Pei [Wed, 8 Jan 2020 17:12:43 +0000 (01:12 +0800)]
lb: fix that lb_add_del_vip and lb_add_del_as api doesn't work correctly

Currently if user want to set ip4 address to the api, it must convert to ip6
format, e.g. user want to ip4 "90.1.2.1" but must convert to "::5A01:0201",
it is not acceptable, this fix solved the issue.

Ticket: FDIO-753
Type: fix

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

3 years agosr: some fixes for SRv6 CLI/API 97/28297/2
Ahmed Abdelsalam [Sun, 8 Dec 2019 11:58:27 +0000 (12:58 +0100)]
sr: some fixes for SRv6 CLI/API

Return FIB table_id instead of vrf_index to clients

Type: fix
Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
Change-Id: I76a97bad3ecd3ac8eb045efb1657eaa90c2a57b6
(cherry picked from commit 13e6fce7c5b3a16a6af0b27fc259ef3f65d8c861)

3 years agotcp: fix rxt delivered without sacks 96/28296/3
Florin Coras [Wed, 15 Jan 2020 20:18:35 +0000 (20:18 +0000)]
tcp: fix rxt delivered without sacks

Type: fix

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

3 years agovcl: add rx event on epoll ctl if needed 94/28294/3
Florin Coras [Wed, 15 Jan 2020 01:30:46 +0000 (01:30 +0000)]
vcl: add rx event on epoll ctl if needed

Type: fix

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

3 years agoudp: fix ipv6 listen port registration 93/28293/3
Florin Coras [Wed, 15 Jan 2020 02:32:07 +0000 (02:32 +0000)]
udp: fix ipv6 listen port registration

Type: fix

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

3 years agovppinfra: fixing compilation issues in 32-bit 92/28292/3
Vijayabhaskar Katamreddy [Wed, 15 Jan 2020 21:45:19 +0000 (13:45 -0800)]
vppinfra: fixing compilation issues in 32-bit

Fixing compilation issuues for 32-bit also setting init flag for shm based bihash

Type: fix
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
Change-Id: Ic2072c5ba7fc77d061ca9f1b844a71f6e22e58b2
(cherry picked from commit f0bae64f6fd4c410c19f6ece688443f389932688)

3 years agobuild: Add missing version.h dependency in vnet 91/28291/3
Chris Luke [Thu, 16 Jan 2020 01:30:04 +0000 (20:30 -0500)]
build: Add missing version.h dependency in vnet

Two modules in vnet include vpp/app/version.h but there is
no explicit build dependency for this generated file. This
leaves a race condition in the build system that the Coverity
build has recently started triggering.

Change-Id: I8e2bb32feeb16e1bdd8efb0d2633cfdba60f51aa
Type: fix
Signed-off-by: Chris Luke <chrisy@flirble.org>
(cherry picked from commit c171d01cdb5183c8bf640951e94af6b1fd5e3efc)

3 years agotcp: fix tcp check tx offload issue 90/28290/3
Simon Zhang [Tue, 24 Dec 2019 12:02:20 +0000 (20:02 +0800)]
tcp: fix tcp check tx offload issue

Type: fix

Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Change-Id: I3b8755831d762abf51e1cbe1b57024f9297de9a4
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
(cherry picked from commit 79bfb9e09c7bf2072d34b2ed6159ba11815dab3a)

3 years agotls: enable async node on demand 89/28289/3
Yu Ping [Tue, 14 Jan 2020 22:24:44 +0000 (06:24 +0800)]
tls: enable async node on demand

Type: fix

Change-Id: Iab7c65614c94497e8ec5a96624be72c1a139e486
Signed-off-by: Yu Ping <ping.yu@intel.com>
(cherry picked from commit d63b356bdf29fbb80f810d341dcaf8f5f92121c1)

3 years agoip6: during icmp to icmp6 translation truncate error messages 88/28288/3
Alexander Chernavin [Wed, 15 Jan 2020 11:45:47 +0000 (06:45 -0500)]
ip6: during icmp to icmp6 translation truncate error messages

All translated ICMPv6 packets that exceed the minimal IPv6 MTU get
truncated but according to RFC 4443 2.4 only ICMPv6 error messages
(type < 128) need to be truncated.

With this commit, truncate only ICMPv6 error messages.

Type: fix

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

3 years agotcp: handle ack advancement with no holes and reneging 87/28287/3
Florin Coras [Wed, 8 Jan 2020 22:01:54 +0000 (22:01 +0000)]
tcp: handle ack advancement with no holes and reneging

Type: fix

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

3 years agodocs: fix vpp-make-test-docs-merge-1908 doc upload 84/28284/3
Dave Wallace [Wed, 12 Aug 2020 14:11:25 +0000 (14:11 +0000)]
docs: fix vpp-make-test-docs-merge-1908 doc upload

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I77929b7067b11015e66ee3e24f63a377b1f788e2

3 years agodpdk: enforce max tx retries 86/28286/2
Benoît Ganne [Tue, 7 Jan 2020 12:40:17 +0000 (13:40 +0100)]
dpdk: enforce max tx retries

n_retry was never decremented and so never enforced.

Type: fix

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

3 years agoct6: dst,src copy typo 85/28285/2
Neale Ranns [Tue, 7 Jan 2020 01:41:16 +0000 (01:41 +0000)]
ct6: dst,src copy typo

Type: fix

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

3 years agotls: enable TLS OpenSSL plugin works in 3.0.0 83/28283/2
Yu Ping [Thu, 9 Jan 2020 19:45:06 +0000 (03:45 +0800)]
tls: enable TLS OpenSSL plugin works in 3.0.0

Type: fix

Change-Id: Id1602981fcc6efed1b0efe79a1fc8177457acdb5
Signed-off-by: Yu Ping <ping.yu@intel.com>
(cherry picked from commit 1c6486f7b8a00a1358d5c8f4ea1d874073bbcd6c)

3 years agoip: avoid fib lookup for consecutive pkts having same source IP 82/28282/2
Nitin Saxena [Sat, 4 Jan 2020 06:58:42 +0000 (12:28 +0530)]
ip: avoid fib lookup for consecutive pkts having same source IP

Type: fix
Fixes: be2286b0

This patch does following:

- If terminating frame has consecutive packets with same source IP, this patch
  avoids fib lookup for those packets in ip4-local node. This drops cycle count
  for ip4-local node on both ARM and x86. It being done by enabling dead code in
  else {} case of ip4_local_check_src_x2() and ip4_local_check_src() functions.

- In case all packets in terminating frame have unique source IP (e.g:
  incrementing), ip4-local is costlier by 2 cycles (broadwell)

Change-Id: I472ddc324716cec8bfe601568b8aeb7565f97ab3
Signed-off-by: Nitin Saxena <nsaxena@marvell.com>
(cherry picked from commit 2d18d2ea9f0e3d6c47d365ec135af651b14e8165)

3 years agofib: leverage well-optimized clib_memcpy 81/28281/2
Zhiyong Yang [Thu, 9 Jan 2020 09:20:57 +0000 (04:20 -0500)]
fib: leverage well-optimized clib_memcpy

Type: fix

Change-Id: I684910837ca4d9c8a07262459158bbb0423a33af
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
(cherry picked from commit d3d7ef5ec828ec895c6f90090118782e497b9084)

3 years agosession: remove io event dispatch dbg msg 80/28280/2
Florin Coras [Thu, 9 Jan 2020 16:41:31 +0000 (16:41 +0000)]
session: remove io event dispatch dbg msg

Type: fix

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

3 years agotcp: fix persist assert 79/28279/2
Florin Coras [Wed, 8 Jan 2020 23:30:15 +0000 (23:30 +0000)]
tcp: fix persist assert

Type: fix

Persist and retransmit can pop at the same time.

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

3 years agotcp: fix scoreboard assert 78/28278/2
Florin Coras [Wed, 8 Jan 2020 18:49:59 +0000 (18:49 +0000)]
tcp: fix scoreboard assert

Type: fix

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

3 years agotcp: fix last sacked with no holes 77/28277/2
Florin Coras [Wed, 8 Jan 2020 00:33:02 +0000 (00:33 +0000)]
tcp: fix last sacked with no holes

Type: fix

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

3 years agovppinfra: retry socket connect on EAGAIN 74/28274/2
Florin Coras [Mon, 6 Jan 2020 20:23:07 +0000 (20:23 +0000)]
vppinfra: retry socket connect on EAGAIN

Type: fix

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

3 years agosvm: fix eventfd signal write error check 73/28273/2
Florin Coras [Wed, 8 Jan 2020 02:37:57 +0000 (02:37 +0000)]
svm: fix eventfd signal write error check

Type: fix

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

3 years agovlib: fix coverity warning / real bug 72/28272/2
Dave Barach [Tue, 7 Jan 2020 17:29:10 +0000 (12:29 -0500)]
vlib: fix coverity warning / real bug

The path must be next-to-impossible to hit, because the code has been
wrong for at least 5 years.

Type: fix

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

3 years agotls: Make tls CPS test run for a quite long time 71/28271/2
Yu Ping [Mon, 6 Jan 2020 20:02:55 +0000 (04:02 +0800)]
tls: Make tls CPS test run for a quite long time

Type: fix

Change-Id: I8cfb48bd7f92689b296861dd368186408918061b
Signed-off-by: Yu Ping <ping.yu@intel.com>
(cherry picked from commit a9ed934745403461834b4361f06bd3865682f368)

3 years agotcp: fix duplicate sack whith reneging 70/28270/2
Florin Coras [Sat, 4 Jan 2020 00:53:04 +0000 (00:53 +0000)]
tcp: fix duplicate sack whith reneging

Type: fix

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

3 years agotcp: fix rate samples for old acks 69/28269/2
Florin Coras [Mon, 23 Dec 2019 18:03:27 +0000 (10:03 -0800)]
tcp: fix rate samples for old acks

Type: fix

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

3 years agobuild: Fix Subject-line feature list extraction 68/28268/2
Jon Loeliger [Tue, 26 Nov 2019 14:11:11 +0000 (08:11 -0600)]
build: Fix Subject-line feature list extraction

Bang on sed until a better incantation appears.

Change-Id: Ib8ad0996b6325db0fe983c86dd7dc553c9d388c4
Type: fix
Fixes: 26ce6ca1fe6f524a9049444fe8d55042fd7530a6
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit 171577e129363aec30640a50f91cf0ff46d61bb9)

3 years agosvm: broadcast on raw dequeues and full rings 67/28267/2
Florin Coras [Fri, 27 Dec 2019 18:26:56 +0000 (10:26 -0800)]
svm: broadcast on raw dequeues and full rings

Type: fix

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

3 years agovcl: hold errno when calling LDBG 66/28266/2
hanlin [Mon, 30 Dec 2019 08:25:20 +0000 (16:25 +0800)]
vcl: hold errno when calling LDBG

Type: fix

Call trace of LDBG:
LDBG->clib_warning->_clib_error->dispatch_message->os_puts->writev
However, writev will hijacked by LDP, and then execute following code:
if ((errno = -ldp_init ()))
    return -1;
Now, errno will be set.

Because we always call LDBG just before return from ldp_accept4, listen,
and etc. So errno will be overwritted after LDBG called.

Signed-off-by: hanlin <hanlin_wang@163.com>
Change-Id: I7a90f3a14772994f11f09650481411796e3f5630
(cherry picked from commit 9f3f18f99fd321cdcfc331e92b10b64f0ef590b3)

3 years agovcl: EPOLLOUT should be generated when epoll_ctl called with EPOLLOUT 65/28265/2
hanlin [Thu, 26 Dec 2019 03:44:28 +0000 (11:44 +0800)]
vcl: EPOLLOUT should be generated when epoll_ctl called with EPOLLOUT
event

Type: fix

When we call epoll_ctl to add or mod fd with EPOLLOUT event, mostly to
check if we can write. So we expect a EPOLLOUT event should be generated
immediately unless tx queue is full.

Signed-off-by: hanlin <hanlin_wang@163.com>
Change-Id: Ie99986a44dbb07b6ff2fba6512171056f79e77bd
(cherry picked from commit 475c9d7bcd0f2ceca77022eaef67ad9a84365609)

3 years agotcp: accept sack reneging as a cc event 64/28264/2
Florin Coras [Sun, 22 Dec 2019 17:20:26 +0000 (09:20 -0800)]
tcp: accept sack reneging as a cc event

Type: fix

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

3 years agointerface: Prevent bad inner-dot1q any exact-match configuration 63/28263/2
Jon Loeliger [Thu, 19 Dec 2019 15:03:52 +0000 (09:03 -0600)]
interface: Prevent bad inner-dot1q any exact-match configuration

Someone much more knowledgeable than I wrote:

    For L3 IP forwarding, any VLAN tags on a packet must be exact
    match to a sub-interface which means both outer and inner VLAN
    tag IDs must be exact-matched to specific values defined of that
    sub-interface.  Without exact match on a L3 sub-interface, VPP
    has no mechanism to know what VLAN tags to use for packet output,
    such as ARP request packets or IP packets, on that sub-interface.

    Thus, sub-interface with "inner-dot1q any" is not an exact match
    sub-interface by definition since no match is present on inner
    tag.

While in the area, fix a memory leak that would ensue on poorly
configured interfaces.

Change-Id: I8d17a96dbca3e3724c297ecc935ca61764e6ce2e
Type: fix
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit b22e1f06bbebc48ec72ce8effa529e69ffbb12ca)

3 years agobuild: use cmake build types 07/23507/3
Damjan Marion [Thu, 7 Nov 2019 10:32:16 +0000 (11:32 +0100)]
build: use cmake build types

Type: make

Change-Id: If822c85d6ff26982516ea1d597ca81aa84773b2b
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 2baa115da3b752cd7e44cc477f2c45bda22d444b)

3 years agogtpu: Track the dst FIB entry instead of RR sourcing that 62/28262/1
Miklos Tirpak [Thu, 19 Dec 2019 11:06:20 +0000 (12:06 +0100)]
gtpu: Track the dst FIB entry instead of RR sourcing that

RR sourcing the destination FIB entry limits the number of tunnels
to 255 for a particular destination. This change removes this limit.

Type: fix

The patch is based on 1f50bf8fc57ebf78f9056185a342493be460a847
that introduced the FIB entry tracking but did not update
the gtpu plugin.

Signed-off-by: Miklos Tirpak <miklos.tirpak@gmail.com>
Change-Id: I8a4a87382a6eb5120e2bb65b9bc3c446bbfdbd3b
(cherry picked from commit 75c72369186f6341a13374d2dd6e60ce3c7a88a6)

3 years agomisc: don't os_exit(1) causing core on SIGINT 61/28261/1
Christian E. Hopps [Fri, 27 Sep 2019 17:52:50 +0000 (13:52 -0400)]
misc: don't os_exit(1) causing core on SIGINT

It's not typical for a program to core when it receives a SIGINT, so
keep this from happening.

Type: fix
Signed-off-by: Christian E. Hopps <chopps@chopps.org>
Change-Id: I2c15985a57e6ea898ff05c4001e4b30b41154eba
(cherry picked from commit 10a8bda37eed33ada1e7c6ece7bda1fe066ba541)

3 years agopg: don't leak open files in packet-generator 60/28260/1
Christian E. Hopps [Fri, 27 Sep 2019 18:35:32 +0000 (14:35 -0400)]
pg: don't leak open files in packet-generator

Fix pg code to close it's open file descriptors before zero'ing the
pcap_main structure for re-use.

Ticket: VPP-1780
Type: fix
Signed-off-by: Christian E. Hopps <chopps@chopps.org>
Change-Id: I32945c6476ae83b8d210ee67ac78db3e8f786f46
(cherry picked from commit 19871f25394fa9a4bfb55006092cbcc28b446c04)

3 years agovpp: fix .short_help for "ip virtual" 58/28258/1
Paul Vinciguerra [Sun, 3 Nov 2019 14:50:15 +0000 (09:50 -0500)]
vpp: fix .short_help for "ip virtual"

Type: fix

"# <feature-name>: <subject>

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

3 years agovxlan geneve gtpu: fix short help 57/28257/1
Paul Vinciguerra [Thu, 7 Nov 2019 22:20:48 +0000 (17:20 -0500)]
vxlan geneve gtpu: fix short help

Type: fix

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