DPDK patches and discussions
 help / color / mirror / Atom feed
From: Michael Baum <michaelba@nvidia.com>
To: Ferruh Yigit <ferruh.yigit@amd.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Ori Kam <orika@nvidia.com>,
	Dariusz Sosnowski <dsosnowski@nvidia.com>,
	Aman Singh <aman.deep.singh@intel.com>,
	Yuying Zhang <yuying.zhang@intel.com>,
	"NBU-Contact-Thomas Monjalon (EXTERNAL)" <thomas@monjalon.net>
Subject: RE: [PATCH v4 1/2] ethdev: add random item support
Date: Fri, 15 Dec 2023 07:47:33 +0000	[thread overview]
Message-ID: <DM5PR12MB46614D1835DD4BE2FDE77C52CC93A@DM5PR12MB4661.namprd12.prod.outlook.com> (raw)
In-Reply-To: <12927557-12a1-42e6-8d01-22dd156404c4@amd.com>

On 12/14/2023 5:56 PM, Ferruh Yigit wrote:
> 
> On 12/14/2023 1:43 PM, Michael Baum wrote:
> >
> > On 12/14/2023 2:18 PM, Ferruh Yigit wrote:
> >>
> >> On 12/14/2023 10:58 AM, Michael Baum wrote:
> >>> Add support for a new item type "RTE_FLOW_ITEM_TYPE_RANDOM".
> >>> This item enables to match on some random value as a part of flow rule.
> >>>
> >
> > ...
> >
> >>>
> >>> +Item: ``RANDOM``
> >>> +^^^^^^^^^^^^^^^^
> >>> +
> >>> +Matches a random value.
> >>> +
> >>> +A random unsigned integer (at most 32-bit) is generated for each
> >>> +packet during flow rule processing, by either HW, SW or some external
> source.
> >>> +Application can match on either exact value or range of values.
> >>> +This value is not based on the packet data/headers.
> >>> +Application shouldn't assume that this value is kept during the
> >>> +lifetime of the packet.
> >>> +
> >>> +- ``value``: Specific value to match.
> >>> +
> >>
> >>
> >> Hi Michael,
> >>
> >> What is the usecase for the 'random' flow item?
> > I can think about 2 different use cases:
> > 1. Sampling - when application wants to sample certain percentage of the flow,
> it can match random value for getting it.
> > 2. Distribution - when application wants to distribute the traffic between
> ports/queues, it can match all random value range with send to port/queue
> actions.
> >
> >>
> >> Is it to match some kind of metadata generated by HW?
> > It can be generated by either HW, SW or some external source.
> > Each PMD supporting random item responds to have a generator for that.
> >
> >> Or is it a way to sampling traffic?
> > It can be both. The PMD can use random value generated by HW while user
> match on it for sampling traffic.
> >
> >>
> >> And how random 'random' item is, is it configured/set in HW or random per
> packet?
> > From API perspective, it is pure random not packet oriented. Same packet can
> get different values during the pipeline.
> > I mentioned it in documentation:
> > "This value is not based on the packet data/headers.
> > Application shouldn't assume that this value is kept during the lifetime of the
> packet."
> >
> 
> Thanks Michael, for clarification.
> 
> I was thinking if this can be used together with external (to DPDK) flow steering
> configuration.
> Like external tool can set values to match for specific pattern, tcp --> 100 udp -->
> 200 Later these values can be used by DPDK application and this filtering item.
> 
> Can you please confirm this is not the "use case"/intention, if so we may need to
> rename the rte flow item.

Hi,  this is not the use-case.
> 
> Also there will be driver implementation in this release, right?

Yes, series-30558 ("net/mlx5: add random item support")
https://patchwork.dpdk.org/project/dpdk/cover/20231214151248.1654878-1-michaelba@nvidia.com/


  reply	other threads:[~2023-12-15  7:47 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-22  9:05 [PATCH v1 0/2] " Michael Baum
2023-08-22  9:05 ` [PATCH v1 1/2] " Michael Baum
2023-08-22  9:05 ` [PATCH v1 2/2] app/testpmd: " Michael Baum
2023-08-22 12:41 ` [PATCH v1 0/2] ethdev: " Ivan Malov
2023-08-22 14:09   ` Michael Baum
2023-08-22 14:09   ` Stephen Hemminger
2023-09-11  7:41 ` [PATCH v2 " Michael Baum
2023-09-11  7:41   ` [PATCH v2 1/2] " Michael Baum
2023-09-11 15:59     ` Thomas Monjalon
2023-10-12 10:14       ` Michael Baum
2023-09-11  7:41   ` [PATCH v2 2/2] app/testpmd: " Michael Baum
2023-09-18 11:44     ` Ori Kam
2023-09-11 16:55   ` [PATCH v2 0/2] ethdev: " Morten Brørup
2023-09-11 17:53     ` Stephen Hemminger
2023-10-12  9:48       ` Michael Baum
2023-09-12  8:40     ` Michael Baum
2023-11-30 16:32   ` [PATCH v3 " Michael Baum
2023-11-30 16:32     ` [PATCH v3 1/2] " Michael Baum
2023-12-08 18:54       ` Dariusz Sosnowski
2023-12-14 10:32         ` Michael Baum
2023-12-14 10:54           ` Dariusz Sosnowski
2023-12-08 19:03       ` Dariusz Sosnowski
2023-11-30 16:32     ` [PATCH v3 2/2] app/testpmd: " Michael Baum
2023-12-08 18:52       ` Dariusz Sosnowski
2023-12-14 10:58     ` [PATCH v4 0/2] ethdev: " Michael Baum
2023-12-14 10:58       ` [PATCH v4 1/2] " Michael Baum
2023-12-14 11:12         ` Dariusz Sosnowski
2023-12-14 11:32         ` Ori Kam
2023-12-14 12:18         ` Ferruh Yigit
2023-12-14 13:43           ` Michael Baum
2023-12-14 15:55             ` Ferruh Yigit
2023-12-15  7:47               ` Michael Baum [this message]
2023-12-14 10:58       ` [PATCH v4 2/2] app/testpmd: " Michael Baum
2023-12-15 12:07       ` [PATCH v4 0/2] ethdev: " Ferruh Yigit

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=DM5PR12MB46614D1835DD4BE2FDE77C52CC93A@DM5PR12MB4661.namprd12.prod.outlook.com \
    --to=michaelba@nvidia.com \
    --cc=aman.deep.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=ferruh.yigit@amd.com \
    --cc=orika@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=yuying.zhang@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).