eb8121ab9d
Mellanox NICs support the wide set of Tx offloads. The supported offloads are reported by the mlx5 PMD in rte_eth_dev_info tx_offload_capa field. An application may choose any combination of supported offloads and configure the device appropriately. Some of Tx offloads may be not requested by application, or ever all of them may be omitted. Most of the Tx offloads require some code branches in tx_burst routine to support ones. If Tx offload is not requested the tx_burst routine code may be significantly simplified and consume less CPU cycles. For example, if application does not engage TSO offload this code can be omitted, if multi-segment packet is not supposed the tx_burst may assume single mbuf packets only, etc. Currently, the mlx5 PMD implements multiple tx_burst subroutines for most common combinations of requested Tx offloads, each branch has its own dedicated implementation. It is not very easy to update, support and develop such kind of code - multiple branches impose the multiple points to process. Also many of frequently requested offload combinations are not supported yet. That leads to selecting of not completely matching tx_burst routine and harms the performance. This patch introduces the new approach for tx_burst code. It is proposed to develop the unified template for tx_burst routine, which supports all the Tx offloads and takes the compile time defined parameter describing the supposed set of supported offloads. On the base of this template, the compiler is able to generate multiple tx_burst routines highly optimized for the statically specified set of Tx offloads. Next, in runtime, at Tx queue configuration the best matching optimized implementation of tx_burst is chosen. This patch intentionally omits the template internal implementation, but just introduces the template itself to emboss the approach of the multiple specially tuned tx_burst routines. Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Yongseok Koh <yskoh@mellanox.com> |
||
---|---|---|
.ci | ||
app | ||
buildtools | ||
config | ||
devtools | ||
doc | ||
drivers | ||
examples | ||
kernel | ||
lib | ||
license | ||
mk | ||
usertools | ||
.gitattributes | ||
.gitignore | ||
.travis.yml | ||
GNUmakefile | ||
MAINTAINERS | ||
Makefile | ||
meson_options.txt | ||
meson.build | ||
README | ||
VERSION |
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