summaryrefslogtreecommitdiff
path: root/ovn
diff options
context:
space:
mode:
authorHan Zhou <zhouhan@gmail.com>2016-12-21 12:32:16 -0800
committerBen Pfaff <blp@ovn.org>2016-12-21 13:35:34 -0800
commitfc6f997884ecbf4c7b5465ba06d5ccef775d2f0c (patch)
tree58566d6fa61eb5252f4db05b930a38a39af8f5de /ovn
parent82a3160eb996eea2fb689845148becb7bcd5c3df (diff)
downloadopenvswitch-fc6f997884ecbf4c7b5465ba06d5ccef775d2f0c.tar.gz
ovn-controller: Fix duplicated flow add attempts in table 32.
In commit 475f0a2c it introduced a priority 150 flow for filtering the sending of traffic received from vxlan tunnels back out tunnels. However, it added the flow for every remote port processing, which results in continuous logs about duplicated flows. We only need to install this flow once per physical_run() loop iteration. Signed-off-by: Han Zhou <zhouhan@gmail.com> Acked-by: Darrell Ball <dball@vmware.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovn')
-rw-r--r--ovn/controller/physical.c47
1 files changed, 23 insertions, 24 deletions
diff --git a/ovn/controller/physical.c b/ovn/controller/physical.c
index 600f35ae8..9d3741051 100644
--- a/ovn/controller/physical.c
+++ b/ovn/controller/physical.c
@@ -536,33 +536,15 @@ consider_port_binding(enum mf_field_id mff_ovn_geneve,
} else {
/* Remote port connected by tunnel */
- /* Table 32, priority 150 and 100.
- * ===============================
- *
- * Priority 150 is for packets received from a VXLAN tunnel
- * which get resubmitted to OFTABLE_LOG_INGRESS_PIPELINE due to
- * lack of needed metadata in VXLAN, explicitly skip sending
- * back out any tunnels and resubmit to table 33 for local
- * delivery.
+ /* Table 32, priority 100.
+ * =======================
*
- * Priority 100 is for all other traffic which need to be sent
- * to a remote hypervisor. Each flow matches an output port
- * that includes a logical port on a remote hypervisor, and
- * tunnels the packet to that hypervisor.
+ * Handles traffic that needs to be sent to a remote hypervisor. Each
+ * flow matches an output port that includes a logical port on a remote
+ * hypervisor, and tunnels the packet to that hypervisor.
*/
match_init_catchall(&match);
ofpbuf_clear(ofpacts_p);
- match_set_reg_masked(&match, MFF_LOG_FLAGS - MFF_REG0,
- MLF_RCV_FROM_VXLAN, MLF_RCV_FROM_VXLAN);
-
- /* Resubmit to table 33. */
- put_resubmit(OFTABLE_LOCAL_OUTPUT, ofpacts_p);
- ofctrl_add_flow(flow_table, OFTABLE_REMOTE_OUTPUT, 150, &match,
- ofpacts_p);
-
-
- match_init_catchall(&match);
- ofpbuf_clear(ofpacts_p);
/* Match MFF_LOG_DATAPATH, MFF_LOG_OUTPORT. */
match_set_metadata(&match, htonll(dp_key));
@@ -937,12 +919,29 @@ physical_run(struct controller_ctx *ctx, enum mf_field_id mff_ovn_geneve,
}
}
+ /* Table 32, priority 150.
+ * =======================
+ *
+ * Handles packets received from a VXLAN tunnel which get resubmitted to
+ * OFTABLE_LOG_INGRESS_PIPELINE due to lack of needed metadata in VXLAN,
+ * explicitly skip sending back out any tunnels and resubmit to table 33
+ * for local delivery.
+ */
+ struct match match;
+ match_init_catchall(&match);
+ ofpbuf_clear(&ofpacts);
+ match_set_reg_masked(&match, MFF_LOG_FLAGS - MFF_REG0,
+ MLF_RCV_FROM_VXLAN, MLF_RCV_FROM_VXLAN);
+
+ /* Resubmit to table 33. */
+ put_resubmit(OFTABLE_LOCAL_OUTPUT, &ofpacts);
+ ofctrl_add_flow(flow_table, OFTABLE_REMOTE_OUTPUT, 150, &match, &ofpacts);
+
/* Table 32, Priority 0.
* =======================
*
* Resubmit packets that are not directed at tunnels or part of a
* multicast group to the local output table. */
- struct match match;
match_init_catchall(&match);
ofpbuf_clear(&ofpacts);
put_resubmit(OFTABLE_LOCAL_OUTPUT, &ofpacts);