DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, orika@mellanox.com, viacheslavo@mellanox.com,
	matan@mellanox.com, rasland@mellanox.com,
	Jiawei Wang <jiaweiw@mellanox.com>,
	ian.stokes@intel.com, fbl@redhat.com
Subject: Re: [dpdk-dev] [RFC] ethdev: introduce sample action for rte flow
Date: Wed, 24 Jun 2020 11:09:56 -0700	[thread overview]
Message-ID: <20200624110956.28b821db@hermes.lan> (raw)
In-Reply-To: <7858203.UFLHXkIILB@thomas>

On Wed, 24 Jun 2020 19:07:49 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:

> >  
> > +/**
> > + * @warning
> > + * @b EXPERIMENTAL: this structure may change without prior notice
> > + *
> > + * RTE_FLOW_ACTION_TYPE_SAMPLE
> > + *
> > + * Adds a sample action to a matched flow.
> > + *
> > + * The matching packets will be duplicated to a special queue or vport
> > + * in the predefined probabiilty, All the packets continues processing
> > + * on the default flow path.
> > + *
> > + * When the sample ratio is set to 1 then the packets will be 100% mirrored.
> > + * Additional action list be supported to add for sampled or mirrored packets.
> > + */
> > +struct rte_flow_action_sample {
> > +	/* packets sampled equals to '1/ratio' */
> > +	const uint32_t ratio;
> > +	/* sub-action list specific for the sampling hit cases */
> > +	const struct rte_flow_action *actions;
> > +};

Putting const on the ratio value is not necessary.
Other flow_actions don't do that.

Note: rte_flow action structures seem to have lots of holes.
The value of those holes is undefined. You may want to swap the fields.

  reply	other threads:[~2020-06-24 18:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 13:19 Jiawei Wang
2020-06-24 17:07 ` Thomas Monjalon
2020-06-24 18:09   ` Stephen Hemminger [this message]
2020-06-24 19:14     ` Thomas Monjalon

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=20200624110956.28b821db@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=fbl@redhat.com \
    --cc=ian.stokes@intel.com \
    --cc=jiaweiw@mellanox.com \
    --cc=matan@mellanox.com \
    --cc=orika@mellanox.com \
    --cc=rasland@mellanox.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@mellanox.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).