netdev: do not allow devices to be opened with conflicting types
[cascardo/ovs.git] / ofproto / ofproto-dpif-xlate.h
index 227a161..7808a60 100644 (file)
@@ -17,9 +17,9 @@
 
 #include "dp-packet.h"
 #include "flow.h"
-#include "meta-flow.h"
+#include "openvswitch/meta-flow.h"
 #include "odp-util.h"
-#include "ofpbuf.h"
+#include "openvswitch/ofpbuf.h"
 #include "ofproto-dpif-mirror.h"
 #include "ofproto-dpif-rid.h"
 #include "ofproto-dpif.h"
@@ -83,18 +83,19 @@ struct xlate_in {
      * '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
@@ -104,18 +105,23 @@ struct xlate_in {
      * 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
@@ -201,7 +207,11 @@ void xlate_in_init(struct xlate_in *, struct ofproto_dpif *,
 void xlate_out_uninit(struct xlate_out *);
 void xlate_actions_for_side_effects(struct xlate_in *);
 
-int xlate_send_packet(const struct ofport_dpif *, struct dp_packet *);
+enum ofperr xlate_resume(struct ofproto_dpif *,
+                         const struct ofputil_packet_in_private *,
+                         struct ofpbuf *odp_actions, enum slow_path_reason *);
+
+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 *);