lockfile: Support \-delimited file names in lockfile_name().
[cascardo/ovs.git] / lib / ofp-actions.h
index c232513..785c814 100644 (file)
     OFPACT(NOTE,            ofpact_note,        data, "note")           \
     OFPACT(EXIT,            ofpact_null,        ofpact, "exit")         \
     OFPACT(SAMPLE,          ofpact_sample,      ofpact, "sample")       \
+    OFPACT(UNROLL_XLATE,    ofpact_unroll_xlate, ofpact, "unroll_xlate") \
                                                                         \
     /* Instructions. */                                                 \
     OFPACT(METER,           ofpact_meter,       ofpact, "meter")        \
@@ -156,11 +157,7 @@ enum {
  *       originate from OpenFlow, then setting 'raw' to zero should be fine:
  *       code to translate the ofpact to OpenFlow must tolerate this case.)
  */
-/* Alignment. */
-#define OFPACT_ALIGNTO 8
-#define OFPACT_ALIGN(SIZE) ROUND_UP(SIZE, OFPACT_ALIGNTO)
-
-OVS_ALIGNED_STRUCT(OFPACT_ALIGNTO, ofpact) {
+struct ofpact {
     /* We want the space advantage of an 8-bit type here on every
      * implementation, without giving up the advantage of having a useful type
      * on implementations that support packed enums. */
@@ -174,7 +171,11 @@ OVS_ALIGNED_STRUCT(OFPACT_ALIGNTO, ofpact) {
     uint16_t len;               /* Length of the action, in bytes, including
                                  * struct ofpact, excluding padding. */
 };
-BUILD_ASSERT_DECL(sizeof(struct ofpact) == OFPACT_ALIGNTO);
+BUILD_ASSERT_DECL(sizeof(struct ofpact) == 4);
+
+/* Alignment. */
+#define OFPACT_ALIGNTO 8
+#define OFPACT_ALIGN(SIZE) ROUND_UP(SIZE, OFPACT_ALIGNTO)
 
 static inline struct ofpact *
 ofpact_next(const struct ofpact *ofpact)
@@ -715,6 +716,17 @@ struct ofpact_group {
     uint32_t group_id;
 };
 
+/* OFPACT_UNROLL_XLATE.
+ *
+ * Used only internally. */
+struct ofpact_unroll_xlate {
+    struct ofpact ofpact;
+
+    /* Metadata in xlate context, visible to controller via PACKET_INs. */
+    uint8_t  rule_table_id;       /* 0xFF if none. */
+    ovs_be64 rule_cookie;         /* OVS_BE64_MAX if none. */
+};
+
 /* Converting OpenFlow to ofpacts. */
 enum ofperr ofpacts_pull_openflow_actions(struct ofpbuf *openflow,
                                           unsigned int actions_len,