path: root/drivers/net/mlx5/mlx5_rxtx.h
diff options
authorViacheslav Ovsiienko <>2019-07-21 14:24:58 +0000
committerFerruh Yigit <>2019-07-23 14:31:36 +0200
commiteb8121ab9dac7f94796f87840237d1ba09da3cb6 (patch)
tree01d903e5d7b45d6d8d740ee6c243ca386fceefca /drivers/net/mlx5/mlx5_rxtx.h
parent38b4b397a57dfb0f892c8289ce1e724f6a37ba0b (diff)
net/mlx5: introduce Tx burst routine template
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 <> Acked-by: Yongseok Koh <>
Diffstat (limited to 'drivers/net/mlx5/mlx5_rxtx.h')
0 files changed, 0 insertions, 0 deletions