DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Jiawei(Jonny) Wang" <jiaweiw@nvidia.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>,
	Slava Ovsiienko <viacheslavo@nvidia.com>,
	"xiaoyun.li@intel.com" <xiaoyun.li@intel.com>,
	Ori Kam <orika@nvidia.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Andrew Rybchenko <arybchenko@solarflare.com>,
	NBU-Contact-Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [dpdk-dev] [PATCH] doc: add sampling and mirroring in testpmd guide
Date: Wed, 31 Mar 2021 14:38:00 +0000	[thread overview]
Message-ID: <BL0PR12MB2419219EA38C7262B6145AD8C67C9@BL0PR12MB2419.namprd12.prod.outlook.com> (raw)
In-Reply-To: <4725b578-d381-0c36-9696-9dd9a16d049a@intel.com>

Hi Ferruh,

> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Wednesday, March 31, 2021 5:45 PM
> To: Jiawei(Jonny) Wang <jiaweiw@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; xiaoyun.li@intel.com; Ori Kam
> <orika@nvidia.com>
> Cc: dev@dpdk.org; Andrew Rybchenko <arybchenko@solarflare.com>; NBU-
> Contact-Thomas Monjalon <thomas@monjalon.net>
> Subject: Re: [PATCH] doc: add sampling and mirroring in testpmd guide
> 
> On 3/31/2021 7:38 AM, Jiawei(Jonny) Wang wrote:
> > Hi Ferruh,
> >
> >> -----Original Message-----
> >> From: Ferruh Yigit <ferruh.yigit@intel.com>
> >> Sent: Friday, March 26, 2021 1:11 AM
> >> To: Jiawei(Jonny) Wang <jiaweiw@nvidia.com>; Slava Ovsiienko
> >> <viacheslavo@nvidia.com>; xiaoyun.li@intel.com; Ori Kam
> >> <orika@nvidia.com>
> >> Cc: dev@dpdk.org; Andrew Rybchenko <arybchenko@solarflare.com>;
> NBU-
> >> Contact-Thomas Monjalon <thomas@monjalon.net>
> >> Subject: Re: [PATCH] doc: add sampling and mirroring in testpmd guide
> >>
> >> On 3/9/2021 1:18 PM, Jiawei Wang wrote:
> >>> Update documentation for sample action usage in testpmd and show the
> >>> command line example.
> >>>
> >>
> >> +1 to document this.
> >>
> >> Indeed for all testpmd flow update, it must be mandatory to update
> >> "Flow rules management" section for it, Ori what do you think?
> >>
> >>> Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
> >>> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> >>
> >> <...>
> >>
> >>> +Sample Sampling/Mirroring rules
> >>> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >>> +
> >>> +Sample/Mirroring rules can be set by the following commands
> >>> +
> >>> +NIC-RX Sampling rule, the matched ingress packets are duplicated
> >>> +and sent to the queue 1, and each second packets are marked with
> >>> +0x1234 and sent to queue 0.
> >>> +
> >>
> >> Also each second packets duplicated to queue 1, isn't it, because of 'ratio
> 2'?
> >>
> >
> > Yes, 'ratio=2' means that 50% packet will be sampled.
> >
> 
> I thought 'sample' action also applies to the "queue index 1" but most
> probably it only applies to 'sample_actions', so original paragraph is correct,
> perhaps except the 'duplicated' detail, and my comment "each second
> packets duplicated to queue 1" is wrong.
> 

Here sample action is 'Queue index 0" and original action is 'Queue index 1",
sample action only impact on duplicated packets, so 50% duplicated to queue 0.

> Can you please confirm if below is correct:
> Assume 10 packets are received, from 1 to 10, after below rule queue status
> will be:
> Queue0: 2, 4, 6, 8, 10 [All marked with 0x1234, duplicated packets]
> Queue1: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 [Original packets]
> 
> 

My description is not correct here.
The Marked 0x1234 and  5 duplicated packet will be sent to queue 0;
But the duplicated packet order not strict 'each second packet'.
All of the 10 packet will be sent to Queue 1 without mark.

I will update as below:
"
NIC-RX Sampling rule, the matched ingress packets are sent to the queue 1,
and 50% packets are duplicated and marked with 0x1234 and sent to queue 0.
"

> >>> +::
> >>> +
> >>> + testpmd> set sample_actions 0 mark id  0x1234 / queue index 0 /
> >>> + testpmd> end flow create 0 ingress group 1 pattern eth / end
> >>> + testpmd> actions
> >>> +        sample ratio 2 index 0 / queue index 1 / end
> >>> +
> >>> +E-Switch Sampling rule, the matched ingress packets are duplicated
> >>> +and sent to port id 2, and each second packets are sent to eswitch
> >> manager.
> >>> +
> >>
> >> what is 'E-Switch', or "eswitch manager", isn't the mirror rule generic?
> >
> > Here E-Switch means 'transfer=1' in flow attribute,  I will remove it since
> the concept is for Mellanox HW.
> >

Thanks.

  reply	other threads:[~2021-03-31 14:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 13:18 Jiawei Wang
2021-03-25 17:10 ` Ferruh Yigit
2021-03-25 17:15   ` Thomas Monjalon
2021-03-31  6:58     ` Jiawei(Jonny) Wang
2021-03-31  6:38   ` Jiawei(Jonny) Wang
2021-03-31  9:44     ` Ferruh Yigit
2021-03-31 14:38       ` Jiawei(Jonny) Wang [this message]
2021-03-31 15:26         ` Ferruh Yigit
2021-03-31  8:51 ` [dpdk-dev] [PATCH v2] " Jiawei Wang
2021-04-01  2:39 ` [dpdk-dev] [PATCH v3] " Jiawei Wang
2021-04-01 11:52   ` 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=BL0PR12MB2419219EA38C7262B6145AD8C67C9@BL0PR12MB2419.namprd12.prod.outlook.com \
    --to=jiaweiw@nvidia.com \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=orika@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    --cc=xiaoyun.li@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).