Go to file
Mattias Rönnblom 70cb0278a4 event/dsw: fix flow migration
Fix bug in flow migration, which under certain conditions causes
reordering and violation of atomicity guarantees.

The issue occurs when the processing of a flow (on an atomic queue)
has resulted in events enqueued to a flow currently being migrated,
and the former (producer) flow is also selected for migration. The
events are buffered ("paused") on the originating port, and released
(forwarded) when the migration has completed. However, at the time of
"unpausing" the latter (consumer) flow, processing of the producer
flow on the port to which it was migrated may have already produced
events, for the same paused flow. This constitutes a race condition,
and depending on which port wins, reordering may have been introduced.

This patch forbids migration when a port has paused events, since
those events may have been the result of processing a to-be-migrated
flow.

This patch also disallows processing events pertaining to a flow under
migration, for the same reason. A new buffer is introduced, which
holds such not-yet-processed events dequeued from the port's input
ring. Such events are forwarded to the target port as a part of the
migration process.

The 'forwarding' migration state is eliminated, and instead background
processing is only performed if there are no unreleased events on the
port.

The bug is primarily triggered in situations where multiple flows are
migrated as one transaction, but may occur even if only a single flow
is migrated (e.g., with older DSW versions, which does not support
multi-flow migration).

Fixes: f6257b22e7 ("event/dsw: add load balancing")
Cc: stable@dpdk.org

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
2022-09-26 15:33:46 +02:00
.ci ci: add RISC-V cross compilation 2022-06-08 11:26:34 +02:00
.github/workflows test: invoke all telemetry commands 2022-08-25 16:23:17 +02:00
app eventdev/eth_tx: add adapter instance get API 2022-09-26 15:33:45 +02:00
buildtools build: add definitions for use as Meson subproject 2022-06-07 20:49:20 +02:00
config sched: enable congestion management at runtime 2022-08-25 16:18:06 +02:00
devtools eal: deprecate RTE_FUNC_PTR_* macros 2022-09-23 16:14:34 +02:00
doc eventdev/eth_tx: add adapter instance get API 2022-09-26 15:33:45 +02:00
drivers event/dsw: fix flow migration 2022-09-26 15:33:46 +02:00
examples examples/pipeline: fix build with some compilers 2022-09-25 16:02:25 +02:00
kernel kni: use dedicated function to set MAC address 2022-06-08 19:17:21 +02:00
lib eventdev/eth_tx: add adapter instance get API 2022-09-26 15:33:45 +02:00
license lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
usertools usertools: add options for hugetlbfs mount point owner 2022-06-27 02:24:12 +02:00
.editorconfig devtools: clarify that lines up to 100 characters are ok 2021-11-25 11:51:24 +01:00
.gitattributes improve git diff 2016-11-13 15:25:12 +01:00
.gitignore doc: add eventdev feature matrices 2021-11-26 16:29:25 +01:00
.travis.yml version: 22.11-rc0 2022-07-21 12:13:48 +02:00
ABI_VERSION version: 22.11-rc0 2022-07-21 12:13:48 +02:00
MAINTAINERS net/octeon_ep: rename octeontx_ep 2022-09-22 10:43:42 +02:00
Makefile build: create dummy Makefile 2020-09-07 23:51:57 +02:00
meson_options.txt config: add option for atomic mbuf reference counting 2021-10-25 17:53:30 +02:00
meson.build build: enable developer mode for all working trees 2022-08-29 12:53:49 +02:00
README license: introduce SPDX identifiers 2018-01-04 22:41:38 +01:00
VERSION version: 22.11-rc0 2022-07-21 12:13:48 +02:00

DPDK is a set of libraries and drivers for fast packet processing.
It supports many processor architectures and both FreeBSD and Linux.

The DPDK uses the Open Source BSD-3-Clause license for the core libraries
and drivers. The kernel components are GPL-2.0 licensed.

Please check the doc directory for release notes,
API documentation, and sample application information.

For questions and usage discussions, subscribe to: users@dpdk.org
Report bugs and issues to the development mailing list: dev@dpdk.org