ofproto: Allow ->rule_choose_table() to be NULL regardless of table count.
[sliver-openvswitch.git] / include / openflow / nicira-ext.h
index 960b53f..5cf02e7 100644 (file)
@@ -278,7 +278,8 @@ enum nx_action_subtype {
     NXAST_SET_TUNNEL64,         /* struct nx_action_set_tunnel64 */
     NXAST_MULTIPATH,            /* struct nx_action_multipath */
     NXAST_AUTOPATH,             /* struct nx_action_autopath */
-    NXAST_BUNDLE                /* struct nx_action_bundle */
+    NXAST_BUNDLE,               /* struct nx_action_bundle */
+    NXAST_BUNDLE_LOAD           /* struct nx_action_bundle */
 };
 
 /* Header for Nicira-defined actions. */
@@ -426,6 +427,18 @@ OFP_ASSERT(sizeof(struct nx_action_pop_queue) == 16);
  *
  * The following nxm_header values are potentially acceptable as 'dst':
  *
+ *   - NXM_OF_ETH_DST
+ *   - NXM_OF_ETH_SRC
+ *   - NXM_OF_IP_TOS
+ *   - NXM_OF_IP_SRC
+ *   - NXM_OF_IP_DST
+ *   - NXM_OF_TCP_SRC
+ *   - NXM_OF_TCP_DST
+ *   - NXM_OF_UDP_SRC
+ *   - NXM_OF_UDP_DST
+ *     Modifying any of the above fields changes the corresponding packet
+ *     header.
+ *
  *   - NXM_NX_REG(idx) for idx in the switch's accepted range.
  *
  *   - NXM_OF_VLAN_TCI.  Modifying this field's value has side effects on the
@@ -540,8 +553,7 @@ OFP_ASSERT(sizeof(struct nx_action_note) == 16);
  *
  *    3. Stores 'link' in dst[ofs:ofs+n_bits].  The format and semantics of
  *       'dst' and 'ofs_nbits' are similar to those for the NXAST_REG_LOAD
- *       action, except that 'dst' must be NXM_NX_REG(idx) for 'idx' in the
- *       switch's supported range.
+ *       action.
  *
  * The switch will reject actions that have an unknown 'fields', or an unknown
  * 'algorithm', or in which ofs+n_bits is greater than the width of 'dst', or
@@ -567,7 +579,7 @@ struct nx_action_multipath {
 
     /* Where to store the result. */
     ovs_be16 ofs_nbits;         /* (ofs << 6) | (n_bits - 1). */
-    ovs_be32 dst;               /* Destination register. */
+    ovs_be32 dst;               /* Destination. */
 };
 OFP_ASSERT(sizeof(struct nx_action_multipath) == 32);
 
@@ -645,8 +657,7 @@ enum nx_mp_algorithm {
  *    3. Stores 'port' in dst[ofs:ofs+n_bits].
  *
  *       The format and semantics of 'dst' and 'ofs_nbits' are similar to those
- *       for the NXAST_REG_LOAD action, except that 'dst' must be
- *       NXM_NX_REG(idx) for 'idx' in the switch's supported range.
+ *       for the NXAST_REG_LOAD action.
  *
  * The switch will reject actions in which ofs+n_bits is greater than the width
  * of 'dst', with error type OFPET_BAD_ACTION, code OFPBAC_BAD_ARGUMENT.
@@ -659,17 +670,18 @@ struct nx_action_autopath {
 
     /* Where to store the result. */
     ovs_be16 ofs_nbits;         /* (ofs << 6) | (n_bits - 1). */
-    ovs_be32 dst;               /* Destination register. */
+    ovs_be32 dst;               /* Destination. */
 
     ovs_be32 id;                /* Autopath ID. */
     ovs_be32 pad;
 };
 OFP_ASSERT(sizeof(struct nx_action_autopath) == 24);
 \f
-/* Action structure for NXAST_BUNDLE.
+/* Action structure for NXAST_BUNDLE and NXAST_BUNDLE_LOAD.
  *
- * NXAST_BUNDLE chooses a slave from a supplied list of options, and outputs to
- * its selection.
+ * The bundle actions choose a slave from a supplied list of options.
+ * NXAST_BUNDLE outputs to its selection.  NXAST_BUNDLE_LOAD writes its
+ * selection to a register.
  *
  * The list of possible slaves follows the nx_action_bundle structure. The size
  * of each slave is governed by its type as indicated by the 'slave_type'
@@ -695,7 +707,14 @@ OFP_ASSERT(sizeof(struct nx_action_autopath) == 24);
  *
  * The 'zero' parameter at the end of the action structure is reserved for
  * future use.  Switches are required to reject actions which have nonzero
- * bytes in the 'zero' field. */
+ * bytes in the 'zero' field.
+ *
+ * NXAST_BUNDLE actions should have 'ofs_nbits' and 'dst' zeroed.  Switches
+ * should reject actions which have nonzero bytes in either of these fields.
+ *
+ * NXAST_BUNDLE_LOAD stores the OpenFlow port number of the selected slave in
+ * dst[ofs:ofs+n_bits].  The format and semantics of 'dst' and 'ofs_nbits' are
+ * similar to those for the NXAST_REG_LOAD action. */
 struct nx_action_bundle {
     ovs_be16 type;              /* OFPAT_VENDOR. */
     ovs_be16 len;               /* Length including slaves. */
@@ -712,7 +731,10 @@ struct nx_action_bundle {
     ovs_be32 slave_type;        /* NXM_OF_IN_PORT. */
     ovs_be16 n_slaves;          /* Number of slaves. */
 
-    uint8_t zero[10];           /* Reserved. Must be zero. */
+    ovs_be16 ofs_nbits;         /* (ofs << 6) | (n_bits - 1). */
+    ovs_be32 dst;               /* Destination. */
+
+    uint8_t zero[4];            /* Reserved. Must be zero. */
 };
 OFP_ASSERT(sizeof(struct nx_action_bundle) == 32);