summaryrefslogtreecommitdiff
path: root/ofproto
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@ovn.org>2017-11-01 14:49:15 -0700
committerJustin Pettit <jpettit@ovn.org>2018-01-10 16:42:00 -0800
commita934a3dd666698f8aca47f6a6a3e7678e9b3bf07 (patch)
tree223edefe831c1141cd030ef7adde832a09241ac6 /ofproto
parent556ef8b03c29b295edda8b81172fc2dc9d739171 (diff)
downloadopenvswitch-a934a3dd666698f8aca47f6a6a3e7678e9b3bf07.tar.gz
ofp-actions: Add action "debug_slow" for testing slow-path.
It isn't otherwise useful and in fact hurts performance so it's disabled without --enable-dummy. An upcoming commit will make use of this. Signed-off-by: Justin Pettit <jpettit@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto')
-rw-r--r--ofproto/ofproto-dpif-xlate.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index c7fe197b3..94bdac14a 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -5302,6 +5302,7 @@ reversible_actions(const struct ofpact *ofpacts, size_t ofpacts_len)
case OFPACT_CONTROLLER:
case OFPACT_CT_CLEAR:
case OFPACT_DEBUG_RECIRC:
+ case OFPACT_DEBUG_SLOW:
case OFPACT_DEC_MPLS_TTL:
case OFPACT_DEC_TTL:
case OFPACT_ENQUEUE:
@@ -5635,6 +5636,7 @@ freeze_unroll_actions(const struct ofpact *a, const struct ofpact *end,
case OFPACT_ENCAP:
case OFPACT_DECAP:
case OFPACT_DEBUG_RECIRC:
+ case OFPACT_DEBUG_SLOW:
case OFPACT_CT:
case OFPACT_CT_CLEAR:
case OFPACT_NAT:
@@ -6130,6 +6132,7 @@ recirc_for_mpls(const struct ofpact *a, struct xlate_ctx *ctx)
case OFPACT_CT_CLEAR:
case OFPACT_NAT:
case OFPACT_DEBUG_RECIRC:
+ case OFPACT_DEBUG_SLOW:
case OFPACT_METER:
case OFPACT_CLEAR_ACTIONS:
case OFPACT_WRITE_ACTIONS:
@@ -6578,6 +6581,10 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len,
ctx_trigger_freeze(ctx);
a = ofpact_next(a);
break;
+
+ case OFPACT_DEBUG_SLOW:
+ ctx->xout->slow |= SLOW_ACTION;
+ break;
}
/* Check if need to store this and the remaining actions for later