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

Ben Pfaff blp at nicira.com
Mon Aug 3 16:37:29 UTC 2015

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 generates either 0% or 100% probabilities, we
should probably adjust it so that it doesn't do that.  Neither of these
probabilities is useful.

More information about the dev mailing list