struct xlate_out {
enum slow_path_reason slow; /* 0 if fast path may be used. */
bool fail_open; /* Initial rule is fail open? */
- bool has_learn; /* Actions include NXAST_LEARN? */
- bool has_normal; /* Actions output to OFPP_NORMAL? */
- bool has_fin_timeout; /* Actions include NXAST_FIN_TIMEOUT? */
- ofp_port_t nf_output_iface; /* Output interface index for NetFlow. */
/* Recirculation IDs on which references are held. */
unsigned n_recircs;
* 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.
+ *
+ * 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;
+ int resubmits;
+
/* If nonnull, flow translation populates this cache with references to all
* modules that are affected by translation. This 'xlate_cache' may be
* passed to xlate_push_stats() to perform the same function as