[ovs-dev] [ovs-dev, PATCHv3] ofproto-dpif-sflow: Add snaplen for sample action and sFlow.

Wenyu Zhang wenyuz at vmware.com
Mon Jul 11 08:50:11 UTC 2016


Hi William,

In your patch, no codes about supporting “snaplen" in IPFIX included. IPFIX still get the length of  packet as before, whatever the packet is truncated.
If user put a non-zero ‘snaplen’ in IPFIX sample action, the IPFIX result should be incorrect. So the ‘snaplen’ in the flow-based IPFIX action may cause some issue without the complete supporting.

Considering that ‘snaplen’ may help reduce the cost to copy packets, it should help IPFIX too. We may work out a separated patch to support “snaplen” in IPFIX, including both bridge based IPFIX and flow based IPFIX.

Bests,
Wenyu

From: Daniel Ye <daniely at vmware.com<mailto:daniely at vmware.com>>
Date: Monday, July 11, 2016 at 4:15 PM
To: William Tu <u9012063 at gmail.com<mailto:u9012063 at gmail.com>>
Cc: "dev at openvswitch.org<mailto:dev at openvswitch.org>" <dev at openvswitch.org<mailto:dev at openvswitch.org>>, Ben Pfaff <blp at ovn.org<mailto:blp at ovn.org>>, 雯宇 张 <wenyuz at vmware.com<mailto:wenyuz at vmware.com>>
Subject: Re: [ovs-dev,PATCHv3] ofproto-dpif-sflow: Add snaplen for sample action and sFlow.


Hi William,


OK, I got it. Thanks for Explanation. Maybe more detail should be put in the comments.

For bridge IPFIX, we put 0 for 'snaplen' to not support packet truncation, for flow-based IPFIX,

user can specify the 'snaplen' in IPFIX sample action.


For IPFIX, we only use the original packet size and the metadata in flow. I don't get any idea about how

we set 'snaplen' in IPFIX. Is it better to have this field in sample action? Wait for Ben's input.


Bests,

Daniel


________________________________
From: William Tu <u9012063 at gmail.com<mailto:u9012063 at gmail.com>>
Sent: Sunday, July 10, 2016 9:24:45 PM
To: Daniel Ye
Cc: dev at openvswitch.org<mailto:dev at openvswitch.org>; Ben Pfaff
Subject: Re: [ovs-dev,PATCHv3] ofproto-dpif-sflow: Add snaplen for sample action and sFlow.

Hi Daniel,

Thanks for reviewing the patch.
Indeed, the way sFlow sets up the datapath does not require the
OpenFlow sample action, and changing OVSDB/compose_sample_action() is
sufficient to program the datapath sample action for current sFlow use
case. So if IPFIX does not use 'snaplen', or there is no future use
case, then I could remove the snaplen in "struct nx_action_sample2".

Regards,
William

On Sun, Jul 10, 2016 at 7:46 PM, Daniel Ye <daniely at vmware.com<mailto:daniely at vmware.com>> wrote:
> Hi William,
>
>
>
> I saw that you submitted the patch below. It’s about adding ‘snaplen’ for
> sample action and sFlow.
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__patchwork.ozlabs.org_patch_645013_&d=CwIFaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=AMeQBzObb3Yn4XemNxgato0M1gEhd6eNH0myARLK2io&m=uB1yH0Y9iyxPuguQvhIABlKpBPnv2pL7-qBXe21UUDM&s=rUem9yHS9EtjBSobtIleUKe-VVqLQeyQaS-WclYSUKQ&e=
>
>
>
> I’m still confused whether sFlow uses the openflow sample action. In my
> opinion, sFlow only uses the datapath
>
> sample action, not the sample action in userworld. Actually, there are two
> kinds of IPFIX, one is bridge level IPFIX and the
>
> other is flow-based IPFIX. Bridge level IPFIX doesn’t use openflow sample
> action, it only uses the datapath sample action. I think
>
> sFlow does the same as bridge level IPFIX. For bridge level IPFIX and sFlow,
> all the parameters are stored in OVSDB.
>
>
>
> Actually, “nx_action_sample2” is only used by flow-based IPFIX now. If you
> add a ‘snaplen’ field in it, I don’t think this field
>
> will be used by sFlow. Maybe you only need to change
> “compose_sample_action()” and put ‘snaplen’ in OVSDB??
>
>
>
> For all the alias, does any sFlow experts come to make sure of this?
>
>
>
> Thanks,
>
> Daniel Benli Ye


More information about the dev mailing list