ofctl_v1_3: fix match for metadata
also use the default priority for FlowMod. Signed-off-by: Srini Seetharaman <srini.seetharaman@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
a05b1e990f
commit
d30e9da4da
@ -238,7 +238,7 @@ def to_match(dp, attrs):
|
||||
match_append[key](ip, mask)
|
||||
elif key == 'tp_src' or key == 'tp_dst':
|
||||
# tp_src/dst
|
||||
match = match_append[key](value, match, attrs)
|
||||
match_append[key](value, match, attrs)
|
||||
elif key == 'metadata':
|
||||
# metadata
|
||||
metadata = value[0]
|
||||
|
@ -357,6 +357,9 @@ OFPFC_MODIFY_STRICT = 2 # Modify entry strictly matching wildcards
|
||||
OFPFC_DELETE = 3 # Delete all matching flows.
|
||||
OFPFC_DELETE_STRICT = 4 # Strictly match wildcards and priority.
|
||||
|
||||
# By default, choose a priority in the middle.
|
||||
OFP_DEFAULT_PRIORITY = 0x8000
|
||||
|
||||
# enum ofp_flow_mod_flags
|
||||
OFPFF_SEND_FLOW_REM = 1 << 0 # Send flow removed message when flow
|
||||
# expires or is deleted.
|
||||
|
@ -2359,7 +2359,8 @@ class OFPFlowMod(MsgBase):
|
||||
"""
|
||||
def __init__(self, datapath, cookie=0, cookie_mask=0, table_id=0,
|
||||
command=ofproto_v1_3.OFPFC_ADD,
|
||||
idle_timeout=0, hard_timeout=0, priority=0,
|
||||
idle_timeout=0, hard_timeout=0,
|
||||
priority=ofproto_v1_3.OFP_DEFAULT_PRIORITY,
|
||||
buffer_id=ofproto_v1_3.OFP_NO_BUFFER,
|
||||
out_port=0, out_group=0, flags=0,
|
||||
match=None,
|
||||
|
Loading…
Reference in New Issue
Block a user