From patchwork Thu Apr 9 22:23:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kozyrev X-Patchwork-Id: 68087 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EDAD7A0597; Fri, 10 Apr 2020 00:24:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 867BD1C43F; Fri, 10 Apr 2020 00:23:59 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id EB6AB1C2F1 for ; Fri, 10 Apr 2020 00:23:55 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from akozyrev@mellanox.com) with ESMTPS (AES256-SHA encrypted); 10 Apr 2020 01:23:55 +0300 Received: from pegasus02.mtr.labs.mlnx. (pegasus02.mtr.labs.mlnx [10.210.16.122]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 039MNsWW001025; Fri, 10 Apr 2020 01:23:54 +0300 From: Alexander Kozyrev To: dev@dpdk.org Cc: rasland@mellanox.com, matan@mellanox.com, viacheslavo@mellanox.com Date: Thu, 9 Apr 2020 22:23:50 +0000 Message-Id: <1586471033-17130-1-git-send-email-akozyrev@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1585851108-485-1-git-send-email-akozyrev@mellanox.com> References: <1585851108-485-1-git-send-email-akozyrev@mellanox.com> Subject: [dpdk-dev] [PATCH v4 0/3] net/mlx5: add large packet size support to MPRQ X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- v1: https://patchwork.dpdk.org/cover/67558/ v2: https://patchwork.dpdk.org/cover/67670/ merge documentation and implementation in one commit v3: https://patchwork.dpdk.org/patch/68085/ rollback to simple burst Rx in case the packet size is too big to fit into the stride and the stride size is not configured v4: fix typo in code comments 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 | 17 ++++- 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 | 70 +++++++++++--------- drivers/net/mlx5/mlx5_rxtx.c | 113 +++++++++++++++++++-------------- drivers/net/mlx5/mlx5_rxtx.h | 2 +- 8 files changed, 154 insertions(+), 87 deletions(-)