ofp-print: Fix typos.
[openvswitch] / include / openflow / nicira-ext.h
index d87915e213a29196996d2ae5a63a1e4999f4c5c4..3970e23fecea2e01ba8fe76bfb792c84aee57c5d 100644 (file)
@@ -205,8 +205,8 @@ OFP_ASSERT(sizeof(struct nxt_tun_id_cookie) == 24);
  *      OpenFlow features.  In particular attempts to modify the flow table
  *      will be rejected with an OFPBRC_EPERM error.
  *
- *      Slave controllers also do not receive asynchronous messages
- *      (OFPT_PACKET_IN, OFPT_FLOW_REMOVED, OFPT_PORT_STATUS).
+ *      Slave controllers do not receive OFPT_PACKET_IN or OFPT_FLOW_REMOVED
+ *      messages, but they do receive OFPT_PORT_STATUS messages.
  */
 struct nx_role_request {
     struct nicira_header nxh;
@@ -347,8 +347,11 @@ OFP_ASSERT(sizeof(struct nx_action_pop_queue) == 16);
  * bit 'c').  Bit numbering starts at 0 for the least-significant bit, 1 for
  * the next most significant bit, and so on.
  *
- * 'src' and 'dst' are nxm_header values with nxm_hasmask=0.  The following
- * nxm_header values are potentially acceptable as 'src':
+ * 'src' and 'dst' are nxm_header values with nxm_hasmask=0.  (It doesn't make
+ * sense to use nxm_hasmask=1 because the action does not do any kind of
+ * matching; it uses the actual value of a field.)
+ *
+ * The following nxm_header values are potentially acceptable as 'src':
  *
  *   - NXM_OF_IN_PORT
  *   - NXM_OF_ETH_DST
@@ -413,7 +416,7 @@ OFP_ASSERT(sizeof(struct nx_action_reg_move) == 24);
  * starts at 0 for the least-significant bit, 1 for the next most significant
  * bit, and so on.
  *
- * 'dst' must be one of the following:
+ * 'dst' is an nxm_header with nxm_hasmask=0.  It must be one of the following:
  *
  *   - NXM_NX_REG(idx) for idx in the switch's accepted range.
  *
@@ -864,7 +867,8 @@ OFP_ASSERT(sizeof(struct nx_action_note) == 16);
 #define NXM_NX_REG(IDX)   NXM_HEADER  (0x0001, IDX, 4)
 #define NXM_NX_REG_W(IDX) NXM_HEADER_W(0x0001, IDX, 4)
 #define NXM_NX_REG_IDX(HEADER) NXM_FIELD(HEADER)
-#define NXM_IS_NX_REG(HEADER) (!((((HEADER) ^ NXM_NX_REG(0))) & 0xffffe0ff))
+#define NXM_IS_NX_REG(HEADER) (!((((HEADER) ^ NXM_NX_REG0)) & 0xffffe1ff))
+#define NXM_IS_NX_REG_W(HEADER) (!((((HEADER) ^ NXM_NX_REG0_W)) & 0xffffe1ff))
 #define NXM_NX_REG0       NXM_HEADER  (0x0001, 0, 4)
 #define NXM_NX_REG0_W     NXM_HEADER_W(0x0001, 0, 4)
 #define NXM_NX_REG1       NXM_HEADER  (0x0001, 1, 4)
@@ -892,7 +896,7 @@ OFP_ASSERT(sizeof(struct nx_action_note) == 16);
 /* ## Requests and replies. ## */
 /* ## --------------------- ## */
 
-enum {
+enum nx_flow_format {
     NXFF_OPENFLOW10 = 0,         /* Standard OpenFlow 1.0 compatible. */
     NXFF_TUN_ID_FROM_COOKIE = 1, /* OpenFlow 1.0, plus obtain tunnel ID from
                                   * cookie. */