DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Stephen Hemminger <stephen@networkplumber.org>
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 21:14:00 +0200	[thread overview]
Message-ID: <2485129.Ey0JF50IP2@thomas> (raw)
In-Reply-To: <20200624110956.28b821db@hermes.lan>

24/06/2020 20:09, Stephen Hemminger:
> > > +/**
> > > + * @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.

Why is it a problem to have holes with undefined value?
If swapping, the hole will be at the end, right?



      reply	other threads:[~2020-06-24 19:14 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
2020-06-24 19:14     ` Thomas Monjalon [this message]

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=2485129.Ey0JF50IP2@thomas \
    --to=thomas@monjalon.net \
    --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=stephen@networkplumber.org \
    --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).