summaryrefslogtreecommitdiff
path: root/ofproto/ofproto-dpif-trace.h
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.h
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.h')
-rw-r--r--ofproto/ofproto-dpif-trace.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ofproto/ofproto-dpif-trace.h b/ofproto/ofproto-dpif-trace.h
index 5e51771b1..ea6cb3fc0 100644
--- a/ofproto/ofproto-dpif-trace.h
+++ b/ofproto/ofproto-dpif-trace.h
@@ -28,6 +28,8 @@
* each action (OFT_ACTION) executed in the table.
*/
+#include "openvswitch/dynamic-string.h"
+#include "ofproto/ofproto-dpif.h"
#include "openvswitch/compiler.h"
#include "openvswitch/list.h"
#include "flow.h"
@@ -79,6 +81,10 @@ struct oftrace_next_ct_state {
};
void ofproto_dpif_trace_init(void);
+void ofproto_trace(struct ofproto_dpif *ofproto, const struct flow *flow,
+ const struct dp_packet *packet,
+ const struct ofpact *, size_t ofpacts_len,
+ struct ovs_list *next_ct_states, struct ds *output);
struct oftrace_node *oftrace_report(struct ovs_list *, enum oftrace_node_type,
const char *text);