X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fopenflow%2Fnicira-ext.h;h=5ec009a767df6f2653f6b65222cfcc75b30c27ba;hb=f2459fe7d91c4c325dfaa3ed18f56200b63ae27e;hp=535cfc3ae070a6330742bf2029a4c3154375bcdd;hpb=999f0d4588503af5a7645ed2f64764bd48c29b9b;p=openvswitch diff --git a/include/openflow/nicira-ext.h b/include/openflow/nicira-ext.h index 535cfc3a..5ec009a7 100644 --- a/include/openflow/nicira-ext.h +++ b/include/openflow/nicira-ext.h @@ -45,6 +45,10 @@ enum nicira_type { NXT_FLOW_END_CONFIG__OBSOLETE, NXT_FLOW_END__OBSOLETE, NXT_MGMT__OBSOLETE, + + /* Use the high 32 bits of the cookie field as the tunnel ID in the flow + * match. */ + NXT_TUN_ID_FROM_COOKIE, }; struct nicira_header { @@ -54,6 +58,14 @@ struct nicira_header { }; OFP_ASSERT(sizeof(struct nicira_header) == 16); +struct nxt_tun_id_cookie { + struct ofp_header header; + uint32_t vendor; /* NX_VENDOR_ID. */ + uint32_t subtype; /* NXT_TUN_ID_FROM_COOKIE */ + uint8_t set; /* Nonzero to enable, zero to disable. */ + uint8_t pad[7]; +}; +OFP_ASSERT(sizeof(struct nxt_tun_id_cookie) == 24); enum nx_action_subtype { NXAST_SNAT__OBSOLETE, /* No longer used. */ @@ -61,14 +73,16 @@ enum nx_action_subtype { /* Searches the flow table again, using a flow that is slightly modified * from the original lookup: * - * - The flow's in_port is changed to that specified in the 'in_port' - * member of struct nx_action_resubmit. + * - The 'in_port' member of struct nx_action_resubmit is used as the + * flow's in_port. * * - If NXAST_RESUBMIT is preceded by actions that affect the flow * (e.g. OFPAT_SET_VLAN_VID), then the flow is updated with the new * values. * - * If the modified flow matches in the flow table, then the corresponding + * Following the lookup, the original in_port is restored. + * + * If the modified flow matched in the flow table, then the corresponding * actions are executed, except that NXAST_RESUBMIT actions found in the * secondary set of actions are ignored. Afterward, actions following * NXAST_RESUBMIT in the original set of actions, if any, are executed; any @@ -78,13 +92,15 @@ enum nx_action_subtype { * * NXAST_RESUBMIT may be used any number of times within a set of actions. */ - NXAST_RESUBMIT + NXAST_RESUBMIT, + + NXAST_SET_TUNNEL /* Set encapsulating tunnel ID. */ }; /* Action structure for NXAST_RESUBMIT. */ struct nx_action_resubmit { uint16_t type; /* OFPAT_VENDOR. */ - uint16_t len; /* Length is 8. */ + uint16_t len; /* Length is 16. */ uint32_t vendor; /* NX_VENDOR_ID. */ uint16_t subtype; /* NXAST_RESUBMIT. */ uint16_t in_port; /* New in_port for checking flow table. */ @@ -92,14 +108,31 @@ struct nx_action_resubmit { }; OFP_ASSERT(sizeof(struct nx_action_resubmit) == 16); +/* Action structure for NXAST_SET_TUNNEL. */ +struct nx_action_set_tunnel { + uint16_t type; /* OFPAT_VENDOR. */ + uint16_t len; /* Length is 16. */ + uint32_t vendor; /* NX_VENDOR_ID. */ + uint16_t subtype; /* NXAST_SET_TUNNEL. */ + uint8_t pad[2]; + uint32_t tun_id; /* Tunnel ID. */ +}; +OFP_ASSERT(sizeof(struct nx_action_set_tunnel) == 16); + /* Header for Nicira-defined actions. */ struct nx_action_header { uint16_t type; /* OFPAT_VENDOR. */ - uint16_t len; /* Length is 8. */ + uint16_t len; /* Length is 16. */ uint32_t vendor; /* NX_VENDOR_ID. */ uint16_t subtype; /* NXAST_*. */ uint8_t pad[6]; }; OFP_ASSERT(sizeof(struct nx_action_header) == 16); +/* Wildcard for tunnel ID. */ +#define NXFW_TUN_ID (1 << 25) + +#define NXFW_ALL NXFW_TUN_ID +#define OVSFW_ALL (OFPFW_ALL | NXFW_ALL) + #endif /* openflow/nicira-ext.h */