There's no point in executing an empty set of actions.
dpif_execute() has had this optimization internally for a long time but
dpif_operate() doesn't. For dpif_operate() it seems like a bigger win to
optimize it at this higher level, avoiding adding any operation to the
array at all.
Signed-off-by: Ben Pfaff <blp@nicira.com>
if (!execute_controller_action(ofproto, &facet->flow,
subfacet->actions,
- subfacet->actions_len, packet, true)) {
+ subfacet->actions_len, packet, true)
+ && subfacet->actions_len > 0) {
struct flow_miss_op *op = &ops[(*n_ops)++];
struct dpif_execute *execute = &op->dpif_op.execute;