Oct 31, 2016

Instructions and Actions

When a match is found, things start happening. There are six concepts: Instruction, Instruction Sets, Actions, Action Lists, Action Sets, and Action Buckets.

As you can see the following table, this set of one or more Instructions in a flow entry is Instruction Set. An individual Instruction in the Instruction Set might or might not have a list of action - an Action List - associated with it.


An Action Set is passed between flow tables during flow processing. An Action list is associated with an Instruction with a flow entry of a single flow table.

Instructions 

There are six types of instructions as could see the following table. Some Instruction types have actions associated with them, and others do not, but all instructions cause a change of some type - to a packet, an action set, or to pipeline processing. 


If a switch cannot execute an instruction in a flow entry given to it by a controller, it rejects the flow entry and sends an error message to the controller.

Instruction Sets

An Instruction Set comprises the "Instructions" field in a flow entry, and consists of one or more individual Instructions. An individual Instruction Set can only contain one Instruction of each type. For example, an instruction set can contain an Apply-Actions instruction, a Write-Actions instruction, and a Goto-Table instruction, but cannot contain two difference goto-table instructions. And since there are only six Instruction types, an Instruction Set can never contain more that six Instructions. Although a given Instruction Set might not contain Instruction of all six types, Instructions in the set are executed in the following order:
  1. Meter
  2. Apply-Actions
  3. Clear-Actions
  4. Write-Actions
  5. Write-Metadata
  6. Goto-Table

Action Lists

Action List includes three actions:
  • Apply-Action Instruction immediately executes the actions in the Action List. The actions are executed consecutively, in the order they appear on the list, so the order of the actions can matter.
  • Write-Action instruction writes the actions on the Action List to the Action Set, used to pipeline processing. 
  • The controller uses the packet out message to send a packet into the switch dataflow. 

Action

The following table lists the action types in current use and indicates whether they are required or optional.

 

Action Sets

As previously explained, an Action set is used in pipeline processing. 

Action buckets 

Where an Action set contains one or more actions, ac Action Bucket contains one or more Action Sets.


No comments:

Post a Comment