[dpdk-dev] [RFC] net/mlx5: add vectorized mprq

Alexander Kozyrev akozyrev at mellanox.com
Fri Jun 12 01:35:58 CEST 2020


The vectorized Rx burst function helps to accelerate the Rx 
processing by using SIMD (single instruction, multiple data) 
extensions for the multi-buffer packet processing.
Pre-allocating multiple mbufs and filling them in batches of
four greatly improves the throughput of the Rx burst routine.

MPRQ (Multi-Packet Rx Queue) lacks the vectorized version
currently. It works by posting a single large buffer (consisted
of  multiple fixed-size strides) in order to receive multiple
packets at once on this buffer. A Rx packet is then copied to a
user-provided mbuf or PMD attaches the Rx packet to the mbuf
by the pointer to an external buffer.

It is proposed to add a vectorized MPRQ Rx routine to speed up 
the MPRQ buffer handling as well. It would require pre-allocation
of multiple mbufs every time we exhaust all the strides from the
current MPRQ buffer and switch to a new one. The new
mlx5_rx_burst_mprq_vec() routine will take care of this as well
as of decision on whether should we copy or attach an external
buffer for a packet. The batch processing logic won't be different
from the simple vectorized Rx routine.

The new vectorized MPRQ burst function is going to be selected
automatically whenever the mprq_en devarg is specified. If SIMD 
is not available on the platform we fall back to the simple MPRQ
Rx burst function. LRO is not supported by the vectorized MPRQ
version and fall back to the regular MPRQ will be performed.

Signed-off-by: Alexander Kozyrev <akozyrev at mellanox.com>


More information about the dev mailing list