[ovs-dev] [creat/modify v2 1/2] ofproto-dpif: Unset DPIF_FP_MODIFY flag when creating a new flo
Andy Zhou
azhou at nicira.com
Tue Jul 30 17:52:34 UTC 2013
Remove the DPIF_FP_MODIFY flag when creating a new flow. When flows arrive in
a batch, userspace may push down multiple unique flow definitions that
overlap when wildcards are applied. Kernels support flow wildcarding
will reject these flow as duplicates (EEXIST), which will be logged
at a lower logging level.
Signed-off-by: Andy Zhou <azhou at nicira.com>
---
ofproto/ofproto-dpif.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index ca0a317..8c7164b 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -3540,7 +3540,7 @@ handle_flow_miss_with_facet(struct flow_miss *miss, struct facet *facet,
op->xout_garbage = false;
op->dpif_op.type = DPIF_OP_FLOW_PUT;
op->subfacet = subfacet;
- put->flags = DPIF_FP_CREATE | DPIF_FP_MODIFY;
+ put->flags = DPIF_FP_CREATE;
put->key = miss->key;
put->key_len = miss->key_len;
put->mask = op->mask.data;
@@ -5088,7 +5088,8 @@ subfacet_install(struct subfacet *subfacet, const struct ofpbuf *odp_actions,
enum dpif_flow_put_flags flags;
int ret;
- flags = DPIF_FP_CREATE | DPIF_FP_MODIFY;
+ flags = subfacet->path == SF_NOT_INSTALLED ? DPIF_FP_CREATE
+ : DPIF_FP_MODIFY;
if (stats) {
flags |= DPIF_FP_ZERO_STATS;
}
--
1.7.9.5
More information about the dev
mailing list