mbox series

[0/3] net/mlx5: add large packet size support to MPRQ

Message ID 1585851108-485-1-git-send-email-akozyrev@mellanox.com (mailing list archive)
Headers show
Series net/mlx5: add large packet size support to MPRQ | expand


Alexander Kozyrev April 2, 2020, 6:11 p.m. UTC
In order to support the 9K MTU the MPRQ feature should be updated
to allow a packet to take more than one stride (single linear buffer).
Receiving a packet into multiple adjacent strides should be implemented.
The reason preventing the packet to be received into multiple strides is
that the data buffer must be preceded with some HEAD_ROOM space.
In the current implementation the HEAD_ROOM space is borrowed by the PMD
from the tail of the preceding stride. If packet takes multiple strides
the tail of stride may be overwritten with a packet data and the memory
can't be borrowed to provide the HEAD_ROOM space for the next packet.
Special care is needed to prevent the HEAD_ROOM corruption as such:
- copy a whole packet into a separate memory buffer if scatter is off
- copy an overlapping data only and craft a multi-segment mbuf otherwise
After multi-stride support for packets receiving is in place it is
possible to reduce the stride size for more efficient memory utilization.
Introduce the mprq_log_stride_size device parameter to configure
a stride size for MPRQ. Default stride size is set to 2048 bytes.

Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
v1: https://patchwork.dpdk.org/cover/67558/
v2: merge documentation and implementation in one commit

Alexander Kozyrev (3):
  net/mlx5: add a devarg to specify MPRQ stride size
  net/mlx5: enable MPRQ multi-stride operations
  net/mlx5: add multi-segment packets in MPRQ mode

 doc/guides/nics/mlx5.rst               |   9 +++
 doc/guides/rel_notes/release_20_05.rst |   1 +
 drivers/net/mlx5/mlx5.c                |  34 ++++++++--
 drivers/net/mlx5/mlx5.h                |   1 +
 drivers/net/mlx5/mlx5_defs.h           |   3 +
 drivers/net/mlx5/mlx5_rxq.c            |  47 ++++++--------
 drivers/net/mlx5/mlx5_rxtx.c           | 113 +++++++++++++++++++--------------
 drivers/net/mlx5/mlx5_rxtx.h           |   2 +-
 8 files changed, 128 insertions(+), 82 deletions(-)