7503 Commits

Author SHA1 Message Date
Florin Coras
89ab1762d7 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)
2019-11-18 13:15:56 +00:00
Alexander Kabaev
ccdd73e636 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)
2019-11-18 13:15:39 +00:00
Dave Wallace
f821dd7990 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)
2019-11-18 13:14:44 +00:00
Dave Wallace
af62709c74 tests: decode worker stdout/stderr output
Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I309254e9e99920fbeaa50eea503c1c2a9470abfe
(cherry picked from commit 97ea2f4ec0ec337a4d391f5225e89d12ba2ddb38)
2019-11-18 13:14:06 +00:00
Florin Coras
b3f54ec401 vcl: handle segment map errors
Type: fix

Change-Id: Ibd122a4565c067627c4bbc8cac7df2d5b6497392
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit dbc9c599b9d4453c7433ac59dd21f088778e024b)
2019-11-18 13:12:13 +00:00
Florin Coras
57997c8748 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)
2019-11-18 12:31:58 +00:00
Neale Ranns
fd2f6f89e6 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)
2019-11-15 07:42:36 +00:00
Dave Wallace
69f0861872 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)
2019-11-15 07:42:11 +00:00
Benoît Ganne
103669de7d 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)
2019-11-15 07:36:27 +00:00
Filip Tehlar
dea724f796 ikev2: fix traffic selector match
Type: fix

Change-Id: I81ab3dcd03f397b3d275da6cfa094e048ad92f95
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit cb3cfe876b3bbe2f360e3b32a43a060bdcb8bf9e)
2019-11-15 07:25:14 +00:00
Florin Coras
066ebabc5a 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)
2019-11-15 07:22:59 +00:00
Dave Barach
b5a0108acf 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)
2019-11-15 07:22:16 +00:00
Florin Coras
0b8f7cf89f 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)
2019-11-15 07:20:32 +00:00
Paul Vinciguerra
513a8ffd88 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)
2019-11-15 07:18:59 +00:00
Paul Vinciguerra
8ef3741a27 dpdk: use local logger
Type: fix

Change-Id: I44922f70aef6a3c53f0f56c6d0656502c8fd69b2
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 59c110736bb173b9d65ced3020ea794daa0ff000)
2019-11-15 07:18:38 +00:00
Florin Coras
52d6686e60 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)
2019-11-15 07:15:44 +00:00
Benoît Ganne
82ae1a485e 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)
2019-11-15 07:15:07 +00:00
Dave Wallace
442870c03a 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)
2019-11-15 07:12:43 +00:00
Florin Coras
2c55610e20 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)
2019-11-15 07:11:33 +00:00
Yulong Pei
1c2fd1609c 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)
2019-11-15 07:11:04 +00:00
Florin Coras
ab46b6a03b tcp: fix retransmit with no sacks
Type: fix

Change-Id: I6f7df0d358f57f7feadb9b7a3fcffb99558b2af8
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit bf1f8b7f288c29bfcc128b1d09eae1c1eac2b7cc)
2019-11-12 22:13:12 +00:00
Filip Varga
a6a98b5460 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
2019-11-07 22:17:13 +01:00
Ole Troan
3bacbc975f nat: revert respect udp checksum
This reverts commit 00be6b18862273f832bc524601a34448a61b0e3e.
Type: fix

Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ibef710319222e311bbdfd3221acc4df82139d12d
2019-11-07 22:16:39 +01:00
Filip Varga
00be6b1886 nat: respect udp checksum
Type: fix

Change-Id: I732be02d2e2b854eb589c3fa10f980ef2dbe8dfc
Signed-off-by: Filip Varga <fivarga@cisco.com>
(cherry picked from commit 16572355c9069e2e8e4836dc6bd6a65feed2d390)
2019-11-07 20:09:00 +00:00
Andrew Yourtchenko
f073acdcae 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
2019-11-07 20:08:36 +00:00
Jianlin Lv
1c3c9f0393 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
2019-11-07 13:32:36 +00:00
Chenmin Sun
387123e675 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)
2019-11-05 10:47:31 +00:00
Benoît Ganne
c9ddd2eec1 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)
2019-11-05 10:46:54 +00:00
Benoît Ganne
e7ac6d0250 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)
2019-11-05 10:44:44 +00:00
Florin Coras
e04a58d27b session: fix dispatch event logging
Type: fix

Change-Id: Icf3c73cd7eb7565ed6e1b0371da172b5408a9d36
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit ba13c3b3695cb4758848d856174b725afcc7cdb8)
2019-11-05 10:42:46 +00:00
Florin Coras
6de46b40d2 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)
2019-11-05 10:41:16 +00:00
Paul Vinciguerra
7def5ba815 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)
2019-11-05 10:40:29 +00:00
Paul Vinciguerra
ac68457e55 dns: fix typo in counter
Type: fix

Change-Id: Id8a0ce8278816d2839d229799daa3735a097bc7b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit e74718fa987df415f2e2c6509461b2b3a9936331)
2019-11-05 10:40:01 +00:00
Paul Vinciguerra
bfb7c2a459 l2: fix typo in doxygen
Type: style

Change-Id: I286280fffa6ab5d3e15986911a4ccc35efbf41c3
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit ddbd90aae332e6c4b59e35bf44a735e592a3a053)
2019-11-05 10:39:41 +00:00
Paul Vinciguerra
0700f3c50e ip: cleanup typos in documentation
Type: style

Change-Id: I7d44b7fab1b8b196e4934cb4832ee51084c5bf98
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 5b755e2f9fce239b5280ac1e5e21f835464fa017)
2019-11-05 10:39:15 +00:00
Dave Wallace
eaec04895e 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)
2019-11-05 10:37:25 +00:00
Zeyu Zhang
00413d3fed 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)
2019-11-05 10:35:25 +00:00
Benoît Ganne
bf2aa86fe9 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)
2019-11-05 10:35:00 +00:00
Florin Coras
2172c35eb4 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)
2019-11-05 10:34:11 +00:00
Florin Coras
f0c4096e1b 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)
2019-11-05 10:33:39 +00:00
Andrew Yourtchenko
92a5fdd684 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)
2019-11-05 10:31:18 +00:00
Paul Vinciguerra
5cd73e6d92 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)
2019-11-05 10:31:00 +00:00
Paul Vinciguerra
9e20470cb3 ip: trivial typos in docs
Type: style

Change-Id: I620f15b96ee5401e0145a139f06d343d7c4fadb4
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit f158944cc4f1bfcc21bed16f5c6f9177734adecd)
2019-11-05 10:25:43 +00:00
Florin Coras
3d30598b7b 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)
2019-11-05 10:23:52 +00:00
Ryujiro Shibuya
efb8db4c8a 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)
2019-11-05 10:22:25 +00:00
Andrew Yourtchenko
eeaf6e7614 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>
2019-11-03 19:51:06 +00:00
Filip Tehlar
5b055af741 ipsec: fix tunnel protection removal
Type: fix

Change-Id: I4d5546d1f9b3a162291997f6f0c094c5c3d6cf31
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 89b24950005914317c142149fa1ba8a167a978ca)
2019-11-03 19:49:07 +00:00
Benoît Ganne
c07b9b6891 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)
2019-10-31 22:52:40 +00:00
Ryujiro Shibuya
65ef66543a 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)
2019-10-31 12:17:59 +00:00
Filip Varga
80276a7101 nat: respect udp checksum
Type: fix

Change-Id: I73895fa0101bd50483160c8dc6faac2c67513077
Signed-off-by: Filip Varga <fivarga@cisco.com>
(cherry picked from commit 0d75f783644a24b219ed79d9f9c17387783f67ca)
2019-10-31 12:17:38 +00:00