[dpdk-dev] [21.08 PATCH v1 1/2] power: invert the monitor check

Ananyev, Konstantin konstantin.ananyev at intel.com
Fri May 28 11:09:11 CEST 2021


> >
> > On 25-May-21 10:15 AM, Liu, Yong wrote:
> > >
> > >
> > >> -----Original Message-----
> > >> From: dev <dev-bounces at dpdk.org> On Behalf Of Anatoly Burakov
> > >> Sent: Tuesday, May 11, 2021 11:32 PM
> > >> To: dev at dpdk.org; McDaniel, Timothy <timothy.mcdaniel at intel.com>;
> > Xing,
> > >> Beilei <beilei.xing at intel.com>; Wu, Jingjing <jingjing.wu at intel.com>; Yang,
> > >> Qiming <qiming.yang at intel.com>; Zhang, Qi Z <qi.z.zhang at intel.com>;
> > >> Wang, Haiyue <haiyue.wang at intel.com>; Matan Azrad
> > >> <matan at nvidia.com>; Shahaf Shuler <shahafs at nvidia.com>; Viacheslav
> > >> Ovsiienko <viacheslavo at nvidia.com>; Richardson, Bruce
> > >> <bruce.richardson at intel.com>; Ananyev, Konstantin
> > >> <konstantin.ananyev at intel.com>
> > >> Cc: Loftus, Ciara <ciara.loftus at 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




More information about the dev mailing list