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 25B10A034F; Tue, 12 Oct 2021 05:38:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A2BF0410E5; Tue, 12 Oct 2021 05:38:13 +0200 (CEST) Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) by mails.dpdk.org (Postfix) with ESMTP id C2417410E4 for ; Tue, 12 Oct 2021 05:38:12 +0200 (CEST) Received: by mail-io1-f49.google.com with SMTP id n7so13281251iod.0 for ; Mon, 11 Oct 2021 20:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iXc4Tsm6dAG/b/ZOjaRIHXUUD9yr53mOYQmQuqZ+M3g=; b=pFzioO3GquCnA80kVO37wwPW6N5DlBkrhdS2uML497yV6M7sP2rTUhZrK2pU49H20C Np8LRdDPJIvW9SOgYUTTTODXrnQHk4kIu/ReIZFcmo2eegJXD2h+DmztO/lrWNo+sZqv mGsjwPSqApPdJ1X71EOWNPj/GRdpyLgPRw1eJcDE8qlWSE6WrGOpgECoQSIYSG1R35PC uxQ911T21ao0eOGvGvsedwswdBPbSQ00eth4O/CuwR1I9UXYINoggqtR4cuA2aHiFNsV vNYjcW5BijS8Q148fw7urIB2yR+N27jTI6DtQoat0RfXZj01iaBvbrl2vrNXtVB0u4k7 HVLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iXc4Tsm6dAG/b/ZOjaRIHXUUD9yr53mOYQmQuqZ+M3g=; b=kO3sDhMhvooC9uQCoCx1Wn4OLYQUrArpCp0CFn8kYi0Nf6lMkavZWQvZIqJLG9sgho b44P2LP3wJStiBLs0IWU3mNOeWHAfUbJ8f/xTA1dnLTKIwYL8iAHu60MdpiHwrb8IwGj Wz3skUXQll/hwOiZ6xpMnJN5cuwf1NFmiVl3MZAOrX+GGOoPpL6hupO7MD02jjPYS+dv IvTaeXBke1w9zDwXJfhscpfLzjeHO1OWlERdLoY+QouUbWp6/k/Wsl5cm2ngR0czt4j1 ovnkAXPzdGsI+LQj23W/wSAm+RHTzQ8ybfbxKve8nfw3p4U5nAM/LagQ1aE0PuKz8QBa X/gw== X-Gm-Message-State: AOAM533LU9Whbs4y8f69q+/c9htt8XhDEtlHg3Ujt5g7Z451AF9rPJow 6DjDvnshdsJR4DTibIxjnpkfBFXNkwH8yujKkCEC5VuU+uA= X-Google-Smtp-Source: ABdhPJwnV+N/9B2PQ2YXQ8EfRb1mDh37Z3SJCjCgQpx/8T7P7ypUYRxN1OoyiG6bdmYW6LOB9aQKEfb9aiThBHNkaSA= X-Received: by 2002:a6b:6b08:: with SMTP id g8mr1032111ioc.199.1634009891991; Mon, 11 Oct 2021 20:38:11 -0700 (PDT) MIME-Version: 1.0 References: <20210929145249.2176811-1-dkozlyuk@nvidia.com> <20211012000409.2751908-1-dkozlyuk@nvidia.com> <20211012000409.2751908-3-dkozlyuk@nvidia.com> In-Reply-To: <20211012000409.2751908-3-dkozlyuk@nvidia.com> From: Jerin Jacob Date: Tue, 12 Oct 2021 09:07:45 +0530 Message-ID: To: Dmitry Kozlyuk Cc: dpdk-dev , Thomas Monjalon , Matan Azrad , Olivier Matz , Andrew Rybchenko Content-Type: text/plain; charset="UTF-8" Subject: Re: [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" On Tue, Oct 12, 2021 at 5:34 AM Dmitry Kozlyuk wrote: > > 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). */ Since it is the hint, How about changing the flag to MEMPOOL_F_HINT_NON_IO. Otherwise, it looks good to me. Acked-by: Jerin Jacob > > /** > * @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 >