On Tue, 14 Aug 2018 08:08:03 +0900, <quockhanh...@gmail.com> wrote: > > [1 <multipart/alternative (7bit)>] > [1.1 <text/plain; utf-8 (quoted-printable)>] > Hi all, > > I am developing a flow monitoring app using FlowStatsRequest/Reply. However, > when the number of flows on switch exceed 682, the switch start breaking the > data into MULTIPART_REPLY message and send back to the controller as a > sequence of FlowStatsReply with the same msg.xid and the OFPMPF_REPLY_MORE > flag set to 1 (except the last one). My question is how can I reassemble > these FlowStatsReply messages into a single one so I can process it as a > normal FlowStatsMessage. I already read this implementation in > ‘ofctl_rest.py’ > (https://github.com/osrg/ryu/blob/master/ryu/app/ofctl_rest.py#L749) but > could not understand it.
Replies are accumulated into self.waiters. When the last reply message arrives, the function sends a ryu.lib.Event, which resumes execution in ryu.lib.ofctl_v1_3.get_flow_stats (or any other OF version). For another implementation, see ryu.app.ofctl.service. > In addition, in case of some FlowStatsReply messages in a sequence are lost > or the last message in the MULTIPART_REPLY message never arrive to > controller, how can I detect it and handle it properly. If the last message is lost, ryu should raise a timeout exception. As the OpenFlow is over a reliable communication channel (TCP), I think we don't need to consider the case where packets in the middle are lost. -- IWAMOTO Toshihiro ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel