Instruction

This structure was first introduced in version 1.1. In the previous version the action structure had richer semantics. In this and subsequent versions, Instruction is the top-level structure that is the policy result of a flow table match. The instruction can forward the packet to another table, goto, update metadata, or apply a sequence of actions.

Not Defined
This message is not defined in this version of the protocol.

Instruction Structure

 

There are six different types of instructions in this version of openflow. GotoTable continues flow processing at the targeted table and WriteMetadata updates the metadata. WriteActions updates the action sequence for the target table. ApplyActions apply the action sequence in-order, and ClearActions removes all actions. There is also an Experimenter type.

Instruction Structure

Field Name Bits Byte Ordering Constraints
type 16 MSBF in 0x0001..0x0005, 0xFFFF
length 16 MSBF ≥ 4

Instruction Payload

Type Name Type Value Field Name Bits Byte Ordering Constraints
GotoTable 0x0001
type 16 MSBF = 0x0001
length 16 MSBF = 0x0008
table_id 8 - none
pad 24 - none
WriteMetadata 0x0002
type 16 MSBF = 0x0002
length 16 MSBF = 0x0018
pad 32 - none
metadata 64 MSBF none
metadata_mask 64 MSBF none
WriteActions 0x0003
type 16 MSBF = 0x0003
length 16 MSBF ≥ 8
pad 32 - none
action 32 MSBF action restrictions, only one action of each type
ApplyActions 0x0004
type 16 MSBF = 0x0004
length 16 MSBF ≥ 8
pad 32 - none
action 32 MSBF action restrictions
ClearActions 0x0005
type 16 MSBF = 0x0005
length 16 MSBF ≥ 8
pad 32 - none
action 32 MSBF action restrictions
Experimenter 0xFFFF
type 16 MSBF = 0xFFFF
length 16 MSBF ≥ 0x0008
experimenter_id 32 - none

References

OpenFlow Switch Specification 1.1.0, page 30

Instruction Structure

 

There are six different types of instructions in this version of openflow. GotoTable continues flow processing at the targeted table and WriteMetadata updates the metadata. WriteActions updates the action sequence for the target table. ApplyActions apply the action sequence in-order, and ClearActions removes all actions. There is also an Experimenter type.

Instruction Structure

Field Name Bits Byte Ordering Constraints
type 16 MSBF in 0x0001..0x0005, 0xFFFF
length 16 MSBF ≥ 4

Instruction Payload

Type Name Type Value Field Name Bits Byte Ordering Constraints
GotoTable 0x0001
type 16 MSBF = 0x0001
length 16 MSBF = 0x0008
table_id 8 - none
pad 24 - none
WriteMetadata 0x0002
type 16 MSBF = 0x0002
length 16 MSBF = 0x0018
pad 32 - none
metadata 64 MSBF none
metadata_mask 64 MSBF none
WriteActions 0x0003
type 16 MSBF = 0x0003
length 16 MSBF ≥ 8
pad 32 - none
action 32 MSBF action restrictions, only one action of each type
ApplyActions 0x0004
type 16 MSBF = 0x0004
length 16 MSBF ≥ 8
pad 32 - none
action 32 MSBF action restrictions
ClearActions 0x0005
type 16 MSBF = 0x0005
length 16 MSBF ≥ 8
pad 32 - none
action 32 MSBF action restrictions
Experimenter 0xFFFF
type 16 MSBF = 0xFFFF
length 16 MSBF ≥ 0x0008
experimenter_id 32 - none

References

OpenFlow Switch Specification 1.2.0, page 38

Instruction Structure

 

A new type of instruction was introduced in this version of Openflow called Meter which applies a meter to a flow.

Instruction Structure

Field Name Bits Byte Ordering Constraints
type 16 MSBF in 0x0001..0x0005, 0xFFFF
length 16 MSBF ≥ 4

Instruction Payload

Type Name Type Value Field Name Bits Byte Ordering Constraints
GotoTable 0x0001
type 16 MSBF = 0x0001
length 16 MSBF = 0x0008
table_id 8 - none
pad 24 - none
WriteMetadata 0x0002
type 16 MSBF = 0x0002
length 16 MSBF = 0x0018
pad 32 - none
metadata 64 MSBF none
metadata_mask 64 MSBF none
WriteActions 0x0003
type 16 MSBF = 0x0003
length 16 MSBF ≥ 8
pad 32 - none
action 32 MSBF action restrictions, only one action of each type
ApplyActions 0x0004
type 16 MSBF = 0x0004
length 16 MSBF ≥ 8
pad 32 - none
action 32 MSBF action restrictions
ClearActions 0x0005
type 16 MSBF = 0x0005
length 16 MSBF ≥ 8
pad 32 - none
action 32 MSBF action restrictions
Meter 0x0006
type 16 MSBF = 0x0006
length 16 MSBF = 0x0008
meter_id 32 - none
Experimenter 0xFFFF
type 16 MSBF = 0xFFFF
length 16 MSBF ≥ 0x0008
experimenter_id 32 - none

References

OpenFlow Switch Specification 1.3.0, page 46

Instruction Structure

 

A new type of instruction was introduced in this version of Openflow called Meter which applies a meter to a flow. 

Instruction Structure

Field Name Bits Byte Ordering Constraints
type 16 MSBF in 0x0001..0x0005, 0xFFFF
length 16 MSBF ≥ 4

Instruction Payload

Type Name Type Value Field Name Bits Byte Ordering Constraints
GotoTable 0x0001
type 16 MSBF = 0x0001
length 16 MSBF = 0x0008
table_id 8 - none
pad 24 - none
WriteMetadata 0x0002
type 16 MSBF = 0x0002
length 16 MSBF = 0x0018
pad 32 - none
metadata 64 MSBF none
metadata_mask 64 MSBF none
WriteActions 0x0003
type 16 MSBF = 0x0003
length 16 MSBF ≥ 8
pad 32 - none
action 32 MSBF action restrictions, only one action of each type
ApplyActions 0x0004
type 16 MSBF = 0x0004
length 16 MSBF ≥ 8
pad 32 - none
action 32 MSBF action restrictions
ClearActions 0x0005
type 16 MSBF = 0x0005
length 16 MSBF ≥ 8
pad 32 - none
action 32 MSBF action restrictions
Meter 0x0006
type 16 MSBF = 0x0006
length 16 MSBF = 0x0008
meter_id 32 - none
Experimenter 0xFFFF
type 16 MSBF = 0xFFFF
length 16 MSBF ≥ 0x0008
experimenter_id 32 - none

References

OpenFlow Switch Specification 1.3.1, pages 54-56

Instruction Structure

 

A new type of instruction was introduced in this version of Openflow called Meter which applies a meter to a flow. 

Instruction Structure

Field Name Bits Byte Ordering Constraints
type 16 MSBF in 0x0001..0x0005, 0xFFFF
length 16 MSBF ≥ 4

Instruction Payload

Type Name Type Value Field Name Bits Byte Ordering Constraints
GotoTable 0x0001
type 16 MSBF = 0x0001
length 16 MSBF = 0x0008
table_id 8 - none
pad 24 - none
WriteMetadata 0x0002
type 16 MSBF = 0x0002
length 16 MSBF = 0x0018
pad 32 - none
metadata 64 MSBF none
metadata_mask 64 MSBF none
WriteActions 0x0003
type 16 MSBF = 0x0003
length 16 MSBF ≥ 8
pad 32 - none
action 32 MSBF action restrictions, only one action of each type
ApplyActions 0x0004
type 16 MSBF = 0x0004
length 16 MSBF ≥ 8
pad 32 - none
action 32 MSBF action restrictions
ClearActions 0x0005
type 16 MSBF = 0x0005
length 16 MSBF ≥ 8
pad 32 - none
action 32 MSBF action restrictions
Meter 0x0006
type 16 MSBF = 0x0006
length 16 MSBF = 0x0008
meter_id 32 - none
Experimenter 0xFFFF
type 16 MSBF = 0xFFFF
length 16 MSBF ≥ 0x0008
experimenter_id 32 - none

References

OpenFlow Switch Specification 1.3.2, page 55

Under development
This section is under active development.

Under development
This section is under active development.