[ovs-dev] [PATCH] ofproto-dpif: Don't put new subfacets as result of "userspace" action.
Justin Pettit
jpettit at nicira.com
Sat Jul 13 00:47:23 UTC 2013
Don't install a flow if it's the result of the "userspace" action and it
contains a slow-path action. This can occur when a datapath flow with
wildcards has a "userspace" action and flows sent to userspace result in
a different subfacet, which will then be rejected as overlapping by the
datapath.
Signed-off-by: Justin Pettit <jpettit at nicira.com>
---
ofproto/ofproto-dpif.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 283336c..f5f2c75 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -3426,7 +3426,23 @@ handle_flow_miss_with_facet(struct flow_miss *miss, struct facet *facet,
}
}
- if (miss->upcall_type == DPIF_UC_MISS || subfacet->path != want_path) {
+ /* Put down a flow in the following cases:
+ *
+ * - The upcall is a miss. (This should only happen if flows we
+ * expect in the kernel have disappeared (e.g., as the result of
+ * "ovs-dpctl del-flows".))
+ * - The current path is not what we want.
+ *
+ * However, we do not want to install the flow if it's the result of
+ * the "userspace" action and it contains a slow-path action.
+ * This can occur when a datapath flow with wildcards has a
+ * "userspace" action and flows sent to userspace result in a
+ * different subfacet, which will then be rejected as overlapping by
+ * the datapath.
+ */
+ if (!(miss->upcall_type == DPIF_UC_ACTION && want_path == SF_SLOW_PATH)
+ && (miss->upcall_type == DPIF_UC_MISS ||
+ subfacet->path != want_path)) {
struct flow_miss_op *op = &ops[(*n_ops)++];
struct dpif_flow_put *put = &op->dpif_op.u.flow_put;
--
1.7.5.4
More information about the dev
mailing list