summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMickey Spiegel <mickeys.dev@gmail.com>2017-01-26 17:31:07 -0800
committerGurucharan Shetty <guru@ovn.org>2017-01-27 11:10:42 -0800
commit1b4413004f48ce1ddb1a6de9f4ed5824ccd35a7d (patch)
tree5299121559978ad5875db84cfb066283efe70ceb /include
parent8697d4268b9a4578cfe0b783bc83b91b6a0c9e11 (diff)
downloadopenvswitch-1b4413004f48ce1ddb1a6de9f4ed5824ccd35a7d.tar.gz
ovn: avoid snat recirc only on gateway routers
Currently, for performance reasons on gateway routers, ct_snat that does not specify an IP address does not immediately trigger recirculation. On gateway routers, ct_snat that does not specify an IP address happens in the UNSNAT pipeline stage, which is followed by the DNAT pipeline stage that triggers recirculation for all packets. This DNAT pipeline stage recirculation takes care of the recirculation needs of UNSNAT as well as other cases such as UNDNAT. On distributed routers, UNDNAT is handled in the egress pipeline stage, separately from DNAT in the ingress pipeline stages. The DNAT pipeline stage only triggers recirculation for some packets. Due to this difference in design, UNSNAT needs to trigger its own recirculation. This patch restricts the logic that avoids recirculation for ct_snat, so that it only applies to datapaths representing gateway routers. Signed-off-by: Mickey Spiegel <mickeys.dev@gmail.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Diffstat (limited to 'include')
-rw-r--r--include/ovn/actions.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/ovn/actions.h b/include/ovn/actions.h
index 1d7bd69e8..d2510fd3c 100644
--- a/include/ovn/actions.h
+++ b/include/ovn/actions.h
@@ -445,6 +445,9 @@ struct ovnact_encode_params {
/* 'true' if the flow is for a switch. */
bool is_switch;
+ /* 'true' if the flow is for a gateway router. */
+ bool is_gateway_router;
+
/* A map from a port name to its connection tracking zone. */
const struct simap *ct_zones;