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 26A8FA0547; Wed, 29 Sep 2021 16:53:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5AA37410FF; Wed, 29 Sep 2021 16:53:15 +0200 (CEST) Received: from AZHDRRW-EX02.NVIDIA.COM (azhdrrw-ex02.nvidia.com [20.64.145.131]) by mails.dpdk.org (Postfix) with ESMTP id 45BFC410EF for ; Wed, 29 Sep 2021 16:53:12 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) 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, 29 Sep 2021 07:53:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HznNskJ1AX3CJBxesT8Nb/28X+GLKzQpUJJ3J0BvKgI89CDxyIgejA26eH9sM9VWduoQALcdNwVh7EBE5jswGbh//B0n2p5wOW7MEKVKhmMJjtGNsj20SIejgDmfQic/OuCKXr59O8GH2WsUvQ7x5aC4fUhiQQv37UFpYGcGtzmG3IaQxt6G1dSCEISgFfMDqui91hIDHA/pyRVu+b6hv86qusb3zmS0NuEoOedokskSHAse7/OjP7EhNC0dpSbiN8wDZSDKLxdltbesBLmhuctQIsD7iaZVWbvU/e5JdGaE4AW2JTlMpNx5Jbd0rt9/dVQrS9dQH6GmqhXTKzPktQ== 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; bh=gjsAWiWZUcrM6X2JItyUUXXz6ncRYoTc2/jMGU1dsic=; b=d53iYflrX2+hNL7MYB1Ndk+CWCqF1ty+Ccuk6HouiPQ+c7q0nI9X8yzI8Bqmo58bafgUDe5qkC5fhKYMBXqgDCv/W9whCb/CLjObtZw8SzYplevAt+HQ0IeurD9iSRkbrc5zTXMiG8t6p7W3DFHEDaLThKa16d2i+/IQvf7gnxGYZvi1mXfN5osvaWKVmWwDA37C7geYpf9IdZDjJAeMCAx+tY0iqzdkGTDshN4tLVjtwclzz1i6aXOdbsKk0MCH2OO4Zdl+wJwT2ziGfvGMjKNvgtvPt1YYmXuk5ivGFPinYIpT5P1BF63xFv35o6/IpMl8ox/OgKbb09e+/f1imQ== 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=none 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=gjsAWiWZUcrM6X2JItyUUXXz6ncRYoTc2/jMGU1dsic=; b=Dc0q8h1sb6qi/S4Yruel5AXfkx/qbM2xYuPDnGtalahTAqZMpcYtRXE2ykkRCCel3vnjyQ29qePy/r0VXROU/P4rWOHFmUBTxwOQpttugsh2csVyACZ7iRRWWYgZ8YeD1kh9/BG1EKRGzmGSWl8TvGN0JiOcmBNrmZtXCGPhpQ9BCS3fta36wJRscCj4x4VBy+pTFEsqC92BR7UEHlO7mlIy1oaz2HigtcF6u1yBeed8Tb8Tpum/G1HXi1FWn4TeeZMWsz4dXrvgCEG91N2pCNJTek80cij+tkG8ebKMqX4FalxIq55i1y/m8Leu5pGv4csyLhHu6J0Xnj2Zhj7kfA== Received: from DM6PR12CA0021.namprd12.prod.outlook.com (2603:10b6:5:1c0::34) by CH2PR12MB4183.namprd12.prod.outlook.com (2603:10b6:610:7a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.14; Wed, 29 Sep 2021 14:53:09 +0000 Received: from DM6NAM11FT064.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1c0:cafe::d9) by DM6PR12CA0021.outlook.office365.com (2603:10b6:5:1c0::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15 via Frontend Transport; Wed, 29 Sep 2021 14:53:09 +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.4566.14 via Frontend Transport; Wed, 29 Sep 2021 14:53:08 +0000 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 29 Sep 2021 14:53:08 +0000 Received: from nvidia.com (172.20.187.5) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 29 Sep 2021 14:53:06 +0000 From: To: CC: Dmitry Kozlyuk , Matan Azrad , Olivier Matz , Andrew Rybchenko Date: Wed, 29 Sep 2021 17:52:47 +0300 Message-ID: <20210929145249.2176811-3-dkozlyuk@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210929145249.2176811-1-dkozlyuk@nvidia.com> References: <20210818090755.2419483-1-dkozlyuk@nvidia.com> <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 DRHQMAIL107.nvidia.com (10.27.9.16) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f62129d2-49b1-4391-50d3-08d98358da31 X-MS-TrafficTypeDiagnostic: CH2PR12MB4183: X-Microsoft-Antispam-PRVS: X-MS-Exchange-Transport-Forked: True X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3vR/12SUseJWZfvUcRChKB3AZOJKd5ZTbBSLJonyWFWIUDsZ1OTHacvO6oWJE/hzSzAU0Iyh4r5mde3aTIZ2ltsZuNe3N6OD7Dy5EeyIgJeZFgyTMZHKNlFYkFu/mx9ZMvJ/rhMdn2MLYU8ud0jeVuStuDATHUnELoW1+bKig4GcbIv+cTRFHXmHJOPJA/v1TSSM0DmPuuUu2bbjrhHcMGfkjLEjwRmMMythWtQmihglAnXofQaqo4dVFMa2ROlfudGKUC7wUe12gKPy/UROva9OH24Xmzwmz4a2yq8Q+cDVFIi9nWPrKEhfOfrQ97OODcnz6nxdJ0dYXlhlP2ftqhRiOMkJXFq3hBDTHAUVDchMwt9xKA8pY+byuwVvaUvytKh/4FoN0SQW9EsXdtqnMCl0xwJdWVyp1FQGq+rYtO7IyseUDsboBN9a+sx01azZjSe9sfxI6DKB7fWtQUBjDrTxElRyddbNhgs8O0VN5JlJ4SfzZ0ZG3+toXbqer/x1WhVdo4zZwSCyv1MR9QaM3WT0g9zkcSbo136IlHrx5FA0gp8MhkZ/RGCaEPDgH0AabGkD8F57zE5YLHqAOTVxNn4XcD2SvdvggaeJOon2l05U+yRP2qcqX1TSotIzct/LTZ7r9AXeHXxiSA8y12GLJMTWTsOP940dvUNI7adTaf0zbccAZUc5U4XCEmmLETPM54/c7Y6pZqzp+Z0dkHehbg== 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)(6916009)(83380400001)(186003)(2876002)(7696005)(16526019)(70206006)(316002)(356005)(508600001)(7636003)(26005)(36756003)(6286002)(1076003)(107886003)(70586007)(6666004)(82310400003)(4326008)(8936002)(426003)(8676002)(55016002)(336012)(47076005)(5660300002)(2616005)(86362001)(2906002)(36860700001)(54906003); DIR:OUT; SFP:1101; X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Sep 2021 14:53:08.9443 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f62129d2-49b1-4391-50d3-08d98358da31 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: CH2PR12MB4183 Subject: [dpdk-dev] [PATCH v2 2/4] mempool: add non-IO flag 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" From: Dmitry Kozlyuk Mempool is a generic allocator that is not necessarily used for device IO operations and its memory for DMA. Add MEMPOOL_F_NON_IO flag to mark such mempools. Signed-off-by: Dmitry Kozlyuk Acked-by: Matan Azrad --- doc/guides/rel_notes/release_21_11.rst | 3 +++ lib/mempool/rte_mempool.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst index f85dc99c8b..873beda633 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -155,6 +155,9 @@ API Changes the crypto/security operation. This field will be used to communicate events such as soft expiry with IPsec in lookaside mode. +* mempool: Added ``MEMPOOL_F_NON_IO`` flag to give a hint to DPDK components + that objects from this pool will not be used for device IO (e.g. DMA). + ABI Changes ----------- diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h index c81e488851..4d18957d6d 100644 --- a/lib/mempool/rte_mempool.h +++ b/lib/mempool/rte_mempool.h @@ -263,6 +263,7 @@ struct rte_mempool { #define MEMPOOL_F_SC_GET 0x0008 /**< Default get is "single-consumer".*/ #define MEMPOOL_F_POOL_CREATED 0x0010 /**< Internal: pool is created. */ #define MEMPOOL_F_NO_IOVA_CONTIG 0x0020 /**< Don't need IOVA contiguous objs. */ +#define MEMPOOL_F_NON_IO 0x0040 /**< Not used for device IO (DMA). */ /** * @internal When debug is enabled, store some statistics. @@ -992,6 +993,9 @@ typedef void (rte_mempool_ctor_t)(struct rte_mempool *, void *); * "single-consumer". Otherwise, it is "multi-consumers". * - MEMPOOL_F_NO_IOVA_CONTIG: If set, allocated objects won't * necessarily be contiguous in IO memory. + * - MEMPOOL_F_NO_IO: If set, the mempool is considered to be + * never used for device IO, i.e. DMA operations, + * which may affect some PMD behavior. * @return * The pointer to the new allocated mempool, on success. NULL on error * with rte_errno set appropriately. Possible rte_errno values include: -- 2.25.1