learn: Fix bugs when learn actions use subfields wider than 64 bits.
[sliver-openvswitch.git] / include / openflow / nicira-ext.h
index 44b3ddd..f8b863c 100644 (file)
@@ -193,8 +193,8 @@ enum nx_hash_fields {
  */
 struct nx_flow_mod_table_id {
     struct ofp_header header;
-    uint32_t vendor;            /* NX_VENDOR_ID. */
-    uint32_t subtype;           /* NXT_FLOW_MOD_TABLE_ID. */
+    ovs_be32 vendor;            /* NX_VENDOR_ID. */
+    ovs_be32 subtype;           /* NXT_FLOW_MOD_TABLE_ID. */
     uint8_t set;                /* Nonzero to enable, zero to disable. */
     uint8_t pad[7];
 };
@@ -787,6 +787,9 @@ enum nx_mp_algorithm {
  *     field[ofs:ofs+n_bits-1].  Actions are executed in the same order as the
  *     flow_mod_specs.
  *
+ *     A single NXAST_REG_LOAD action writes no more than 64 bits, so n_bits
+ *     greater than 64 yields multiple NXAST_REG_LOAD actions.
+ *
  * The flow_mod_spec destination spec for 'dst' of 2 (when 'src' is 0) is
  * empty.  It has the following meaning:
  *
@@ -1565,6 +1568,12 @@ OFP_ASSERT(sizeof(struct nx_action_output_reg) == 24);
 #define NXM_NX_REG3_W     NXM_HEADER_W(0x0001, 3, 4)
 #define NXM_NX_REG4       NXM_HEADER  (0x0001, 4, 4)
 #define NXM_NX_REG4_W     NXM_HEADER_W(0x0001, 4, 4)
+#define NXM_NX_REG5       NXM_HEADER  (0x0001, 5, 4)
+#define NXM_NX_REG5_W     NXM_HEADER_W(0x0001, 5, 4)
+#define NXM_NX_REG6       NXM_HEADER  (0x0001, 6, 4)
+#define NXM_NX_REG6_W     NXM_HEADER_W(0x0001, 6, 4)
+#define NXM_NX_REG7       NXM_HEADER  (0x0001, 7, 4)
+#define NXM_NX_REG7_W     NXM_HEADER_W(0x0001, 7, 4)
 
 /* Tunnel ID.
  *