I also checked the patch working correctly.

However, it seems that another bug still remains in the case of openflow1.0.
I will correct it later as another patch.


   File "/home/ryu/OFC/src/router/rest_router.py", line 1575, in 
set_packetin_flow
     nw_proto=nw_proto, actions=actions)
   File "/home/ryu/OFC/src/router/rest_router.py", line 1648, in set_flow
     self.dp.send_msg(m)
   File "/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py", 
line 220, in send_msg
     msg.serialize()
   File "/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_parser.py", 
line 194, in serialize
     self._serialize_body()
   File 
"/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_v1_0_parser.py", 
line 2128, in _serialize_body
     self.match.serialize(self.buf, offset)
   File 
"/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_v1_0_parser.py", 
line 206, in serialize
     self.nw_src, self.nw_dst, self.tp_src, self.tp_dst)
   File "/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_parser.py", 
line 203, in msg_pack_into
     buf += struct.pack(fmt, *args)
error: cannot convert argument to integer


thanks.

On Tue, 29 Oct 2013 11:37:00 +0900
wataru yamamoto <[email protected]> wrote:
> I tried the following patches.
> It checked working correctly.
> Thank you.
>
>
> (2013/10/29 (火) 11:34), YAMAMOTO Takashi wrote:
>>> Hi, yamamoto.
>>>
>>> Is correction below correct with the new API?
>>
>> yes.
>>
>> YAMAMOTO Takashi
>>
>>> If satisfactory now, I will try test.
>>>
>>>
>>> --- a/ryu/app/rest_router.py
>>> +++ b/ryu/app/rest_router.py
>>> @@ -1764,13 +1764,9 @@ class OfCtl_v1_2(OfCtl):
>>>            if dec_ttl:
>>>                actions.append(ofp_parser.OFPActionDecNwTtl())
>>>            if src_mac:
>>> -            set_src = ofp_parser.OFPMatchField.make(ofp.OXM_OF_ETH_SRC,
>>> -                                                    src_mac)
>>> -            actions.append(ofp_parser.OFPActionSetField(set_src))
>>> +            actions.append(ofp_parser.OFPActionSetField(eth_src=src_mac))
>>>            if dst_mac:
>>> -            set_dst = ofp_parser.OFPMatchField.make(ofp.OXM_OF_ETH_DST,
>>> -                                                    dst_mac)
>>> -            actions.append(ofp_parser.OFPActionSetField(set_dst))
>>> +            actions.append(ofp_parser.OFPActionSetField(eth_dst=dst_mac))
>>>            if outport is not None:
>>>                actions.append(ofp_parser.OFPActionOutput(outport, 0))
>>>
>>>
>>>
>>>
>>> On Tue, 29 Oct 2013 11:12:20 +0900 (JST)
>>> YAMAMOTO Takashi <[email protected]> wrote:
>>>>> On Tue, 29 Oct 2013 11:04:30 +0900 (JST)
>>>>> [email protected] (YAMAMOTO Takashi) wrote:
>>>>>
>>>>>> - for OF1.2 and 1.3, the recommended way is to compose set-field actions
>>>>>>     is "OFPActionSetField(eth_src='11:22:33:44:55:66')".
>>>>>>
>>>>>> - OFPMatchField.make is an internal api and it should not have been
>>>>>>     used by apps in the first place.  it was kept only for compat 
>>>>>> reasons.
>>>>>>
>>>>>> - OFPMatchField.make takes binary addresses.
>>>>>>
>>>>>> - the documentation of OFPActionSetField seems to need an update.
>>>>>>     i'll take a look.
>>>>>
>>>>> make sense.
>>>>>
>>>>> Can you update rest_router to use the new API too?
>>>>
>>>> updating the code is trivial.  but testing might take longer
>>>> as i don't fully understand how to use this app.  i'll try.
>>>>
>>>> YAMAMOTO Takashi
>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>>
>>>>>> YAMAMOTO Takashi
>>>>>>
>>>>>>> CC'ed the author
>>>>>>>
>>>>>>> On Mon, 28 Oct 2013 15:14:49 +0900
>>>>>>> wataru yamamoto <[email protected]> wrote:
>>>>>>>
>>>>>>>> I tried to execute rest_router.py.
>>>>>>>>
>>>>>>>> However, the MAC Address of the packet which acts as a forward is 
>>>>>>>> inaccurate.
>>>>>>>> Specifically, the MAC Address is ASCII-Code instead of Binary-Code.
>>>>>>>>
>>>>>>>> Then, I corrected as follows.
>>>>>>>>
>>>>>>>> === start ===
>>>>>>>>
>>>>>>>> --- rest_router.py.org    2013-10-28 14:51:15.000000000 +0900
>>>>>>>> +++ rest_router.py    2013-10-28 14:57:37.284639377 +0900
>>>>>>>> @@ -1766,10 +1766,12 @@
>>>>>>>>            if src_mac:
>>>>>>>>                set_src = 
>>>>>>>> ofp_parser.OFPMatchField.make(ofp.OXM_OF_ETH_SRC,
>>>>>>>>                                                        src_mac)
>>>>>>>> +            set_src.value = mac_lib.haddr_to_bin(set_src.value) # add 
>>>>>>>> !!!
>>>>>>>>                actions.append(ofp_parser.OFPActionSetField(set_src))
>>>>>>>>            if dst_mac:
>>>>>>>>                set_dst = 
>>>>>>>> ofp_parser.OFPMatchField.make(ofp.OXM_OF_ETH_DST,
>>>>>>>>                                                        dst_mac)
>>>>>>>> +            set_dst.value = mac_lib.haddr_to_bin(set_dst.value) # add 
>>>>>>>> !!!
>>>>>>>>                actions.append(ofp_parser.OFPActionSetField(set_dst))
>>>>>>>>            if outport is not None:
>>>>>>>>                actions.append(ofp_parser.OFPActionOutput(outport, 0))
>>>>>>>>
>>>>>>>> === end ===
>>>>>>>>
>>>>>>>> It seems that it has executed correctly by the upper correction now.
>>>>>>>> The version of a switch is OpenflowV1.2.
>>>>>>>>
>>>>>>>> Is it satisfactory? Is there any point which should be corrected to 
>>>>>>>> others?
>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>> October Webinars: Code for Performance
>>>>>>>> Free Intel webinars can help you accelerate application performance.
>>>>>>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the 
>>>>>>>> most from
>>>>>>>> the latest Intel processors and coprocessors. See abstracts and 
>>>>>>>> register >
>>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>>>>>>>> _______________________________________________
>>>>>>>> Ryu-devel mailing list
>>>>>>>> [email protected]
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Android is increasing in popularity, but the open development platform 
>>>>>>> that
>>>>>>> developers love is also attractive to malware creators. Download this 
>>>>>>> white
>>>>>>> paper to learn more about secure code signing practices that can help 
>>>>>>> keep
>>>>>>> Android apps secure.
>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
>>>>>>> _______________________________________________
>>>>>>> Ryu-devel mailing list
>>>>>>> [email protected]
>>>>>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Android is increasing in popularity, but the open development platform 
>>>>> that
>>>>> developers love is also attractive to malware creators. Download this 
>>>>> white
>>>>> paper to learn more about secure code signing practices that can help keep
>>>>> Android apps secure.
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Ryu-devel mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Android is increasing in popularity, but the open development platform that
>>>> developers love is also attractive to malware creators. Download this white
>>>> paper to learn more about secure code signing practices that can help keep
>>>> Android apps secure.
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Ryu-devel mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Android is increasing in popularity, but the open development platform that
>>> developers love is also attractive to malware creators. Download this white
>>> paper to learn more about secure code signing practices that can help keep
>>> Android apps secure.
>>> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Ryu-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>
>
>




------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to