Go to file
Ivan Malov bb53d84843 net/sfc/base: improve handling of legacy RSS hash flags
Client drivers may use either legacy flags, for example,
EFX_RX_HASH_TCPIPV4, or generalised flags, for example,
EFX_RX_HASH(IPV4_TCP, 4TUPLE), to configure RSS hash.
The libefx is able to recognise what scheme is used.

Legacy flags may be consumed directly by a chip-specific handler to
configure the NIC, that is, on EF10, these flags can be used to fill
in legacy RSS mode field in MCDI request. Generalised flags can also
be directly used in EF10-specific handler as they are fully compatible
with additional fields of the same MCDI request.

Legacy flags undergo conversion to generalised flags before they
are consumed by a chip-specific handler. This conversion is used to
make sure that chip-specific handlers expect only generalised flags
in the input for the sake of clarity of the code.

Depending on firmware capabilities, a chip-specififc handler either
supplies the input to the NIC directly, for example,
EFX_RX_HASH(IPV4_TCP, 4TUPLE) flag will enable 4 bits in
RSS_CONTEXT_SET_FLAGS_IN_TCP_IPV4_RSS_MODE field on EF10, or takes
the opportunity to translate the input to enable bits which don't map
to the generic flag, like setting
RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV4_EN on EF10 when the firmware
claims no support for additional modes.

However, this approach has introduced a severe problem which can be
reproduced with ultra-low-latency firmware variant. In order to enable
IP hash, EF10-specific handler requires the user to request 2-tuple
hash for IP-other, TCP and UDP traffic classes, unconditionally.
In example, IPv4 hash can be enabled using the following input:
EFX_RX_HASH(IPV4_TCP, 2TUPLE) | EFX_RX_HASH(IPV4_UDP, 2TUPLE) |
EFX_RX_HASH(IPV4, 2TUPLE).
At the same time, on ultra-low-latency firmware, the common code will
never report support for any UDP tuple to the client driver. That is,
in the same example, the driver will use EFX_RX_HASH(IPV4_TCP, 2TUPLE) |
EFX_RX_HASH(IPV4, 2TUPLE). This input will not be recognised by
EF10-specific handler, and RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV4_EN
bit will not be set in the MCDI request.

In order to solve the problem, the patch removes conversion code
from chip-specific handlers and adds appropriate code to convert
EFX_RX_HASH() flags to their legacy counterparts to the common scale
mode set function. If the firmware does not support additional modes,
the function will convert generalised flags to legacy flags correctly
without any demand for UDP flags and pass the result to a chip-specific
handler.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
app app/testpmd: fix missing jump action in flow action 2018-09-28 01:41:02 +02:00
buildtools build: create relative symlinks for PMDs in libdir 2018-09-17 13:36:52 +02:00
config config: remove unused parameter 2018-09-19 15:55:26 +02:00
devtools devtools: use shared libs to save space in build test 2018-09-18 15:11:46 +02:00
doc net/failsafe: support runtime Tx queues setup 2018-09-28 01:41:02 +02:00
drivers net/sfc/base: improve handling of legacy RSS hash flags 2018-09-28 01:41:02 +02:00
examples examples/ipsec-secgw: support 3DES-CBC 2018-08-30 05:10:50 +02:00
kernel igb_uio: install module when building with meson 2018-09-17 12:18:30 +02:00
lib net: fix Intel prepare function for IP checksum offload 2018-09-28 01:41:02 +02:00
license license: introduce SPDX identifiers 2018-01-04 22:41:38 +01:00
mk mk: use templated doxygen config 2018-09-18 15:49:48 +02:00
pkg version: 18.08.0 2018-08-09 23:11:26 +02:00
test ethdev: make default behavior CRC strip on Rx 2018-09-14 20:08:41 +02:00
usertools usertools: add octeontx zip device for binding 2018-07-25 13:36:26 +02:00
.gitattributes improve git diff 2016-11-13 15:25:12 +01:00
.gitignore doc: add compression driver and ISA-L PMD guides 2018-05-10 17:46:20 +01:00
GNUmakefile move kernel modules directories 2018-03-21 23:04:21 +01:00
MAINTAINERS common/mvep: add common code for Marvell drivers 2018-08-28 15:27:39 +02:00
Makefile license: use SPDX tag in root makefile 2018-01-04 22:41:38 +01:00
meson_options.txt net/mlx5: support meson build 2018-09-28 01:41:01 +02:00
meson.build build: generate API documentation with meson 2018-09-18 15:50:54 +02:00
README license: introduce SPDX identifiers 2018-01-04 22:41:38 +01: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