[PATCH net-next v3] openvswitch: Make 100 percents packets sampled when sampling rate is 1.

2015-08-05 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. Signed-off-by: Wenyu Zhang --- net/openvswitch/actions.c |5 - 1 file changed,

Re: [PATCH net-next v3] openvswitch: Make 100 percents packets sampled when sampling rate is 1.

2015-08-07 Thread David Miller
From: Wenyu Zhang Date: Wed, 5 Aug 2015 00:30:47 -0700 > 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. > > Signed-off-by: Wenyu Z

Re: [ovs-dev] [PATCH net-next v3] openvswitch: Make 100 percents packets sampled when sampling rate is 1.

2015-08-05 Thread Pravin Shelar
On Wed, Aug 5, 2015 at 12:30 AM, 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. > > Signed-off-by: Wenyu Zhang