[0/3] regex/mlx5: support scattered mbuf
Message ID | 20210309235732.3952418-1-suanmingm@nvidia.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9C9CBA0567; Wed, 10 Mar 2021 00:57:42 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 210D022A2B5; Wed, 10 Mar 2021 00:57:42 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by mails.dpdk.org (Postfix) with ESMTP id D319840687 for <dev@dpdk.org>; Wed, 10 Mar 2021 00:57:40 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from suanmingm@nvidia.com) with SMTP; 10 Mar 2021 01:57:37 +0200 Received: from nvidia.com (mtbc-r640-03.mtbc.labs.mlnx [10.75.70.8]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 129NvZho030478; Wed, 10 Mar 2021 01:57:36 +0200 From: Suanming Mou <suanmingm@nvidia.com> To: viacheslavo@nvidia.com, matan@nvidia.com, orika@nvidia.com Cc: rasland@nvidia.com, dev@dpdk.org Date: Wed, 10 Mar 2021 01:57:29 +0200 Message-Id: <20210309235732.3952418-1-suanmingm@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 0/3] regex/mlx5: support scattered mbuf X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Message
Suanming Mou
March 9, 2021, 11:57 p.m. UTC
The scattered mbuf was not supported in mlx5 RegEx driver. This patch set adds the support of scattered mbuf by UMR WQE. UMR WQE can convert multiple mkey's memory sapce to contiguous space. Take advantage of the UMR WQE, scattered mbuf in one operation can be converted to an indirect mkey. The RegEx which only accepts one mkey can now process the whole scattered mbuf. The maximum scattered mbuf can be supported in one UMR WQE is now defined as 64. Multiple operations scattered mbufs can be add to one UMR WQE if there is enough space in the KLM array, since the operations can address their own mbuf's content by the mkey's address and length. However, one operation's scattered mbuf's can't be placed in two different UMR WQE's KLM array, if the UMR WQE's KLM does not has enough free space for one operation, a new UMR WQE will be required. In case the UMR WQE's indirect mkey will be over wrapped by the SQ's WQE move, the meky's index used by the UMR WQE should be the index of last the RegEX WQE in the operations. As one operation consumes one WQE set, build the RegEx WQE by reverse helps address the mkey more efficiently. Once the operations in one burst consumes multiple mkeys, when the mkey KLM array is full, the reverse WQE set index will always be the last of the new mkey's for the new UMR WQE. In GGA mode, the SQ WQE's memory layout becomes UMR/NOP and RegEx WQE by interleave. The UMR and RegEx WQE can be called as WQE set. The SQ's pi and ci will also be increased as WQE set not as WQE. For operations don't have scattered mbuf, uses the mbuf's mkey directly, the WQE set combination is NOP + RegEx. For operations have scattered mubf but share the UMR WQE with others, the WQE set combination is NOP + RegEx. For operations complete the UMR WQE, the WQE set combination is UMR + RegEx. *** BLURB HERE *** Suanming Mou (3): common/mlx5: add user memory registration bits regex/mlx5: add data path scattered mbuf process app/test-regex: support scattered mbuf input app/test-regex/main.c | 134 ++++++-- drivers/common/mlx5/linux/meson.build | 2 + drivers/common/mlx5/mlx5_devx_cmds.c | 5 + drivers/common/mlx5/mlx5_devx_cmds.h | 3 + drivers/regex/mlx5/mlx5_regex.c | 9 + drivers/regex/mlx5/mlx5_regex.h | 26 +- drivers/regex/mlx5/mlx5_regex_control.c | 43 ++- drivers/regex/mlx5/mlx5_regex_fastpath.c | 378 +++++++++++++++++++++-- 8 files changed, 517 insertions(+), 83 deletions(-)