From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D2746A04DD; Wed, 28 Oct 2020 16:39:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A4CBACC17; Wed, 28 Oct 2020 16:39:49 +0100 (CET) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by dpdk.org (Postfix) with ESMTP id 73D1CCBF0 for ; Wed, 28 Oct 2020 16:39:48 +0100 (CET) Received: by mail-io1-f66.google.com with SMTP id s7so4801449iol.12 for ; Wed, 28 Oct 2020 08:39:48 -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; bh=Oi9Ho7VG/FGz+JtZvzrntlpugHBQY/xdn+aPtvIo+B8=; b=Ub4fXa1G/CEXsDfiq6UCOZ1DuD3m50etEZSlkh1mPctZzI39qRDx0REXYJeL321Hkl qer7rLJU6HdTFTAdCcm5GsodDgtxqxSje4mndrpOyu+b8sKz4ENXeahIaydjAQbRsyO6 xGiMBtpXvWBCvgz7yGnGyZNZWvg1EPkSc1e77i1Geuoq9X3VhH6UlF5G5rdZneQf0KAK tSk4F4rDtLprEVn8Xw5Dzibk8w/2u737KjxqQZC2HytRoN+B/LZ4KLYVIHt1+aukTtHs sXqZrQT4SpV9HPrB4ZkjKu3F5JXWHpT7/70UEOV3/Q/3+RUfTXM5ZIWm8yY2WZ+bWu/s JJoQ== 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; bh=Oi9Ho7VG/FGz+JtZvzrntlpugHBQY/xdn+aPtvIo+B8=; b=OQFAZWVICI8rSqAaJb7csDX6OwnKsER4jXei0ec9b23oqcAM/zMgNyAFycyw35UwBV S8bhGOg87cQEC8hmaLaPvHxLSbYC7Pz1kKZxzM2H+AfseLlSLvgAoZBVelXXWweKPNMm K9dSDQbTKWs6Nr777xgiEKhD/mFzVzc1+uVhBRddMOuXKU5FSjKkJ/kxCxWCag67xrny GLcknOFDkGgIDjPUpuIBUbJkqTC+jDcY0VlPQWpwzPk+VKLs5ZXuWgyTLcSeK5tnzqMb ES3CILeNYoIN/hwOdEBPnxwUroGlXFw65Gwf4exYVspPwPCkYxdOrEz08B58YBVYqDKl Nztg== X-Gm-Message-State: AOAM530nkYZTi3z/kCXa3GE8PgmrPj7LHIV/BJT1TBdmshgVpMxMPBvA IXfFst7MtT1oD5saE6dvwZu+guI4+X/1neQfSOA= X-Google-Smtp-Source: ABdhPJzFHzxesX61/T7haxkevzSikjGQcKSLVeRpU56cLIH8c9K+1X7PROZF/asQfsX9JUrXfg7glXSTN39YjvxTeTI= X-Received: by 2002:a5d:9615:: with SMTP id w21mr6559607iol.59.1603899586870; Wed, 28 Oct 2020 08:39:46 -0700 (PDT) MIME-Version: 1.0 References: <1603494392-7181-1-git-send-email-liang.j.ma@intel.com> <20201028133507.GC29706@sivswdev09.ir.intel.com> <2373759.1G5EZAqFcn@thomas> In-Reply-To: From: Jerin Jacob Date: Wed, 28 Oct 2020 21:09:30 +0530 Message-ID: To: "Ananyev, Konstantin" Cc: Thomas Monjalon , "Ma, Liang J" , dpdk-dev , "Ruifeng Wang (Arm Technology China)" , "Wang, Haiyue" , "Richardson, Bruce" , "Hunt, David" , Neil Horman , "McDaniel, Timothy" , "Eads, Gage" , Marcin Wojtas , Guy Tzalik , Ajit Khaparde , Harman Kalra , John Daley , "Wei Hu (Xavier" , Ziyang Xuan , "matan@nvidia.com" , Yong Wang , "david.marchand@redhat.com" Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v10 0/9] Add PMD power mgmt X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 Wed, Oct 28, 2020 at 9:04 PM Ananyev, Konstantin wrote: > > > > > > > 28/10/2020 14:49, Jerin Jacob: > > > > > On Wed, Oct 28, 2020 at 7:05 PM Liang, Ma wrote: > > > > > > > > > > > > Hi Thomas, > > > > > > I think I addressed all of the questions in relation to V9. I don't think I can solve the issue of a generic API on my own. From the > > > > Community Call last week Jerin also said that a generic was investigated but that a single solution wasn't feasible. > > > > > > > > > > I think, From the architecture point of view, the specific > > > > > functionally of UMONITOR may not be abstracted. > > > > > But from the ethdev callback point of view, Can it be abstracted in > > > > > such a way that packet notification available through > > > > > checking interrupt status register or ring descriptor location, etc by > > > > > the driver. Use that callback as a notification mechanism rather > > > > > than defining a memory-based scheme that UMONITOR expects? or similar > > > > > thoughts on abstraction. > > > > > > I think there is probably some sort of misunderstanding. > > > This API is not about providing acync notification when next packet arrives. > > > This is about to putting core to sleep till some event (or timeout) happens. > > > From my perspective the closest analogy: cond_timedwait(). > > > So we need PMD to tell us what will be the address of the condition variable > > > we should sleep on. > > > > > > > I agree with Jerin. > > > > The ethdev API is the blocking problem. > > > > First problem: it is not well explained in doxygen. > > > > Second problem: it is probably not generic enough (if we understand it well) > > > > > > It is an address to sleep(/wakeup) on, plus expected value. > > > Honestly, I can't think-up of anything even more generic then that. > > > If you guys have something particular in mind - please share. > > > > Current PMD callback: > > typedef int (*eth_get_wake_addr_t)(void *rxq, volatile void > > **tail_desc_addr, + uint64_t *expected, uint64_t *mask, uint8_t > > *data_sz); > > > > Can we make it as > > typedef void (*core_sleep_t)(void *rxq) > > > > if we do such abstraction and "move the polling on memory by HW/CPU" > > to the driver using a helper function then > > I can think of abstracting in some way in all PMDs. > > Ok I see, thanks for explanation. > From my perspective main disadvantage of such approach - > it can't be extended easily. > If/when will have an ability for core to sleep/wake-up on multiple events > (multiple addresses) will have to either rework that API again. I think, we can enumerate the policies and pass the associated structures as input to the driver. > > > > > Note: core_sleep_t can take some more arguments such as enumerated > > policy if something more needs to be pushed to the driver. > > > > Thoughts? > > > > > > > > > > > > > > > This API is experimental and other vendor support can be added as needed. If there are any other open issue let me know? > > > > > > > > Being experimental is not an excuse to throw something > > > > which is not satisfying. > > > > > > > > > > >