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 5E6F4A0C40; Thu, 29 Jul 2021 12:44:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 48F0D40687; Thu, 29 Jul 2021 12:44:55 +0200 (CEST) Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) by mails.dpdk.org (Postfix) with ESMTP id A4EBE40041 for ; Thu, 29 Jul 2021 12:44:54 +0200 (CEST) Received: by mail-io1-f52.google.com with SMTP id y9so6494441iox.2 for ; Thu, 29 Jul 2021 03:44:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=v8pqyB4jneEmoNdg3V2opSdumpdgp4UcIihMztP4Q7M=; b=IaR4mDuppKxO+z6w26r24epK/nLMeJcoXABuJaDH3rjCGJCS+T8UuRE7Voqjg+d5hj YYdJGdanafFD/WgvrD+beO0hHdcTlcYmwOqB7qtKqjnAPvofmTWakctQNyHopIa9/IKL +6PztN/ytWgbxynyZDNQTV1RTGuhjBkZLA0Wu7H6VEgASmCryYJm7jcD6MH1uzNuN0vc YTEJe+CTzRPcHr5C1ymTAMOSSNDkqJWb6WdVvxpeqjHvltSyjZ7B1ruwH3knl7bLcwZ2 MztKNCr41UiBJvsCoO51b6NN+GGfBgFgQatuwmRPChNLCgN+4CKt0u2LxhfF0YansmAf 9ioQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=v8pqyB4jneEmoNdg3V2opSdumpdgp4UcIihMztP4Q7M=; b=ID3dqCgo49AV14XRTIo+UA/2k+lhNXo0y1Oxn0xoz8VRp+vovaltO3LYUXnLRhxGDy LbV/O3Bhf5Npb0a7PbeeyD2wICFm2jSvEw5IIA+IsMJjuPMgHyVeM8uEWhVzd92rvBCU h4dC8Ttf6YZnPXBXfceHOS3MnEU32Qyv0JVymJHxdJM9ywTvLlilm+aWOVZNuwiyCd8J G88fByiH22XDnWYj2Hl5sf5aP0Qaj8umu7ULqBCOInkBqKdgorLLsWGTut9ZXQjlpQQ0 h6VkcY/G4qtTwhvbCXGic2V6tpcmSJx9Dfk6qIJGJquqn4vgRbvMiXArBD06Ox4G8979 6Jxg== X-Gm-Message-State: AOAM531hNSL0TGxHi29IDDAuRggxG+GuMPmu8wujqX50LNZm0weqtZ0G AwJIVHJw470yY0eqOb/oEKd55nuPVzqcGrhHphg= X-Google-Smtp-Source: ABdhPJw8XyPgKv+06ncdRq0a637e61DDorWYRw+bIc0J+/ExFl4BvHai0YqFhOftvIKd1S6k/sHqx8Y69cwVOsL+4z0= X-Received: by 2002:a6b:510c:: with SMTP id f12mr3519208iob.59.1627555493977; Thu, 29 Jul 2021 03:44:53 -0700 (PDT) MIME-Version: 1.0 References: <1625231891-2963-1-git-send-email-fengchengwen@huawei.com> <1627357200-15291-1-git-send-email-fengchengwen@huawei.com> <1627357200-15291-2-git-send-email-fengchengwen@huawei.com> <9da78c1f-c2e4-cf71-9d07-dd539a16c1d0@huawei.com> In-Reply-To: <9da78c1f-c2e4-cf71-9d07-dd539a16c1d0@huawei.com> From: Jerin Jacob Date: Thu, 29 Jul 2021 16:14:27 +0530 Message-ID: To: fengchengwen Cc: Bruce Richardson , Thomas Monjalon , Ferruh Yigit , Jerin Jacob , Andrew Rybchenko , dpdk-dev , =?UTF-8?Q?Morten_Br=C3=B8rup?= , Nipun Gupta , Hemant Agrawal , Maxime Coquelin , Honnappa Nagarahalli , David Marchand , Satananda Burla , Prasun Kapoor , "Ananyev, Konstantin" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v11 1/2] dmadev: introduce DMA device library 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 Thu, Jul 29, 2021 at 6:56 AM fengchengwen wrot= e: > > Thanks, inline comment > > On 2021/7/28 19:13, Bruce Richardson wrote: > > On Tue, Jul 27, 2021 at 11:39:59AM +0800, Chengwen Feng wrote: > >> This patch introduce 'dmadevice' which is a generic type of DMA > >> device. > >> > >> The APIs of dmadev library exposes some generic operations which can > >> enable configuration and I/O with the DMA devices. > >> > >> Signed-off-by: Chengwen Feng > >> Acked-by: Bruce Richardson > >> Acked-by: Morten Br=C3=B8rup > >> --- > > > > Thanks for this. Before it gets merged, I believe it needs to be split > > further into multiple patches (say 4 or so) rather than adding the whol= e > > lib in one go. > > > > Normally, I believe the split would be something like: > > * basic device structures and infrastructure e.g. alloc and release > > functions > > * device config functions (and structures to go along with them) > > such as configure and queue_setup > > * data plane functions > > > > I will try for it > Maybe one patch for public file, one for pmd header file, one for > implementation, and last for doc. +1. > > > Documentation would be included in each of the patches, rather than don= e as > > a block at the end. > > > > Besides that, I have one small additional requests for the API. Based o= ff > > feedback for ioat driver, we added in the following function to that AP= I, > > and we probably need something similar in dmadev: > > > > rte_ioat_burst_capacity() > > > > For our implementation this returns the number of elements that can be > > enqueued to the ring, at least for the current burst/batch of packets. = We > > did the API this way because there can be additional limits beyond ring > > size on each individual burst beyond just the raw ring capacity, e.g. e= ven > > if there are 4k ring elements free, there may be limits on the max burs= t > > size the hardware can do, or limits on the number of outstanding > > batches etc. > > > > Therefore can I request the addition of rte_dmadev_burst_capacity() [or > > something similarly named] to the basic dmadev API set. For most hardwa= re, > > I think this will likely be the remaining free ring size, but I don't > > believe the API should commit to that. The use case it was added for wa= s to > > enable an application which needs to do a multi-copy operation to check > > that all copies can fit or not before enqueuing the first one. This is > > important for hardware that doesn't have scatter-gather list support. Yes. Could you add the following to enable scatter-gather support in rte_dmadev_info::sge_max /** > Remaining capacity can be inferred by ring_idx which return from enqueue = and > dequeue APIs. > So I don't think this API needs to be added. > > For scatter-gather list, there maybe a hardware limit for max src or dst = entry > size, I prefer add 'max_sges' filed in struct rte_dmadev_info to indicate= it. > > > > > /Bruce > > > > PS: One typo in code flagged below too. > > > > > >> + */ > >> +enum rte_dma_status_code { > >> + RTE_DMA_STATUS_SUCCESSFUL, > >> + /**< The operation completed successfully. */ > >> + RTE_DMA_STATUS_USRER_ABORT, > > > > Typo here ^^^ > > > > OK, USRER->USER will fix later > > > . > >