diff --git a/doc/of-spec/appendix.tex b/doc/of-spec/appendix.tex index a2c68f6..3077ac7 100755 --- a/doc/of-spec/appendix.tex +++ b/doc/of-spec/appendix.tex @@ -157,7 +157,7 @@ The \verb|out_port| field optionally filters the scope of DELETE and DELETE\_STR The \verb|flags| field may include the follow flags: \input{enum/ofp_flow_mod_flags} -When the \verb|OFPFF_SEND_FLOW_EXP| flag is set, the switch must send a flow expiration message when the flow expires. The default is for the switch to not send flow expirations. +When the \verb|OFPFF_SEND_FLOW_REM| flag is set, the switch must send a flow removed message when the flow expires. The default is for the switch to not send flow removed messages for newly added flows. \\\\ When the \verb|OFPFF_CHECK_OVERLAP| flag is set, the switch must check that there are no conflicting entries with the same priority. If there is one, the flow mod fails and an error code is returned. \\\\ @@ -262,15 +262,15 @@ The reason field can be any of these values: \input{enum/ofp_packet_in_reason} -\subsubsection{Flow Expiration Message} -If the controller has requested to be notified when flows time out, the datapath does this with the \verb|OFPT_FLOW_EXPIRED| message: +\subsubsection{Flow Removed Message} +If the controller has requested to be notified when flows time out, the datapath does this with the \verb|OFPT_FLOW_REMOVED| message: -\input{struct/ofp_flow_expired} +\input{struct/ofp_flow_removed} The \verb|match| and \verb|priority| fields are the same as those used in the flow setup request. \\\\ The \verb|reason| field is one of the following: -\input{enum/ofp_flow_expired_reason} +\input{enum/ofp_flow_removed_reason} The \verb|duration| field indicates the number of seconds the flow was alive (present in the flow table). \\\\ The \verb|idle_timeout| field is directly copied from the flow mod that created this entry. diff --git a/doc/of-spec/openflow-spec-v0.8.9.tex b/doc/of-spec/openflow-spec-v0.8.9.tex index 9abbee0..9c7837d 100755 --- a/doc/of-spec/openflow-spec-v0.8.9.tex +++ b/doc/of-spec/openflow-spec-v0.8.9.tex @@ -318,7 +318,7 @@ Asynchronous messages are sent without solicitation from the switch to the contr \\\\ \textbf{Packet-in:} For all packets that do not have a matching flow entry, a packet-in event is sent to the controller (or if a packet matches an entry with a ``send to controller" action). If the switch has sufficient memory to buffer packets that are sent to the controller, the packet-in events contain some fraction of the packet header (by default \input{define/OFP_DEFAULT_MISS_SEND_LEN} bytes) and a buffer ID to be used by the controller when it is ready for the switch to forward the packet. Switches that do not support internal buffering (or have run out of internal buffering) must send the full packet to the controller as part of the event. \\\\ -\textbf{Flow Expiration:} When a flow entry is added to the switch by a flow modify message, an idle timeout value indicates when the entry should be removed due to a lack of activity, as well as a hard timeout value that indicates when the entry should be removed, regardless of activity. The flow modify message also specifies whether the switch should send an expiration message to the controller when the flow expires. +\textbf{Flow-Removed:} When a flow entry is added to the switch by a flow modify message, an idle timeout value indicates when the entry should be removed due to a lack of activity, as well as a hard timeout value that indicates when the entry should be removed, regardless of activity. The flow modify message also specifies whether the switch should send a flow removed message to the controller when the flow expires. Delete messages may also cause flow removed messages. \\\\ \textbf{Port-status:} The switch is expected to send port-status messages to the controller as port configuration state changes. These events include change in port status (for example, if it was brought down directly by a user) or a change in port status as specified by 802.1D (see Section \ref{flow_table:stp_support} for a description of 802.1D support requirements). \\\\ @@ -372,7 +372,7 @@ If a switch cannot find any table in which to add the incoming flow entry, the s \\\\ For MODIFY requests, if a flow entry with identical header fields does not current reside in any table, the MODIFY acts like an ADD, and the new flow entry must be inserted with zeroed counters. Otherwise, the actions field is changed on the existing entry and its counters and idle time fields are left unchanged. \\\\ -For DELETE requests, if no flow entry matches, no error is recorded, and no flow table modification occurs. If flow entries match, and must be deleted, then each entry with the \verb|OFPFF_SEND_FLOW_EXP| flag set should generate a flow expiration message. +For DELETE requests, if no flow entry matches, no error is recorded, and no flow table modification occurs. If flow entries match, and must be deleted, then each entry with the \verb|OFPFF_SEND_FLOW_REM| flag set should generate a flow removed message. \\\\ MODIFY and DELETE flow mod commands have corresponding \_STRICT versions. Without \_STRICT appended, the wildcards are active and all flows that match the description are modified or removed. If \_STRICT is appended, all fields, including the wildcards and priority, are strictly matched against the entry, and only an identical flow is modified or removed. For example, if a message to remove entries is sent that has all the wildcard flags set, the DELETE command would delete all flows from all tables, while the DELETE\_STRICT command would only delete a rule that applies to all packets at the specified priority. \\\\ @@ -382,7 +382,7 @@ DELETE and DELETE\_STRICT commands can be optionally filtered by output port. I \subsection{Flow Removal} -Each flow entry has an \verb|idle_timeout| and a \verb|hard_timeout| associated with it. If no packet has matched the rule in the last \verb|idle_timeout| seconds, or it has been \verb|hard_timeout| seconds since the flow was inserted, the switch removes the entry and sends a flow expiration message. In addition, the controller is able to actively remove entries by sending a flow message with the \verb|DELETE| or \verb|DELETE_STRICT| command. Like the message used to add the entry, a removal message contains a description, which may include wild cards. +Each flow entry has an \verb|idle_timeout| and a \verb|hard_timeout| associated with it. If no packet has matched the rule in the last \verb|idle_timeout| seconds, or it has been \verb|hard_timeout| seconds since the flow was inserted, the switch removes the entry and sends a flow removed message. In addition, the controller is able to actively remove entries by sending a flow message with the \verb|DELETE| or \verb|DELETE_STRICT| command. Like the message used to add the entry, a removal message contains a description, which may include wild cards. \input{appendix} diff --git a/include/openflow/openflow.h b/include/openflow/openflow.h index 3867837..ff3ac5c 100644 --- a/include/openflow/openflow.h +++ b/include/openflow/openflow.h @@ -534,7 +534,8 @@ OFP_ASSERT(sizeof(struct ofp_match) == 36); #define OFP_DEFAULT_PRIORITY 0x8000 enum ofp_flow_mod_flags { - OFPFF_SEND_FLOW_REM = 1 << 0, /* Send expiration message when flow expires. */ + OFPFF_SEND_FLOW_REM = 1 << 0, /* Send flow removed message when flow + * expires or is deleted. */ OFPFF_CHECK_OVERLAP = 1 << 1, /* Check for overlapping entries first. */ OFPFF_EMERG = 1 << 2 /* Ramark this is for emergency. */ }; @@ -563,14 +564,14 @@ struct ofp_flow_mod { }; OFP_ASSERT(sizeof(struct ofp_flow_mod) == 64); -/* Why did this flow expire? */ +/* Why was this flow removed? */ enum ofp_flow_removed_reason { OFPRR_IDLE_TIMEOUT, /* Flow idle time exceeded idle_timeout. */ OFPRR_HARD_TIMEOUT, /* Time exceeded hard_timeout. */ OFPRR_DELETE /* Evicted by a DELETE flow mod. */ }; -/* Flow expiration (datapath -> controller). */ +/* Flow removed (datapath -> controller). */ struct ofp_flow_removed { struct ofp_header header; struct ofp_match match; /* Description of fields. */