Nicira Extension Structures¶
Nicira Extension Actions Structures¶
The followings shows the supported NXAction classes in OF1.3, but also available in OF1.2+.
-
class
ryu.ofproto.ofproto_v1_3_parser.
NXActionRegMove
(src_field, dst_field, n_bits, src_ofs=0, dst_ofs=0, type_=None, len_=None, experimenter=None, subtype=None)¶
-
class
ryu.ofproto.ofproto_v1_3_parser.
NXActionLearn
(table_id, specs, idle_timeout=0, hard_timeout=0, priority=32768, cookie=0, flags=0, fin_idle_timeout=0, fin_hard_timeout=0, type_=None, len_=None, experimenter=None, subtype=None)¶
-
class
ryu.ofproto.ofproto_v1_3_parser.
NXActionConjunction
(clause, n_clauses, id_, type_=None, len_=None, experimenter=None, subtype=None)¶
-
class
ryu.ofproto.ofproto_v1_3_parser.
NXActionResubmitTable
(in_port=65528, table_id=255, type_=None, len_=None, experimenter=None, subtype=None)¶
-
class
ryu.ofproto.ofproto_v1_3_parser.
NXActionCT
(flags, zone_src, zone_start, zone_end, recirc_table, alg, actions, type_=None, len_=None, experimenter=None, subtype=None)¶
-
class
ryu.ofproto.ofproto_v1_3_parser.
NXFlowSpecMatch
(src, dst, n_bits)¶
-
class
ryu.ofproto.ofproto_v1_3_parser.
NXFlowSpecLoad
(src, dst, n_bits)¶
-
class
ryu.ofproto.ofproto_v1_3_parser.
NXFlowSpecOutput
(src, n_bits, dst='')¶
Nicira Extended Match Structures¶
The API of this class is the same as OFPMatch
.
You can define the flow match by the keyword arguments. The following arguments are available.
Argument | Value | Description |
---|---|---|
eth_dst_nxm | MAC address | Ethernet destination address. |
eth_src_nxm | MAC address | Ethernet source address. |
eth_type_nxm | Integer 16bit | Ethernet type. Needed to support Nicira extensions that require the eth_type to be set. (i.e. tcp_flags_nxm) |
ip_proto_nxm | Integer 8bit | IP protocol. Needed to support Nicira extensions that require the ip_proto to be set. (i.e. tcp_flags_nxm) |
tunnel_id_nxm | Integer 64bit | Tunnel identifier. |
tun_ipv4_src | IPv4 address | Tunnel IPv4 source address. |
tun_ipv4_dst | IPv4 address | Tunnel IPv4 destination address. |
pkt_mark | Integer 32bit | Packet metadata mark. |
tcp_flags_nxm | Integer 16bit | TCP Flags. Requires setting fields: eth_type_nxm = [0x0800 (IP)|0x86dd (IPv6)] and ip_proto_nxm = 6 (TCP) |
conj_id | Integer 32bit | Conjunction ID used only with the conjunction action |
ct_state | Integer 32bit | Conntrack state. |
ct_zone | Integer 16bit | Conntrack zone. |
ct_mark | Integer 32bit | Conntrack mark. |
ct_label | Integer 128bit | Conntrack label. |
tun_ipv6_src | IPv6 address | Tunnel IPv6 source address. |
tun_ipv6_dst | IPv6 address | Tunnel IPv6 destination address. |
_dp_hash | Integer 32bit | Flow hash computed in Datapath. |
reg<idx> | Integer 32bit | Packet register. <idx> is register number 0-7. |
Note
Setting the TCP flags via the nicira extensions. This is required when using OVS version < 2.4. When using the nxm fields, you need to use any nxm prereq fields as well or you will receive a OFPBMC_BAD_PREREQ error
Example:
# WILL NOT work
flag = tcp.TCP_ACK
match = parser.OFPMatch(
tcp_flags_nxm=(flag, flag),
ip_proto=inet.IPPROTO_TCP,
eth_type=eth_type)
# Works
flag = tcp.TCP_ACK
match = parser.OFPMatch(
tcp_flags_nxm=(flag, flag),
ip_proto_nxm=inet.IPPROTO_TCP,
eth_type_nxm=eth_type)