From 4930ea5620375c28bbdd1c85f8f48b9431c73abe Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 23 Nov 2016 23:15:19 -0800 Subject: ofp-actions: Add "ingress" and "egress" options to "sample" action. Before Open vSwitch 2.5.90, IPFIX reports from Open vSwitch didn't include whether the packet was ingressing or egressing the switch. Starting in OVS 2.5.90, this information was available but only accurate if the action included a port number that indicated a tunnel. Conflating these two does not always make sense (not every packet involves a tunnel!), so this patch makes it possible for the sample action to simply say whether it's for ingress or egress. This is difficult to test, since the "tests" directory of OVS does not have a proper IPFIX listener. This passes those tests, plus a couple that just verify that the actions are properly parsed and formatted. Benli did test it end-to-end in a VMware use case. Requested-by: Benli Ye Tested-by: Benli Ye Signed-off-by: Ben Pfaff Acked-by: Simon Horman --- utilities/ovs-ofctl.8.in | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'utilities/ovs-ofctl.8.in') diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in index c112e6af1..96135eac8 100644 --- a/utilities/ovs-ofctl.8.in +++ b/utilities/ovs-ofctl.8.in @@ -2380,11 +2380,19 @@ Observation Domain ID sent in every IPFIX flow record. Defaults to 0. When sending samples to IPFIX collectors, the unsigned 32-bit integer Observation Point ID sent in every IPFIX flow record. Defaults to 0. .IP "\fBsampling_port=\fIport\fR" -Sample packets on the port. It can be set as input port or output -port. When this option is omitted, or specified as \fBNONE\fR, IPFIX -does not differentiate between ingress packets and egress packets and -does not export egress tunnel information. This option was added in -Open vSwitch 2.5.90. +Sample packets on \fIport\fR, which should be the ingress or egress +port. This option, which was added in Open vSwitch 2.5.90, allows the +IPFIX implementation to export egress tunnel information. +.IP "\fBingress\fR" +.IQ "\fBegress\fR" +Specifies explicitly that the packet is being sampled on ingress to or +egress from the switch. IPFIX reports sent by Open vSwitch before +version 2.5.90 did not include a direction. From 2.5.90 until 2.6.90, +IPFIX reports inferred a direction from \fBsampling_port\fR: if it was +the packet's output port, then the direction was reported as egress, +otherwise as ingress. Open vSwitch 2.6.90 introduced these options, +which allow the inferred direction to be overridden. This is +particularly useful when the ingress (or egress) port is not a tunnel. .RE .IP Refer to \fBovs\-vswitchd.conf.db\fR(5) for more details on -- cgit v1.2.1