[ovs-dev] [PATCH 10/18] ofproto-dpif-xlate: Add xlate_normal_flood()
Flavio Leitner
fbl at redhat.com
Fri Apr 11 21:34:15 UTC 2014
This is also needed for multicast snooping.
Acked-by: Thomas Graf <tgraf at redhat.com>
Acked-by: Daniel Borkmann <dborkman at redhat.com>
Signed-off-by: Flavio Leitner <fbl at redhat.com>
---
ofproto/ofproto-dpif-xlate.c | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index 1524aba..caa7aa6 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -1393,6 +1393,23 @@ update_learning_table(const struct xbridge *xbridge,
}
static void
+xlate_normal_flood(struct xlate_ctx *ctx, struct xbundle *in_xbundle,
+ uint16_t vlan)
+{
+ struct xbundle *xbundle;
+
+ LIST_FOR_EACH (xbundle, list_node, &ctx->xbridge->xbundles) {
+ if (xbundle != in_xbundle
+ && xbundle_includes_vlan(xbundle, vlan)
+ && xbundle->floodable
+ && !xbundle_mirror_out(ctx->xbridge, xbundle)) {
+ output_normal(ctx, xbundle, vlan);
+ }
+ }
+ ctx->xout->nf_output_iface = NF_OUT_FLOOD;
+}
+
+static void
xlate_normal(struct xlate_ctx *ctx)
{
struct flow_wildcards *wc = &ctx->xout->wc;
@@ -1477,18 +1494,8 @@ xlate_normal(struct xlate_ctx *ctx)
xlate_report(ctx, "learned port is input port, dropping");
}
} else {
- struct xbundle *xbundle;
-
xlate_report(ctx, "no learned MAC for destination, flooding");
- LIST_FOR_EACH (xbundle, list_node, &ctx->xbridge->xbundles) {
- if (xbundle != in_xbundle
- && xbundle_includes_vlan(xbundle, vlan)
- && xbundle->floodable
- && !xbundle_mirror_out(ctx->xbridge, xbundle)) {
- output_normal(ctx, xbundle, vlan);
- }
- }
- ctx->xout->nf_output_iface = NF_OUT_FLOOD;
+ xlate_normal_flood(ctx, in_xbundle, vlan);
}
}
--
1.9.0
More information about the dev
mailing list