#include "dp-packet.h"
#include "flow.h"
-#include "meta-flow.h"
+#include "openvswitch/meta-flow.h"
#include "odp-util.h"
#include "openvswitch/ofpbuf.h"
#include "ofproto-dpif-mirror.h"
* 'rule' is the rule being submitted into. It will be null if the
* resubmit or OFPP_TABLE action didn't find a matching rule.
*
- * 'recurse' is the resubmit recursion depth at time of invocation.
+ * 'indentation' is the resubmit recursion depth at time of invocation,
+ * suitable for indenting the output.
*
* This is normally null so the client has to set it manually after
* calling xlate_in_init(). */
void (*resubmit_hook)(struct xlate_in *, struct rule_dpif *rule,
- int recurse);
+ int indentation);
/* If nonnull, flow translation calls this function to report some
* significant decision, e.g. to explain why OFPP_NORMAL translation
- * dropped a packet. 'recurse' is the resubmit recursion depth at time of
- * invocation. */
- void (*report_hook)(struct xlate_in *, int recurse,
+ * dropped a packet. 'indentation' is the resubmit recursion depth at time
+ * of invocation, suitable for indenting the output. */
+ void (*report_hook)(struct xlate_in *, int indentation,
const char *format, va_list args);
/* If nonnull, flow translation credits the specified statistics to each
* calling xlate_in_init(). */
const struct dpif_flow_stats *resubmit_stats;
- /* Recursion and resubmission levels carried over from a pre-existing
- * translation of a related flow. An example of when this can occur is
- * the translation of an ARP packet that was generated as the result of
- * outputting to a tunnel port. In this case, the original flow going to
- * the tunnel is the related flow. Since the two flows are different, they
- * should not use the same xlate_ctx structure. However, we still need
- * limit the maximum recursion across the entire translation.
+ /* Counters carried over from a pre-existing translation of a related flow.
+ * This can occur due to, e.g., the translation of an ARP packet that was
+ * generated as the result of outputting to a tunnel port. In that case,
+ * the original flow going to the tunnel is the related flow. Since the
+ * two flows are different, they should not use the same xlate_ctx
+ * structure. However, we still need limit the maximum recursion across
+ * the entire translation.
*
* These fields are normally set to zero, so the client has to set them
- * manually after calling xlate_in_init(). In that case, they should be
- * copied from the same-named fields in the related flow's xlate_ctx. */
- int recurse;
+ * manually after calling xlate_in_init(). In that case, they should be
+ * copied from the same-named fields in the related flow's xlate_ctx.
+ *
+ * These fields are really implementation details; the client doesn't care
+ * about what they mean. See the corresponding fields in xlate_ctx for
+ * real documentation. */
+ int indentation;
+ int depth;
int resubmits;
/* If nonnull, flow translation populates this cache with references to all
const struct ofputil_packet_in_private *,
struct ofpbuf *odp_actions, enum slow_path_reason *);
-int xlate_send_packet(const struct ofport_dpif *, struct dp_packet *);
+int xlate_send_packet(const struct ofport_dpif *, bool oam, struct dp_packet *);
struct xlate_cache *xlate_cache_new(void);
void xlate_push_stats(struct xlate_cache *, const struct dpif_flow_stats *);