> On Thu, 29 Aug 2013 09:27:11 +0900 (JST)
> [email protected] (YAMAMOTO Takashi) wrote:
> 
>>> On Tue, 27 Aug 2013 20:24:15 +0100
>>> Alan Barr <[email protected]> wrote:
>>> 
>>>> Hello,
>>>> I encountered unexpected behaviour today with Ryu 2.0 and also after a
>>>> pull. I was sending a Flow Mod as a test to a switch (the flow mod
>>>> content itself is likely not valid).
>>>> 
>>>> Basically, I tried the following for convenience:
>>>> 
>>>>             eth_src_field = datapath.ofproto_parser.OFPMatchField.make(
>>>> datapath.ofproto.OXM_OF_ETH_SRC,
>>>> haddr_to_bin("AA:AA:AA:AA:AA:AA"))
>>>>             actions =
>>>>             [datapath.ofproto_parser.OFPActionSetField(eth_src_field)]
>>>> 
>>>>             inst =
>>>>             [ofproto_par.OFPInstructionActions(ofproto.OFPIT_WRITE_ACTIONS,
>>>>                                                       actions),
>>>> ofproto_par.OFPInstructionActions(ofproto.OFPIT_APPLY_ACTIONS,
>>>>                                                       actions)]
>>>> 
>>>> And found that by reusing OFPActionSetField, the second instruction,
>>>> apply actions, would be corrupt in the packet. So it appears the
>>>> OFPActionSetField class is being modified which I was not expecting.
>>>> I have included some test code which should demonstrate this as well
>>>> as a pcap file showing when the same actions class is used, the
>>>> transmitted data varies by 8 bytes compared to when independent
>>>> OFPActionSetField classes are used.
>>>> 
>>>> I wasn't too sure if what I was doing was considered correct behaviour
>>>> or not - but presumably if it was not, a raised error would be
>>>> preferred?
>>> 
>>> I don't have any idea why actions can not be reusable. It should be
>>> reusable. The following code works.
>> 
>> iirc some OFPxxx classes have destructive serialize().
> 
> Yeah, I guess that there are some. But OFPAction is not, IIRC.

until very recently (9844c86901b3eb496e0bfeb8d70cd89ff4bd7672)
OFPMatchField wasn't able to be serialized multiple times.

> 
> I think that we prefer to avoid destructive serialize().

yea.

YAMAMOTO Takashi

> 
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to