On Tue, Jun 07, 2016 at 10:53:53PM -0700, William Tu wrote: > This patch adds a 'snaplen' field in sample action. Currently, sample > action is used by sFlow and IPFIX. For IPFIX, nothing is changed. For > sFlow configuration, the patch translates header=N to a sample action with > snaplen=N, then the snaplen=N translates to trunc(N) in kernel datapath. > Thus, only N bytes instead of full-packet size will be copied from kernel > to userspace, saving the copying overhead. > > Signed-off-by: William Tu <u9012...@gmail.com>
This changes the "wire format" of the NXAST_SAMPLE action, but we can't do that because it will break compatibility with older OpenFlow clients. Usually if we need a new feature in an action we add a new version that has that feature, e.g. NXAST_SAMPLE2. The IPFIX enhancements that Benli Ye are working on already do that for another reason, so you should probably coordinate so that we don't end up with three versions of the sample action. I'm not sure why CHECK_TRUNC_USERSPACE exists, because I think that your patch implements the new action in userspace. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev