Re: [ovs-dev] [PATCH v2] Make 100 percents packets sampled when sampling rate is 1.

2015-08-10 Thread Justin Pettit
> On Aug 10, 2015, at 8:53 PM, Wenyu Zhang wrote: > > Thanks. I got it. > E.g: > sample(sample=100.0%,actions(userspace(pid=0,ipfix(output_port=1),tunnel_ou > t_port=1))) >==> userspace(pid=0,ipfix(output_port=1),tunnel_out_port=1) > > Is it right? Yep, that's it. --Justin

Re: [ovs-dev] [PATCH v2] Make 100 percents packets sampled when sampling rate is 1.

2015-08-10 Thread Wenyu Zhang
Thanks. I got it. E.g: sample(sample=100.0%,actions(userspace(pid=0,ipfix(output_port=1),tunnel_ou t_port=1))) ==> userspace(pid=0,ipfix(output_port=1),tunnel_out_port=1) Is it right? Bests, Wenyu On 8/6/15, 2:24 AM, "Ben Pfaff" wrote: >On Wed, Aug 05, 2015 at 10:01:26AM -0700,

Re: [ovs-dev] [PATCH v2] Make 100 percents packets sampled when sampling rate is 1.

2015-08-05 Thread Ben Pfaff
On Wed, Aug 05, 2015 at 10:01:26AM -0700, Justin Pettit wrote: > > > On Aug 5, 2015, at 3:11 AM, Wenyu Zhang wrote: > > > > > >> On Aug 4, 2015, at 12:17 PM, Ben Pfaff wrote: > >> > >> On Tue, Aug 04, 2015 at 04:05:58AM +, Wenyu Zhang wrote: > >>> In ipfix and sflow, the sampling rate can

Re: [ovs-dev] [PATCH v2] Make 100 percents packets sampled when sampling rate is 1.

2015-08-05 Thread Justin Pettit
> On Aug 5, 2015, at 3:11 AM, Wenyu Zhang wrote: > > >> On Aug 4, 2015, at 12:17 PM, Ben Pfaff wrote: >> >> On Tue, Aug 04, 2015 at 04:05:58AM +, Wenyu Zhang wrote: >>> In ipfix and sflow, the sampling rate can be set as 1, which means >>> 100%. And in order to make 100% packets sampled,

Re: [ovs-dev] [PATCH v2] Make 100 percents packets sampled when sampling rate is 1.

2015-08-05 Thread Wenyu Zhang
> On Aug 4, 2015, at 12:17 PM, Ben Pfaff wrote: > > On Tue, Aug 04, 2015 at 04:05:58AM +, Wenyu Zhang wrote: >> In ipfix and sflow, the sampling rate can be set as 1, which means >> 100%. And in order to make 100% packets sampled, I work out a patch >> in datapath, which is for review on ne

Re: [ovs-dev] [PATCH v2] Make 100 percents packets sampled when sampling rate is 1.

2015-08-03 Thread Ben Pfaff
On Tue, Aug 04, 2015 at 04:05:58AM +, Wenyu Zhang wrote: > In ipfix and sflow, the sampling rate can be set as 1, which means > 100%. And in order to make 100% packets sampled, I work out a patch > in datapath, which is for review on net-next. And the same change > seems need to be added into

Re: [ovs-dev] [PATCH v2] Make 100 percents packets sampled when sampling rate is 1.

2015-08-03 Thread Wenyu Zhang
Hello Ben, Thanks for your comments. In ipfix and sflow, the sampling rate can be set as 1, which means 100%. And in order to make 100% packets sampled, I work out a patch in datapath, which is for review on net-next. And the same change seems need to be added into lib/odp-execute.c too. Do yo

Re: [ovs-dev] [PATCH v2] Make 100 percents packets sampled when sampling rate is 1.

2015-08-03 Thread Ben Pfaff
On Sun, Aug 02, 2015 at 11:54:09PM -0700, Wenyu Zhang wrote: > When sampling rate is 1, the sampling probability is UINT32_MAX. The packet > should be sampled even the prandom32() generate the number of UINT32_MAX. > And none packet need be sampled when the probability is 0. If we have code that g

[ovs-dev] [PATCH v2] Make 100 percents packets sampled when sampling rate is 1.

2015-08-02 Thread Wenyu Zhang
When sampling rate is 1, the sampling probability is UINT32_MAX. The packet should be sampled even the prandom32() generate the number of UINT32_MAX. And none packet need be sampled when the probability is 0. --- lib/odp-execute.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) dif