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 B6ADAA034F; Tue, 12 Oct 2021 02:04:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4CE764113E; Tue, 12 Oct 2021 02:04:36 +0200 (CEST) Received: from AZHDRRW-EX01.nvidia.com (azhdrrw-ex01.nvidia.com [20.51.104.162]) by mails.dpdk.org (Postfix) with ESMTP id 3B57D4067C for ; Tue, 12 Oct 2021 02:04:33 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.174) 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:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H1owNIsP9BrjiRMthEL3C1DGl72C7vVfS2XuVLpN30COp+sTu72KFAd7gi0Br6cFXk8EPhJcj7qefA2HHY7sZ8k/jYhIOHDAEjCT1eeF5/O5Ki48qhx4zTdJG1aIzBI9FBajojhkD8SI4EXUeylOcjasHexHhRTiAB2Nqk9uPQclbRQBW+ZfLf0te7Tx3Uz8xvEj7gQ/IgXXjsVlA2YRj2+ylxfZb/z7mKYYPatvCQLJ4317nzMzpIOaz2B5BuO2gDi3pV+OVJ2IvmxPBb5blR4yCkPfErEf0PqmDPWV+2any6Xt0Felriz5HO9+hTHWxPKplj/2QKk1xUXVOOVSqQ== 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=6jZPVJdZSdvBfEVcu0sm0EWJWLNv19v+RQX6pAQOQg4=; b=igr4m1TIUklqLo5L7C4wVU7lXfER9/4vY9ZtutZvu8XxaTZM/UfbBNOec5F1C06vGIbQeN4707Vfq//MK2Y2Mi7bleTskON8DKfFGaviP+WxQT0CE3t+y6VK/X9KXeNL12Ow02+UlZ6PLzATpBD4znqm3EXEPqu+uOUohzNAEqhGOMZ0ACQF2bcd7B+ZtnG+5bZ+O4c5qV3JC6yaEmSkZDm3KG0W6gnWHD3Epkjae1ifGZpFgvJrAshKMnBC8mx0zBLv3xlxgy4YmGc9J3IspDMFD1G4dmAMbF60INhp4PyBD0ZyeFDCDVdcNFQEW98US0hJ7qHBnGH/dqudysY8OQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=6wind.com 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=6jZPVJdZSdvBfEVcu0sm0EWJWLNv19v+RQX6pAQOQg4=; b=KfyLN1PDHyF4td5jBQIoycRC/d5G8AhYbgurFdT1EzdaRg3jx6i0YUjaC7v2dsemx++qsC2rSg8mq20sE0YXq3W0tbyehgFHYTOAHZalFvBNV5niL9IDQH1PI+mzXBnGcN783Zwma2NvaTBryt2mk+x5jg7up1AfVSbjXmrGUYErcqVaUfgK2apZ9v+vjs+4vu7g64/hcIcpWNYL451b3tAwmgS7LkA8qzfOXB4fTk6UrPoVue4p8ne3wQRlB8SNd73MKH4T/vHvlNv8N4gaulJUQ8ImbDsyMTKimrDC+EGeULb0kR/xiBMS9Wg6+NaKgDG5DU6ygAii6ksQiAzUGw== Received: from BN9P221CA0003.NAMP221.PROD.OUTLOOK.COM (2603:10b6:408:10a::25) by MN2PR12MB3581.namprd12.prod.outlook.com (2603:10b6:208:c8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Tue, 12 Oct 2021 00:04:31 +0000 Received: from BN8NAM11FT064.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10a:cafe::6c) by BN9P221CA0003.outlook.office365.com (2603:10b6:408:10a::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.25 via Frontend Transport; Tue, 12 Oct 2021 00:04:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; 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 BN8NAM11FT064.mail.protection.outlook.com (10.13.176.160) 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:30 +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:28 +0000 From: Dmitry Kozlyuk To: CC: Thomas Monjalon , Matan Azrad , Olivier Matz , Andrew Rybchenko Date: Tue, 12 Oct 2021 03:04:07 +0300 Message-ID: <20211012000409.2751908-3-dkozlyuk@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211012000409.2751908-1-dkozlyuk@nvidia.com> References: <20210929145249.2176811-1-dkozlyuk@nvidia.com> <20211012000409.2751908-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: 05b8a620-31a7-4c2c-56d4-08d98d13dd7a X-MS-TrafficTypeDiagnostic: MN2PR12MB3581: 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:6108; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BbwTi4pxhalO8MMhPMwdpXDulOhSVm5sDp/gpheXOrV4yBc39SUtuj9reNeVXpX2gZMf5srnK/lMGkv8iT/vp9O29209q9+vA14rXoUMlKsbIEHcrkk3na1JbEfDeAGKcmnYrO54n3bkE/6pjc6YNJPXO3UfP1ZdUSwPojD96iMm+Apox1LxlpivLBwlEN6F+v95B4F9Sr95EkwZ6D3/zsO+CDOohIMKV+Vl8SO8oRvEHtirnn8mBmrTKs70azNuehN5cR7j8P/7YvotlYpfRd6gp5JvgwPb8cV4l6xvDelpFmL03iHKs4eZdI+n6BPvvrzSHhIt+KuH56s+nAjQYzb5zOMclQH8CMXb9UWU2Yhi/gk8rOGhsEZP+J65JnUrMIGj3NmFPt7W2hupcU6DBmz/3B/lv53zJHdtkgIptTn/gj4OmjLh6oEqvXqDM0jYMZ+YmB2oNT4TH1194UwVcUvHcCixAfx8GnGbEmEGXMp9c6vJROtZpDpnwcUQoHTTXQsXz4QQPZBNv+FSqyx8H+ppG24GEX0XHvBNWmA6gwUOHUqArrVOiVoda76YXtfEQc4coPWpBmUrjIwTilEr7btGD7s0yP5RZs6Yw9dOl+iZlWOkvPTeWD+tncY5oUPw2FNk5CWXdVBn0L4CQ50vT1xfjDMnbrI0JnhE8nb/wLNlatmd+YskPFKr6Khl7AhXNEivqZwt4VnyUSpTRYmaIjH/kQDNJMs7aEeZN+xxHFomgqDKn4htaG0+hq4aQQWraDOZvIJPp4OJ2kfTaODBHqnzl5Wv1bf+SKT5xFufl84= 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)(7636003)(70206006)(2906002)(316002)(356005)(508600001)(55016002)(6916009)(336012)(4326008)(426003)(966005)(2616005)(82310400003)(47076005)(54906003)(83380400001)(16526019)(36860700001)(26005)(186003)(6286002)(107886003)(70586007)(8936002)(6666004)(36756003)(8676002)(1076003)(86362001)(5660300002)(7696005); DIR:OUT; SFP:1101; X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2021 00:04:30.7504 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 05b8a620-31a7-4c2c-56d4-08d98d13dd7a 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: BN8NAM11FT064.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3581 Subject: [dpdk-dev] [PATCH v3 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" 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. Discussion: https://mails.dpdk.org/archives/dev/2021-August/216654.html 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 5036641842..dbabdc9759 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -208,6 +208,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 e2bf40aa09..b48d9f89c2 100644 --- a/lib/mempool/rte_mempool.h +++ b/lib/mempool/rte_mempool.h @@ -262,6 +262,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. @@ -991,6 +992,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_NON_IO: If set, the mempool is considered to be + * never used for device IO, i.e. for DMA operations. + * It's a hint to other components and does not affect the mempool 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