summaryrefslogtreecommitdiff
path: root/ofproto/tunnel.c
diff options
context:
space:
mode:
authorWenyu Zhang <wenyuz@vmware.com>2014-08-17 20:19:36 -0700
committerPravin B Shelar <pshelar@nicira.com>2014-08-18 01:01:10 -0700
commit8b7ea2d4803381c249f5886aac80f8dbe51ba771 (patch)
treedc30224f9405a00d13f59c02b91bdd8453198277 /ofproto/tunnel.c
parent84067a4c1a5033ad43ed444d1cb7f40ebddbf2e3 (diff)
downloadopenvswitch-8b7ea2d4803381c249f5886aac80f8dbe51ba771.tar.gz
Extend OVS IPFIX exporter to export tunnel headers
Extend IPFIX exporter to export tunnel headers when both input and output of the port. Add three other_config options in IPFIX table: enable-input-sampling, enable-output-sampling and enable-tunnel-sampling, to control whether sampling tunnel info, on which direction (input or output). Insert sampling action before output action and the output tunnel port is sent to datapath in the sampling action. Make datapath collect output tunnel info and send it back to userpace in upcall message with a new additional optional attribute. Add a tunnel ports map to make the tunnel port lookup faster in sampling upcalls in IPFIX exporter. Make the IPFIX exporter generate IPFIX template sets with enterprise elements for the tunnel info, save the tunnel info in IPFIX cache entries, and send IPFIX DATA with tunnel info. Add flowDirection element in IPFIX templates. Signed-off-by: Wenyu Zhang <wenyuz@vmware.com> Acked-by: Romain Lenglet <rlenglet@vmware.com> Acked-by: Ben Pfaff <blp@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
Diffstat (limited to 'ofproto/tunnel.c')
-rw-r--r--ofproto/tunnel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ofproto/tunnel.c b/ofproto/tunnel.c
index 2b5aa503e..46b071921 100644
--- a/ofproto/tunnel.c
+++ b/ofproto/tunnel.c
@@ -341,6 +341,10 @@ tnl_xlate_init(const struct flow *base_flow, struct flow *flow,
FLOW_TNL_F_KEY);
wc->masks.tunnel.ip_tos = UINT8_MAX;
wc->masks.tunnel.ip_ttl = UINT8_MAX;
+ /* The tp_src and tp_dst members in flow_tnl are set to be always
+ * wildcarded, not to unwildcard them here. */
+ wc->masks.tunnel.tp_src = 0;
+ wc->masks.tunnel.tp_dst = 0;
memset(&wc->masks.pkt_mark, 0xff, sizeof wc->masks.pkt_mark);