Signed-off-by: Ihar Hrachyshka <[email protected]>
---
controller/physical.c | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/controller/physical.c b/controller/physical.c
index e0afd83ab..c47b15f3e 100644
--- a/controller/physical.c
+++ b/controller/physical.c
@@ -710,6 +710,22 @@ put_replace_router_port_mac_flows(struct ovsdb_idl_index
}
}
+static void
+put_zones_ofpacts(const struct zone_ids *zone_ids, struct ofpbuf *ofpacts_p)
+{
+ if (zone_ids) {
+ if (zone_ids->ct) {
+ put_load(zone_ids->ct, MFF_LOG_CT_ZONE, 0, 32, ofpacts_p);
+ }
+ if (zone_ids->dnat) {
+ put_load(zone_ids->dnat, MFF_LOG_DNAT_ZONE, 0, 32, ofpacts_p);
+ }
+ if (zone_ids->snat) {
+ put_load(zone_ids->snat, MFF_LOG_SNAT_ZONE, 0, 32, ofpacts_p);
+ }
+ }
+}
+
static void
put_local_common_flows(uint32_t dp_key,
const struct sbrec_port_binding *pb,
@@ -735,17 +751,7 @@ put_local_common_flows(uint32_t dp_key,
/* Match MFF_LOG_DATAPATH, MFF_LOG_OUTPORT. */
match_outport_dp_and_port_keys(&match, dp_key, port_key);
- if (zone_ids) {
- if (zone_ids->ct) {
- put_load(zone_ids->ct, MFF_LOG_CT_ZONE, 0, 32, ofpacts_p);
- }
- if (zone_ids->dnat) {
- put_load(zone_ids->dnat, MFF_LOG_DNAT_ZONE, 0, 32, ofpacts_p);
- }
- if (zone_ids->snat) {
- put_load(zone_ids->snat, MFF_LOG_SNAT_ZONE, 0, 32, ofpacts_p);
- }
- }
+ put_zones_ofpacts(zone_ids, ofpacts_p);
/* Resubmit to table 39. */
put_resubmit(OFTABLE_CHECK_LOOPBACK, ofpacts_p);
--
2.34.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev