DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: "Liu, Yong" <yong.liu@intel.com>,
	"Burakov, Anatoly" <anatoly.burakov@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"McDaniel, Timothy" <timothy.mcdaniel@intel.com>,
	"Xing, Beilei" <beilei.xing@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>,
	"Yang, Qiming" <qiming.yang@intel.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>,
	"Wang,  Haiyue" <haiyue.wang@intel.com>,
	Matan Azrad <matan@nvidia.com>,
	"Shahaf Shuler" <shahafs@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	"Li, Miao" <miao.li@intel.com>
Cc: "Loftus, Ciara" <ciara.loftus@intel.com>
Subject: Re: [dpdk-dev] [21.08 PATCH v1 1/2] power: invert the monitor check
Date: Fri, 28 May 2021 09:09:11 +0000	[thread overview]
Message-ID: <DM6PR11MB44914DF238E85C40E2FE9B769A229@DM6PR11MB4491.namprd11.prod.outlook.com> (raw)
In-Reply-To: <d4096521267e44029c12f69d0c4bb41d@intel.com>


> >
> > On 25-May-21 10:15 AM, Liu, Yong wrote:
> > >
> > >
> > >> -----Original Message-----
> > >> From: dev <dev-bounces@dpdk.org> On Behalf Of Anatoly Burakov
> > >> Sent: Tuesday, May 11, 2021 11:32 PM
> > >> To: dev@dpdk.org; McDaniel, Timothy <timothy.mcdaniel@intel.com>;
> > Xing,
> > >> Beilei <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Yang,
> > >> Qiming <qiming.yang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>;
> > >> Wang, Haiyue <haiyue.wang@intel.com>; Matan Azrad
> > >> <matan@nvidia.com>; Shahaf Shuler <shahafs@nvidia.com>; Viacheslav
> > >> Ovsiienko <viacheslavo@nvidia.com>; Richardson, Bruce
> > >> <bruce.richardson@intel.com>; Ananyev, Konstantin
> > >> <konstantin.ananyev@intel.com>
> > >> Cc: Loftus, Ciara <ciara.loftus@intel.com>
> > >> Subject: [dpdk-dev] [21.08 PATCH v1 1/2] power: invert the monitor check
> > >>
> > >> Previously, the semantics of power monitor were such that we were
> > >> checking current value against the expected value, and if they matched,
> > >> then the sleep was aborted. This is somewhat inflexible, because it only
> > >> allowed us to check for a specific value.
> > >>
> > >> We can reverse the check, and instead have monitor sleep to be aborted
> > >> if the expected value *doesn't* match what's in memory. This allows us
> > >> to both implement all currently implemented driver code, as well as
> > >> support more use cases which don't easily map to previous semantics
> > >> (such as waiting on writes to AF_XDP counter value).
> > >>
> > >
> > > Hi Anatoly,
> > > In virtio spec, packed formatted descriptor utilizes two bits for representing
> > the status. One bit for available status, one bit for used status.
> > > For checking the status more precisely, it is need to check value against the
> > expected value.
> > > The monitor function in virtio datapath still can work with new semantics,
> > but it may lead to some useless io call.
> > > Base on that, I'd like to keep previous semantics.
> > >
> > > Regards,
> > > Marvin
> > >
> >
> > Thanks for your feedback! Would making this an option make things
> > better? Because we need the inverted semantics for AF_XDP, it can't work
> > without it. So, we either invert all of them, or we have an option to do
> > regular or inverted check on a per-condition basis. Would that work?
> >
> 
> That will be great if we can select the check type based on input parameter.
> Just in virtio datapath, we need both inverted and original semantics for different ring formats.
> 

Should we probably the consider introducing _check_ callback to be provided by PMD?
So we can leave these various check details inside PMD itself. 
And monitor will just read the specified address and call the callback.
Konstantin



  reply	other threads:[~2021-05-28  9:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 15:31 Anatoly Burakov
2021-05-11 15:31 ` [dpdk-dev] [21.08 PATCH v1 2/2] net/af_xdp: add power monitor support Anatoly Burakov
2021-05-11 15:37   ` Burakov, Anatoly
2021-05-12 10:43   ` Loftus, Ciara
2021-06-01 15:02   ` Liang Ma
2021-05-11 15:39 ` [dpdk-dev] [21.08 PATCH v1 1/2] power: invert the monitor check Burakov, Anatoly
2021-05-12 17:57   ` Alexander Kozyrev
2021-05-11 16:28 ` McDaniel, Timothy
2021-05-25  9:15 ` Liu, Yong
2021-05-27 13:06   ` Burakov, Anatoly
2021-05-28  1:07     ` Liu, Yong
2021-05-28  9:09       ` Ananyev, Konstantin [this message]
2021-06-01 14:21         ` Burakov, Anatoly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB44914DF238E85C40E2FE9B769A229@DM6PR11MB4491.namprd11.prod.outlook.com \
    --to=konstantin.ananyev@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=ciara.loftus@intel.com \
    --cc=dev@dpdk.org \
    --cc=haiyue.wang@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=matan@nvidia.com \
    --cc=miao.li@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=shahafs@nvidia.com \
    --cc=timothy.mcdaniel@intel.com \
    --cc=viacheslavo@nvidia.com \
    --cc=yong.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).