From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6322EA00C2; Wed, 23 Feb 2022 19:48:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5225E41144; Wed, 23 Feb 2022 19:48:48 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2065.outbound.protection.outlook.com [40.107.236.65]) by mails.dpdk.org (Postfix) with ESMTP id BC1BC40E5A for ; Wed, 23 Feb 2022 19:48:46 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SbGG+c3zpbk+0I+PKI6WmTXqGiZ2nidTUvuLBgbElVO6X7p9T54ITNjal27eiUqQ3DRdFesNhgnES0qW4NPA+cfEcXRYF57u7y5TZNRdsrVXQtn5iVtq9NGoZY4dzhc0Doa7yGeqygw2eEPzEAEW3Clq4TN4Et1c7BJ8MAtI3oZaV9bgl/ZePFutkIsPK+uj5Np7LuzqdKFQOwvDl30XWJqt8vzvNTzM8eorVL2F0cYI9AKjzZatXX69ifDwnDaawL5ESd/fzx+S8zyMsTNoc10F07vnfiWwUkdZA9rg2Nz1wg2Alx3NYb4Gtu9Wz4GFO8TKkIkJJtJzQ2FIHw9FjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RK7tAUGs37s+G/1pkYfOrD8MAzOxsHXHG0M6kPfJHpQ=; b=egPpztLpvZbTLqnHEKFIZz9amQabmfjrhZ44lJSS7aVl3Xg/FfTZAd9CraNBe1Ks6OP39Pu5KDQ8eUo6L4ddXw1yez383A/DbGx/IICXvxwV19FeOuY3xtkzK3HJLD7ken6NeKxXwGjj9kGmGitIPW76o6R4c2aiwIErwooM85nFgwljj26WtTQ/rhp2UY1LjNsXmXF2crFFw0PXrskscVmtq+ChkNS97diqZvl3FlL+gGqujcXe/wyaU6z6ZSFUGxfPubxKYbr+rq7xI/BYJSTqzOPDe++weBN2pHBCBe5009N6Q7/zr7jtf1K3RQBcv9wfYChkupT6Wk6hgCv60Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RK7tAUGs37s+G/1pkYfOrD8MAzOxsHXHG0M6kPfJHpQ=; b=PQ8iSksf/R51U/vPL/6PPOmqpfqAkQGhTM1VDSiuyOWz8VYP8j6nQDxwc97baTFJMRcHPYwqaUxvqtsTySs/GtMpuDx3bX94qlLQ5pZE4c0fjM2w/Fpr4jiUnZiXH9tH6ooS/Uffp9rDkJPjuwBsEbvhCnSUGfALGjgZ3aKv3c48ArHvOnwgNHTIe+IJgsB8KnDGasdNTp5ZQ/4HoRc66BP0WK23vpCX199CI64FhpPXuepBD+2Z7OCf+P9+wYA+JRk3VboXH6T7aEsHjunK1an1RfiUfk52T87SYYeMJfPUv1Q985Xugoy8Leoid1cC2jJJ5GF0Ok+p96lh25OLAQ== Received: from MW4PR03CA0300.namprd03.prod.outlook.com (2603:10b6:303:b5::35) by DM6PR12MB2652.namprd12.prod.outlook.com (2603:10b6:5:41::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.24; Wed, 23 Feb 2022 18:48:44 +0000 Received: from CO1NAM11FT017.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b5:cafe::5b) by MW4PR03CA0300.outlook.office365.com (2603:10b6:303:b5::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.23 via Frontend Transport; Wed, 23 Feb 2022 18:48:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.235) by CO1NAM11FT017.mail.protection.outlook.com (10.13.175.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5017.22 via Frontend Transport; Wed, 23 Feb 2022 18:48:44 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 23 Feb 2022 18:48:43 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Wed, 23 Feb 2022 10:48:42 -0800 Received: from nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9 via Frontend Transport; Wed, 23 Feb 2022 10:48:41 -0800 From: Michael Baum To: CC: Matan Azrad , Raslan Darawsheh , Viacheslav Ovsiienko Subject: [PATCH v2 0/6] mlx5: external RxQ support Date: Wed, 23 Feb 2022 20:48:29 +0200 Message-ID: <20220223184835.3061161-1-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220222210416.2669519-1-michaelba@nvidia.com> References: <20220222210416.2669519-1-michaelba@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 10f0a74e-25a6-4675-6ca0-08d9f6fd1e2f X-MS-TrafficTypeDiagnostic: DM6PR12MB2652:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WBRNfbE4Wi2TdyOF66mjsEjzmqrY6l3DqSeHnz8s1ymelhk50WGUmm1OEuG8bkEn48ft0FDOVB2J4A0QtMA5eb4uIiPztV1FG72KfdLrA5Jt9RgZLr9wkGw75ry8CYU5WBC64ZUGNfU/Z5i7Ak25WodRUh1KHaKCBnEkM+ZHepTVU1kTDHDnrl0URUME9pE5bmZT5uuX6hdF51trYZOw4OUs0u5gyur7dZqCW4zNO2CstHAyibnUz0vf6qxzovggaRCit/NTzhI5KxDFG9rMh+oVDJef0ra3Ck1orOG3HUOIlWsbkL7SwZcLrDzEGjF6cFUlAZ2m0z2MPjtgVNjEzU61yEvWhmO8i2M7pq/zYRTl4QWccoFMshzeaKexI7LmrbZPZXMNyWtLOes1OdlhBzsXRKYnaZ2gW97F+J7iztRvOzXwhQ9Ur7hHAg9gyanSqHoRcRkJ4No/yswhJK2qJixbCoJKiww21mKYv3D8kE/4DUsd/mLCSQFwTTug7sLla0u9Y3VGzeCWDxpfs/TZkmpfOsc6FaUP9FdptmFE720g1MX4yj1xchGyoRjODu89GaSThMqSOxs7e9JBP05TEsEztxX95N41DE/2hR3C0TWOh6BKCA0/0BhwPr8+uibL30TGDgGEZGk1L4MfFpAHF6MMkGHdWEaR95G1nDZ03Rdi1e3KX1lTyasnOS9daFz+DcG0Z9rm0oIL1rBLkoNf5A== X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(40470700004)(46966006)(36756003)(7696005)(107886003)(47076005)(6666004)(40460700003)(508600001)(55016003)(2616005)(2906002)(36860700001)(5660300002)(6286002)(54906003)(8676002)(26005)(8936002)(6916009)(4326008)(316002)(82310400004)(426003)(356005)(336012)(81166007)(70586007)(83380400001)(186003)(1076003)(86362001)(70206006)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2022 18:48:44.2125 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 10f0a74e-25a6-4675-6ca0-08d9f6fd1e2f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT017.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2652 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org These patches add support to external Rx queues. External queue is a queue that is managed by a process external to PMD, but uses PMD process to generate its flow rules. For the hardware to allow the DPDK process to set rules for it, the process needs to use the same PD of the external process. In addition, the indexes of the queues in hardware are represented by 32-bit compared to the rte_flow indexes represented by 16-bit, so the processes need to share some mapping between the indexes. These patches allow the external process to provide devargs which enable importing its context and PD, instead of prepare new ones. In addition, an API is provided for mapping for the indexes of the queues. v2: - Rebase. - Add ABI exception for common/mlx5 library. - Correct DevX flag updating. - Improve explanations in doc and comments. - Remove teatpmd part. Michael Baum (6): common/mlx5: consider local functions as internal common/mlx5: glue device and PD importation common/mlx5: add remote PD and CTX support net/mlx5: optimize RxQ/TxQ control structure net/mlx5: add external RxQ mapping API net/mlx5: support queue/RSS action for external RxQ devtools/libabigail.abignore | 4 + doc/guides/nics/mlx5.rst | 1 + doc/guides/platform/mlx5.rst | 37 ++- doc/guides/rel_notes/release_22_03.rst | 1 + drivers/common/mlx5/linux/meson.build | 2 + drivers/common/mlx5/linux/mlx5_common_os.c | 196 ++++++++++++-- drivers/common/mlx5/linux/mlx5_common_os.h | 7 +- drivers/common/mlx5/linux/mlx5_glue.c | 41 +++ drivers/common/mlx5/linux/mlx5_glue.h | 4 + drivers/common/mlx5/mlx5_common.c | 64 ++++- drivers/common/mlx5/mlx5_common.h | 23 +- drivers/common/mlx5/version.map | 3 + drivers/common/mlx5/windows/mlx5_common_os.c | 37 ++- drivers/common/mlx5/windows/mlx5_common_os.h | 1 - drivers/net/mlx5/linux/mlx5_os.c | 18 ++ drivers/net/mlx5/mlx5.c | 6 + drivers/net/mlx5/mlx5.h | 1 + drivers/net/mlx5/mlx5_defs.h | 3 + drivers/net/mlx5/mlx5_devx.c | 52 ++-- drivers/net/mlx5/mlx5_ethdev.c | 18 +- drivers/net/mlx5/mlx5_flow.c | 43 ++-- drivers/net/mlx5/mlx5_flow_dv.c | 14 +- drivers/net/mlx5/mlx5_rx.h | 49 +++- drivers/net/mlx5/mlx5_rxq.c | 258 +++++++++++++++++-- drivers/net/mlx5/mlx5_trigger.c | 36 +-- drivers/net/mlx5/mlx5_tx.h | 7 +- drivers/net/mlx5/mlx5_txq.c | 14 +- drivers/net/mlx5/rte_pmd_mlx5.h | 50 +++- drivers/net/mlx5/version.map | 3 + 29 files changed, 821 insertions(+), 172 deletions(-) -- 2.25.1