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" <[email protected]> wrote:
>On Wed, Aug 05, 2015 at 10:01:26AM -0700, Justin Pettit wrote:
>>
>> > On Aug 5, 2015, at 3:11 AM, Wenyu Zhang <[email protected]> wrote:
>> >
>> >
>> >> On Aug 4, 2015, at 12:17 PM, Ben Pfaff <[email protected]> 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
>>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.
>> >
>> > 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.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev