Hi Ferruh, > -----Original Message----- > From: Ferruh Yigit <ferruh.yi...@intel.com> > Sent: Friday, March 26, 2021 1:11 AM > To: Jiawei(Jonny) Wang <jiaw...@nvidia.com>; Slava Ovsiienko > <viachesl...@nvidia.com>; xiaoyun...@intel.com; Ori Kam > <or...@nvidia.com> > Cc: dev@dpdk.org; Andrew Rybchenko <arybche...@solarflare.com>; NBU- > Contact-Thomas Monjalon <tho...@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 <jiaw...@nvidia.com> > > Acked-by: Viacheslav Ovsiienko <viachesl...@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. > > +:: > > + > > + testpmd> set sample_actions 0 mark id 0x1234 / queue index 0 / end > > + testpmd> flow create 0 ingress group 1 pattern eth / end 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.