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 CFEB5A034F; Tue, 12 Oct 2021 02:04:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 595D640151; Tue, 12 Oct 2021 02:04:34 +0200 (CEST) Received: from AZHDRRW-EX01.nvidia.com (azhdrrw-ex01.nvidia.com [20.51.104.162]) by mails.dpdk.org (Postfix) with ESMTP id E76BD40151 for ; Tue, 12 Oct 2021 02:04:32 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.106) by mxs.oss.nvidia.com (10.13.234.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.858.15; Mon, 11 Oct 2021 17:04:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xh/ZB7wktuWHUnvfnjQqq5M9oUVnP8XYGEyVs/c7a25MzGbzPuRzo7mGQcdE7jgIMEr0/Op2mZbY9n9E25X4wpqwLxptxZluTjByTkT6E6Je+EKKEspphxWivozFr0P+I5awKr7JeLByCiHUGO+m4gKs8dUVtdKg6YGi9SQAYDZqfTq+A51/pcz3FYC8S61Pm7rbXOQUKFcn0VSuILVS3MuPdSpgNgxFs+vY57x7qFB7Q7RN+zXDAkV5MVuK20OzCGDE+BUO9jmsaiIMC+c0G1ec08RGwxnMM1cck1lJ+MfdNGpchMQNBSmL1MeEqfCWJXCJHFGj4P4+5FLJuqaohw== 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=XUuyK/xUSzcXSMTsg2/zY524JDmWZB7M+S1CDamb7Hc=; b=j8u6W4Nn1ulUHauUEkVx/y83aPSjwVBEQOXB5uAgnNxEye/JZpsmrtEZXZQSRqdICJL3WUeD8uuIO23caMaG+YxHdFziOKWCfm+/Q+9ttbkFp2xMaGPt5eflc5E3sDbU1dIotm0aO9nrZLHVaClNWNK431eYtK8jv5MNmvQcrJ4bmi+rEM8RHgeaRD2Fj65vftjphpDv+BS9pn2r+7QRScawBQVf7bNmchUk7HFlKo/uAAxeOhWcuhnqWHAkbFCzHCnyGFHLPc7vTVmMRoikiq9sgkRI+fi8FXSiQ1kV208WVtEhyuJY7sBZBL8bQezXGumfQiY3XsEUPEzj8utdqw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=monjalon.net 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=XUuyK/xUSzcXSMTsg2/zY524JDmWZB7M+S1CDamb7Hc=; b=aiKoQUR+goGIZzRU2kINeP+bzXI52M7T9IEgwAfWozc88M8dty+/qI/0tkyzP6dX1XlqbNfd7sKw5MMwClCac8xsTLq1Qe+obkhgX9ibVd23P1gFxCCICXF7HMs8vXCn16CcdbT0Lv95OE9IHJQEuT/ze41qlE5263s/cDGLG592Wts/vmME9of89tGBIXJVWnpTrUdL2GbBIrXUBrp2uwdruMuz+pZ3tCdyfsfLG7OX7ZuVqfeS8ddnqoczUxxjabj+Zrh8rHEYg1B6x6fT28ATAfs7KE8vgnL28mSFmnvkthOCEF6Naxsyu7pxsRkFcJXSl3AJUiCPIKJx94qxrg== Received: from BN9PR03CA0725.namprd03.prod.outlook.com (2603:10b6:408:110::10) by BL0PR12MB4673.namprd12.prod.outlook.com (2603:10b6:207:1d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.24; Tue, 12 Oct 2021 00:04:27 +0000 Received: from BN8NAM11FT019.eop-nam11.prod.protection.outlook.com (2603:10b6:408:110:cafe::e4) by BN9PR03CA0725.outlook.office365.com (2603:10b6:408:110::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Tue, 12 Oct 2021 00:04:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; 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 BN8NAM11FT019.mail.protection.outlook.com (10.13.176.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4587.18 via Frontend Transport; Tue, 12 Oct 2021 00:04:26 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 12 Oct 2021 00:04:24 +0000 From: Dmitry Kozlyuk To: CC: Thomas Monjalon Date: Tue, 12 Oct 2021 03:04:05 +0300 Message-ID: <20211012000409.2751908-1-dkozlyuk@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210929145249.2176811-1-dkozlyuk@nvidia.com> References: <20210929145249.2176811-1-dkozlyuk@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] 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: b25399ad-5c29-409d-6bd2-08d98d13dae8 X-MS-TrafficTypeDiagnostic: BL0PR12MB4673: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-Transport-Forked: True 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: i/SXoxsz4714EmgWFUeuma4UnEPC1aD5dpE5QcEYnpogHAozMEqtX4ckHrvqNdT58e5gfcbpFkogONEwTN/6SqNElIyvh1bf+gnb9EaaEV2CJ06NTvIzvBdKTMyvL6IntxT4kFRDTG7NmTd0mkpMOQ/G2RGJYf1r1sbhh0HwFwAr21KVd2j1DDA4Awuw4vgbvNq/B5UeQ7+XWMuXSs++Qd9sL0EaFRjgUneSV7J/nkhI8JOsOoYr6KuGPHDp3iAFqtddgFZX9xXJ4uyX16lfYXzZvoHKrqFRAm84hyX1CEVhsL1qhC0aLYUsPcIFWxQDt7mQeJtYTGXakGybd0rslT4koasstvJzrlb7hyVcdpgbNUYjYdEFNXyF2KnfvS5ZpoiNrUeuPO7n4qQTCgCY03E56AFcPD9N6LIyTve3m1f1NjTpxUQOWZKn0AdV++aQVVkuJ+4rjMLqzvGUczkO65S1fkp3fLdw70gM2BIqSOPqdDBxD5vydlHSP3IN4LweBiKgRZAHbcYObPOcHXVHMEo6DoMDMzvKk4s4KYkMGOGtSiPiOPjAYiEiz/paqMaGT5HioDKFygSbbrbnEZdaW4RO6uD8lv7uBd5NDh+3MSIGKp0gibtd78SHyRHYOGE8LApDD8wflThsjXLak1YahaDKE/iGlf9NCa4+c6plc5chQyOaEQ9FxUHVa+lJ+TF6yQinBsWxoWufpl32/jwF598xn+vzTxxLzETBcR6rJe4fvnej5yFN3Sylyr7/lfF4sCAJt+bh8NhwHq3w1BWAp8cvanYGvblN5KeTMjtumSo= 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)(36840700001)(46966006)(45080400002)(83380400001)(966005)(47076005)(36860700001)(508600001)(16526019)(86362001)(5660300002)(6916009)(186003)(36756003)(55016002)(8676002)(336012)(4326008)(426003)(2616005)(8936002)(6666004)(107886003)(316002)(6286002)(26005)(356005)(2906002)(70586007)(7636003)(82310400003)(1076003)(7696005)(70206006); DIR:OUT; SFP:1101; X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2021 00:04:26.4504 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b25399ad-5c29-409d-6bd2-08d98d13dae8 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: BN8NAM11FT019.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4673 Subject: [dpdk-dev] [PATCH v3 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 a more thorough explanation 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/ 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 | 75 ++++ doc/guides/nics/mlx5.rst | 11 + 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 | 137 ++++++ lib/mempool/rte_mempool.h | 60 +++ lib/mempool/version.map | 8 + 21 files changed, 1294 insertions(+), 116 deletions(-) -- 2.25.1