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

Ben Pfaff blp at nicira.com
Tue Aug 4 04:17:58 UTC 2015

On Tue, Aug 04, 2015 at 04:05:58AM +0000, 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 lib/odp-execute.c too. Do you mean that it
> is not necessary here?

I mean that we should modify the IPFIX and sFlow sampling code so that
in the 0% and 100% sample rates cases it doesn't generate a sample
action; there isn't any value in it.

This situation is a little different from the kernel situation, since we
know exactly what actions can be fed to the userspace datapath in
odp-execute.c, since the actions that it executes are generated by
another part of the same source tree.  The kernel datapath, however,
should be equally capable of handling actions from sources other than
the Open vSwitch userspace.

More information about the dev mailing list