This makes me a bit uncomfortable because we're going to have facet's floating around which have never been installed. I would expect the rest of ofproto-dpif to be unhappy about that, though I can't say exactly how. At any rate, how about an alternative approach. If a packet came in as DPIF_UC_ACTION, simply never install it. Something like what I have below.
Now that I look at it, in the below patch, we'll have to add the stats to facet if we decide to bail out, but you get the gist of it. Thoughts? Ethan --- ofproto/ofproto-dpif.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 67e6c7a..31d463f 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -3395,11 +3395,7 @@ handle_flow_miss_with_facet(struct flow_miss *miss, struct facet *facet, struct subfacet *subfacet; struct ofpbuf *packet; - subfacet = subfacet_create(facet, miss, now); want_path = facet->xout.slow ? SF_SLOW_PATH : SF_FAST_PATH; - if (stats) { - subfacet_update_stats(subfacet, stats); - } LIST_FOR_EACH (packet, list_node, &miss->packets) { struct flow_miss_op *op = &ops[*n_ops]; @@ -3426,6 +3422,16 @@ handle_flow_miss_with_facet(struct flow_miss *miss, struct facet *facet, } } + if (miss->upcall_type == DPIF_UC_ACTION + && !list_is_empty(&facet->subfacets)) { + return; + } + + subfacet = subfacet_create(facet, miss, now); + if (stats) { + subfacet_update_stats(subfacet, stats); + } + if (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.9.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev