DPDK usage discussions
 help / color / mirror / Atom feed
From: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
To: Konstantin Ananyev <konstantin.ananyev@huawei.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	venkatesh bs <venki.bsv@gmail.com>
Cc: "users@dpdk.org" <users@dpdk.org>, "dev@dpdk.org" <dev@dpdk.org>,
	nd <nd@arm.com>, nd <nd@arm.com>
Subject: RE: Regarding User Data in DPDK ACL Library.
Date: Mon, 21 Nov 2022 16:56:30 +0000	[thread overview]
Message-ID: <DBAPR08MB5814F55AAB19273AA75D0566980A9@DBAPR08MB5814.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <cb113959da1446e0bac15392ce37b7b8@huawei.com>

<snip>
> 
> > > > On Thu, 17 Nov 2022 19:28:12 +0530 venkatesh bs
> > > > <venki.bsv@gmail.com> wrote:
> > > >
> > > > > Hi DPDK Team,
> > > > >
> > > > > After the ACL match for highest priority DPDK Classification API
> > > > > returns User Data Which is as mentioned below in the document.
> > > > >
> > > > > 53. Packet Classification and Access Control — Data Plane
> > > > > Development Kit
> > > > > 22.11.0-rc2 documentation (dpdk.org)
> > > > >
> > > > >
> > > > >    - *userdata*: A user-defined value. For each category, a successful
> > > > >    match returns the userdata field of the highest priority matched
> rule.
> > > When
> > > > >    no rules match, returned value is zero
> > > > >
> > > > > I Wonder Why User Data Support does not returns 64 bit values,
> > >
> > > As I remember if first version of ACL code it was something about
> > > space savings to improve performance...
> > > Now I think it is more just a historical reason.
> > > It would be good to change userdata to 64bit, but I presume it will
> > > be ABI breakage.
> > Agree. We should support 64b and even 128b (since architectures
> > support 128b atomic operations). This reduces required memory barriers
> required if the data size <= the size of atomic operations.
> 
> Hmm...  sorry, didn’t get you  here.
> I do understand the user intention to save pointer to arbitrary memory
> location as user-data (64-bit).
> But how does the size of atomic mem-ops relate?
> Konstantin
What I meant is, if your data fits within 64b or 128b, having another indirection requires:

1) one additional memory operation to store the data (the first one being the store to the index)
2) on the control plane, we would need a release barrier between 'store data' and 'store index' (not a significant issue). On the data plane, we could use relaxed ordering between 'load index' and 'load data', so we do not need a barrier here.

So, looks like there is no barrier over-head on the data plane, but overhead of one additional memory operation.

  reply	other threads:[~2022-11-21 16:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17 13:58 venkatesh bs
2022-11-17 22:52 ` Stephen Hemminger
2022-11-18 10:30   ` Konstantin Ananyev
2022-11-19 13:13     ` venkatesh bs
2022-11-21  5:40     ` Honnappa Nagarahalli
2022-11-21 14:15       ` Konstantin Ananyev
2022-11-21 16:56         ` Honnappa Nagarahalli [this message]
2022-11-22 13:38           ` Konstantin Ananyev
2022-11-22 15:53             ` Honnappa Nagarahalli
  -- strict thread matches above, loose matches on Subject: below --
2022-11-16 13:58 venkatesh bs

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=DBAPR08MB5814F55AAB19273AA75D0566980A9@DBAPR08MB5814.eurprd08.prod.outlook.com \
    --to=honnappa.nagarahalli@arm.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@huawei.com \
    --cc=nd@arm.com \
    --cc=stephen@networkplumber.org \
    --cc=users@dpdk.org \
    --cc=venki.bsv@gmail.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).