[ovs-dev] [PATCH v2] Make 100 percents packets sampled when sampling rate is 1.
wenyuz at vmware.com
Tue Aug 11 03:53:49 UTC 2015
Thanks. I got it.
Is it right?
On 8/6/15, 2:24 AM, "Ben Pfaff" <blp at nicira.com> wrote:
>On Wed, Aug 05, 2015 at 10:01:26AM -0700, Justin Pettit wrote:
>> > On Aug 5, 2015, at 3:11 AM, Wenyu Zhang <wenyuz at vmware.com> wrote:
>> >> On Aug 4, 2015, at 12:17 PM, Ben Pfaff <blp at nicira.com> wrote:
>> >> 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
>> >>> is not necessary here?
>> >> I mean that we should modify the IPFIX and sFlow sampling code so
>> >> 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,
>> >> 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.
>> > It is OK that sample action shouldn¹t be generated when the sampling
>> > rate is 0%. But I wonder why we shouldn¹t generate sample action
>> > when the sampling rate is 100%. It should happen in kernel datapth.
>> > Or you means that the 100% sampling rate case won¹t happen in the
>> > userspace datapath?
>> Ben's on vacation, so I'll just have to guess what he meant. I
>> suspect his thinking was that you'd just call the actions that would
>> be called through "sample" directly. Since the run 100% of the time,
>> there's no need to call them through the sample action.
>Yes, that's what I meant.
More information about the dev