## 3 The OpenFlow Protocol
### OpenFlow Specifications
#### 3.2.2 OpenFlow 1.1  
OpenFlow 1.1 [23] was released in February, 2011. It contains significant changes compared to OpenFlow 1.0. Packet processing works differently now. Packets are processed by a pipeline of multiple flow tables. Two major changes are introduced: a pipeline of multiple flow tables and a group table. We first explain the pipeline. With OpenFlow 1.0, the result of the packet matching is a list of actions that are applied to the packets of a flow. These actions are directly specified by flow table entries, as shown in Figures 2 and 3. With OpenFlow 1.1, the result of the pipeline is a set of actions that are accumulated during pipeline execution and are applied to the packet at the end of the pipeline. The OpenFlow table pipeline requires a new metadata field, instructions and action sets. The metadata field may collect metadata for a packet during the matching process and carry them from one pipeline step to the next. Flow table entries contain instructions instead of actions, as shown in Figure 4. The list of possible instructions for OpenFlow 1.1 are given in Table 1. The \"Apply-Actions\" instruction directly applies actions to the packet. The specified actions are not added to the action set. The \"Write-Actions\" instruction adds the specified actions to the action set and allows for incremental construction of the action set during pipeline execution. The \"Clear-Actions\" instruction empties the action set. The \"Write-Metadata\" instruction updates the metadata field by applying the specified mask to the current metadata field. Finally, the \"Goto\" instruction refers to a flow table, and the matching process continues with this table. To avoid loops in the pipeline, only tables with a higher ID than the current table are allowed to be referenced. Thus, the matching algorithm will deterministically terminate. If no \"Goto\" instruction is specified, the pipeline processing stops, and the accumulated action set is executed on the packet. Figure 5 illustrates the packet processing of the pipeline. Before the pipeline begins, the metadata field and the action set for a packet are initialized as empty. The matching process starts on the first flow \begin{table}
\begin{tabular}{c c c} \hline \hline
**Instruction** & **Argument** & **Semantic** \\ \hline Apply-Actions & Action(s) & Applies actions immediately without adding them to the action set \\ Write-Actions & Action(s) & Merge the specified action(s) into the action set \\ Clear-Actions & - & Clear the action set \\ Write-Metadata & Metadata mask & Updates the metadata field \\ Goto-Table & Table ID & Perform matching on the next table \\ \hline \hline \end{tabular}
\end{table} 
Table 1: List of instructions for OpenFlow 1.1. Figure 4: Flow table entry for OpenFlow 1.1 and later. table. The packet is matched against the consecutive flow tables from each of which the highest-priority matching flow table entry is selected. The pipeline ends when no matching flow table entry is found or no \"Goto\" instruction is set in the matching flow table entry. The pipeline supports the definition of complex forwarding mechanisms and provides more flexibility compared to the switch architecture of OpenFlow 1.0. The second major change is the addition of a group table. The group table supports more complex forwarding behaviors, which are possibly applied to a set of flows. It consists of group table entries, as shown in Figure 6. A group table entry may be performed if a flow table entry uses an appropriate instruction that refers to its group identifier. In particular, multiple flow table entries can point to the same group identifier, so that the group table entry is performed for multiple flows. The group table entry contains a group type, a counters field and a field for action buckets. The counters are used for collecting statistics about packets that are processed by this group. A single action bucket contains a set of actions that may be executed, depending on the group type. There are possibly multiple action buckets for a group table entry.