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 B5DB0A0C55; Wed, 13 Oct 2021 13:01:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8FE4D4115A; Wed, 13 Oct 2021 13:01:50 +0200 (CEST) Received: from AZHDRRW-EX02.NVIDIA.COM (azhdrrw-ex02.nvidia.com [20.64.145.131]) by mails.dpdk.org (Postfix) with ESMTP id 97ADF40E64 for ; Wed, 13 Oct 2021 13:01:49 +0200 (CEST) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.43) by mxs.oss.nvidia.com (10.13.234.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.858.15; Wed, 13 Oct 2021 04:01:48 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F8oFEPpaObRgWWlr5XDDs1nOiED8rV1WeyZjvSnVO1MGUkdqHn0DyrIggeRi/qJ9xxpXLuAeHzAu81nbRWFjJfEH7UmBK44GBYBC/4sidOei3NIvpSHxRZPxMs/gF1KqtsoSs9Y08y0JnN4pkKcCQDOvtRq8oDnLsg51zeAT+soEwDyumZtZPZAJizsJ0s0apxWxUCXPDeuCW41B+MOC9o2ORqLDrsmciIrCLI9Tu2EqqPdKDtmXNiKmrXFgGjqm1pM04UJ0xX19ya/ST+DWijHmEL3xUSR7VXZqU52xZHGNFuEvJvNZCLaLYMr+94KmnIo3+HLuM2ygjpn9xSQsnQ== 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=02p6m8sDJoBVAOHkwQTcEyyP4kiaOJ9+fYlqyRHbpRU=; b=lT37R/GXdYfIpS4UNFCO9ay6EEbkBNu64Veip4wvtyOccm5Pdw2ZIEXCjA39x3iqPDkDmyDSKngxd7+rtJETQX+ZSPz53Tyju5x/whIofD8bcy7UxaP70LeGeeCJmlKhrhObVC16rYtLGwV4ziik8BVJTo/mK2nlaYdbNcVaOTfK8qvb/zm+X41Ra4it+h478jmpuSJK9PpczZetAXugYgzY1763Sa3vEPgOgfzPn0VOhuh/LlicH1uw35zTTgwV/TMdIHecfX3tOpmk4IhxDwhCb5GsXzE6Lo0kZk3Zs4nckcS/IwU6vD8b9HOLRj7NNMVnJ6EpVSmWruXa46Pe4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=02p6m8sDJoBVAOHkwQTcEyyP4kiaOJ9+fYlqyRHbpRU=; b=DKqVJe5foozgPGGF3xZNhUVIjJQ7p/YbcLJPUIu5w7jdTWhKylE7iaFKyzFh0VGfgqVF8tBgZR6P7t/DdbLOJ1GZaKVC4fTG9ws/z8itbrKXw3kqhBFNj+bzm68ikxiVzBXNJOsYeDDhIq7MrXW6MRQ+kOnFYQ05JfHCB2Biy8+SFzc2H4hv6yzaZPpCvnxk0FpvBo8j9qQ/NYphhsgnTm45jQUlGm+keMYj6WACGPDOYyE5xgjKf7ZXKZ/Hsa7IvgcLXZfwYv55Sb51RXNgVazVt2i4JcpzGgNblplBofxzr5n0R68L3msbYwWHou4FYSrMx/jHHCMGLwCxkOJOdQ== Received: from DM6PR10CA0024.namprd10.prod.outlook.com (2603:10b6:5:60::37) by BN8PR12MB4771.namprd12.prod.outlook.com (2603:10b6:408:a5::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Wed, 13 Oct 2021 11:01:47 +0000 Received: from DM6NAM11FT064.eop-nam11.prod.protection.outlook.com (2603:10b6:5:60:cafe::b9) by DM6PR10CA0024.outlook.office365.com (2603:10b6:5:60::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.14 via Frontend Transport; Wed, 13 Oct 2021 11:01:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT064.mail.protection.outlook.com (10.13.172.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4608.15 via Frontend Transport; Wed, 13 Oct 2021 11:01:46 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 13 Oct 2021 11:01:46 +0000 From: Dmitry Kozlyuk To: Date: Wed, 13 Oct 2021 14:01:27 +0300 Message-ID: <20211013110131.2909604-1-dkozlyuk@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012000409.2751908-1-dkozlyuk@nvidia.com> References: <20211012000409.2751908-1-dkozlyuk@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 34ae0747-ce07-4aa9-509d-08d98e38d9ac X-MS-TrafficTypeDiagnostic: BN8PR12MB4771: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0JcNWOOWPhWYidh4l90HU4pU9cTYwuZMH89yu60CAn/JKjJndTlciEDd1wpgydwA4JUIzUjr1YFNWZk+R+wzs/vJQw80zB1UjW8fGpPveUH/4L9hTXkyNlL6lgfaSJkZedsw2vFF2x9VS2POjJmIfGM2jZMuYcSYUCmxkyXziHPuy5YPTDifbOi/awYT0/aKC5ig6xjfTMnUm0OykuYby0c50lfo2iXWHn4edTbQlz1AF/2KpByxQMvedrZHQSHBUzs5DAjL2lD9SHdKvptRntIo3ahPISCwGeuJoXkO9uxkQrSqsWTY2AhCeN+kBT+xf014xT70fA2XAdrLtklIuLdA7z9gOKp5V4Va1vLMuEwt8hfp3M7uKAaHxN6wnykvBXzk7z/LZNWP7bPwX3cCxd5O5iWxbm2fAbv1fL1vnMUjbw99iRN2MYz7H2QH/EmucYdQlSivNJSWXyy9qqnb6igac0MY0cD3A68zrOEmGbHq494GpN78c1ajobr34oIB8j/CxvBXHmAwzJGsVjBPximT85cPCTcXIk5WTVRfAksF/rXfDKJs9HC+UgvtZRQLHQXLyjhIvg0yo+EMcFmF9jYAUOkAes0LGITrkWH5KutixjhpHpvT5JOYegTGmwXQNVrdeSPTgi84JPr/KYJ7fir8wT3CW26e360oCjLfV2qAz/ljNvu8PAGMXo+Xda7gu4Gg4CATKq70OyhycEnn6QAJj1StzedO4gyVh8ab5kQ8eE196x5cPH+f3+pCC548YA8kJizrrkI8JP5Ha/GsCVyB7Ba9gI1WesgSPsQAORM= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(70206006)(36756003)(82310400003)(508600001)(8936002)(2906002)(36860700001)(45080400002)(316002)(2616005)(8676002)(426003)(6916009)(70586007)(6666004)(7696005)(5660300002)(86362001)(356005)(83380400001)(1076003)(26005)(7636003)(16526019)(336012)(186003)(55016002)(6286002)(47076005)(966005); DIR:OUT; SFP:1101; X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2021 11:01:46.9867 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 34ae0747-ce07-4aa9-509d-08d98e38d9ac X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT064.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR12MB4771 Subject: [dpdk-dev] [PATCH v4 0/4] net/mlx5: implicit mempool registration 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 Sender: "dev" MLX5 hardware has its internal IOMMU where PMD registers the memory. On the data path, PMD translates VA into a key consumed by the device IOMMU. It is impractical for the PMD to register all allocated memory because of increased lookup cost both in HW and SW. Most often mbuf memory comes from mempools, so if PMD tracks them, it can almost always have mbuf memory registered before an mbuf hits the PMD. This patchset adds such tracking in the PMD and internal API to support it. Please see [1] for the discussion of the patch 2/4 and how it can be useful outside of the MLX5 PMD. [1]: http://inbox.dpdk.org/dev/CH0PR12MB509112FADB778AB28AF3771DB9F99@CH0PR12MB5091.namprd12.prod.outlook.com/ v4: (Andrew) 1. Improve mempool event callbacks unit tests and documentation. 2. Make MEMPOOL_F_NON_IO internal and automatically inferred. Add unit tests for the inference logic. v3: Improve wording and naming; fix typos (Thomas). v2 (internal review and testing): 1. Change tracked mempool event from being created (CREATE) to being fully populated (READY), which is the state PMD is interested in. 2. Unit test the new mempool callback API. 3. Remove bogus "error" messages in normal conditions. 4. Fixes in PMD. Dmitry Kozlyuk (4): mempool: add event callbacks mempool: add non-IO flag common/mlx5: add mempool registration facilities net/mlx5: support mempool registration app/test/test_mempool.c | 285 ++++++++++++ doc/guides/nics/mlx5.rst | 13 + doc/guides/rel_notes/release_21_11.rst | 9 + drivers/common/mlx5/mlx5_common_mp.c | 50 +++ drivers/common/mlx5/mlx5_common_mp.h | 14 + drivers/common/mlx5/mlx5_common_mr.c | 580 +++++++++++++++++++++++++ drivers/common/mlx5/mlx5_common_mr.h | 17 + drivers/common/mlx5/version.map | 5 + drivers/net/mlx5/linux/mlx5_mp_os.c | 44 ++ drivers/net/mlx5/linux/mlx5_os.c | 4 +- drivers/net/mlx5/mlx5.c | 152 +++++++ drivers/net/mlx5/mlx5.h | 10 + drivers/net/mlx5/mlx5_mr.c | 120 ++--- drivers/net/mlx5/mlx5_mr.h | 2 - drivers/net/mlx5/mlx5_rx.h | 21 +- drivers/net/mlx5/mlx5_rxq.c | 13 + drivers/net/mlx5/mlx5_trigger.c | 77 +++- drivers/net/mlx5/windows/mlx5_os.c | 1 + lib/mempool/rte_mempool.c | 139 ++++++ lib/mempool/rte_mempool.h | 66 +++ lib/mempool/version.map | 8 + 21 files changed, 1514 insertions(+), 116 deletions(-) -- 2.25.1