summaryrefslogtreecommitdiff
path: root/ofproto/ofproto-dpif-trace.c
diff options
context:
space:
mode:
authorWilliam Tu <u9012063@gmail.com>2018-02-28 16:32:27 -0800
committerBen Pfaff <blp@ovn.org>2018-03-05 16:16:12 -0800
commitd1ea2cc3de99f0695ca89b2bebe49452b2a1db07 (patch)
tree92d60c81cf185dffca7f11ecc4801bd25b547696 /ofproto/ofproto-dpif-trace.c
parent2a72edbb0af95fdd8c45266fdfa5f38c7dd346ff (diff)
downloadopenvswitch-d1ea2cc3de99f0695ca89b2bebe49452b2a1db07.tar.gz
xlate: auto ofproto trace when recursion too deep
Usually ofproto/trace is used to debug the flow translation error. When translation error such as recursion too deep or too many resubmit, the issue might happen momentary; flows causing the recursion expire when users try to debug it. This patch enables the ofproto trace automatically when recursion is too deep or too many resubmit, by invoking the translation again, and log the ofproto trace as warnings. Since the log will be huge, rate limit to one per minute. VMWare-BZ: #2054659 Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto/ofproto-dpif-trace.c')
-rw-r--r--ofproto/ofproto-dpif-trace.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/ofproto/ofproto-dpif-trace.c b/ofproto/ofproto-dpif-trace.c
index 4071cc0ff..7211eac8e 100644
--- a/ofproto/ofproto-dpif-trace.c
+++ b/ofproto/ofproto-dpif-trace.c
@@ -23,11 +23,6 @@
#include "ofproto-dpif-xlate.h"
#include "unixctl.h"
-static void ofproto_trace(struct ofproto_dpif *, const struct flow *,
- const struct dp_packet *packet,
- const struct ofpact[], size_t ofpacts_len,
- struct ovs_list *next_ct_states,
- struct ds *);
static void oftrace_node_destroy(struct oftrace_node *);
/* Creates a new oftrace_node, populates it with the given 'type' and a copy of
@@ -661,7 +656,7 @@ ofproto_trace__(struct ofproto_dpif *ofproto, const struct flow *flow,
*
* If 'ofpacts' is nonnull then its 'ofpacts_len' bytes specify the actions to
* trace, otherwise the actions are determined by a flow table lookup. */
-static void
+void
ofproto_trace(struct ofproto_dpif *ofproto, const struct flow *flow,
const struct dp_packet *packet,
const struct ofpact ofpacts[], size_t ofpacts_len,