Looks good to me.
Acked-by: Mark Michelson <[email protected]>
On 05/03/2018 10:30 PM, Han Zhou wrote:
Most mc related flows are added only if the mc is related to local
datapath, but there is a flow added before the local datapath
check, out of the function consider_mc_group(). This patch fixes it.
Signed-off-by: Han Zhou <[email protected]>
---
ovn/controller/physical.c | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/ovn/controller/physical.c b/ovn/controller/physical.c
index 8c92c1d..ab86b52 100644
--- a/ovn/controller/physical.c
+++ b/ovn/controller/physical.c
@@ -742,8 +742,22 @@ consider_mc_group(enum mf_field_id mff_ovn_geneve,
return;
}
+ /* Table 32, priority 150.
+ * =======================
+ *
+ * Multicast packets that should not be sent to other hypervisors.
+ */
+ struct match match = MATCH_CATCHALL_INITIALIZER;
+ match_set_metadata(&match, htonll(mc->datapath->tunnel_key));
+ match_set_reg(&match, MFF_LOG_OUTPORT - MFF_REG0, mc->tunnel_key);
+ match_set_reg_masked(&match, MFF_LOG_FLAGS - MFF_REG0,
+ MLF_LOCAL_ONLY, MLF_LOCAL_ONLY);
+ ofpbuf_clear(ofpacts_p);
+ put_resubmit(OFTABLE_LOCAL_OUTPUT, ofpacts_p);
+ ofctrl_add_flow(flow_table, OFTABLE_REMOTE_OUTPUT, 150, 0, &match,
+ ofpacts_p);
+
struct sset remote_chassis = SSET_INITIALIZER(&remote_chassis);
- struct match match;
match_init_catchall(&match);
match_set_metadata(&match, htonll(dp_key));
@@ -1006,21 +1020,6 @@ physical_run(struct controller_ctx *ctx, enum
mf_field_id mff_ovn_geneve,
struct ofpbuf remote_ofpacts;
ofpbuf_init(&remote_ofpacts, 0);
SBREC_MULTICAST_GROUP_FOR_EACH (mc, ctx->ovnsb_idl) {
- /* Table 32, priority 150.
- * =======================
- *
- * Multicast packets that should not be sent to other hypervisors.
- */
- struct match match = MATCH_CATCHALL_INITIALIZER;
- match_set_metadata(&match, htonll(mc->datapath->tunnel_key));
- match_set_reg(&match, MFF_LOG_OUTPORT - MFF_REG0, mc->tunnel_key);
- match_set_reg_masked(&match, MFF_LOG_FLAGS - MFF_REG0,
- MLF_LOCAL_ONLY, MLF_LOCAL_ONLY);
- ofpbuf_clear(&ofpacts);
- put_resubmit(OFTABLE_LOCAL_OUTPUT, &ofpacts);
- ofctrl_add_flow(flow_table, OFTABLE_REMOTE_OUTPUT, 150, 0, &match,
- &ofpacts);
-
consider_mc_group(mff_ovn_geneve, ct_zones, local_datapaths, chassis,
mc, &ofpacts, &remote_ofpacts, flow_table);
}
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev