diff options
author | Srini Seetharaman <srini.seetharaman@gmail.com> | 2013-12-24 20:22:45 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2013-12-24 20:22:45 +0900 |
commit | d30e9da4da4e03161d77df0d049dfa9bebe0457b (patch) | |
tree | 7c9b7ad6c9eacc83ff72a474cca322ad8cd5f98c | |
parent | a05b1e990f71a22dc513ed7c8d089e5e9e2f6376 (diff) |
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>
-rw-r--r-- | ryu/lib/ofctl_v1_3.py | 2 | ||||
-rw-r--r-- | ryu/ofproto/ofproto_v1_3.py | 3 | ||||
-rw-r--r-- | ryu/ofproto/ofproto_v1_3_parser.py | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/ryu/lib/ofctl_v1_3.py b/ryu/lib/ofctl_v1_3.py index 37f67d08..7f67a710 100644 --- a/ryu/lib/ofctl_v1_3.py +++ b/ryu/lib/ofctl_v1_3.py @@ -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] diff --git a/ryu/ofproto/ofproto_v1_3.py b/ryu/ofproto/ofproto_v1_3.py index 95c03c70..e7a8593d 100644 --- a/ryu/ofproto/ofproto_v1_3.py +++ b/ryu/ofproto/ofproto_v1_3.py @@ -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. diff --git a/ryu/ofproto/ofproto_v1_3_parser.py b/ryu/ofproto/ofproto_v1_3_parser.py index 3d1c110e..78ad9fc0 100644 --- a/ryu/ofproto/ofproto_v1_3_parser.py +++ b/ryu/ofproto/ofproto_v1_3_parser.py @@ -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, |