Hi Matt,
Sorry for the delay.
On 2017年07月20日 17:36, Matthew Hayes wrote:
> Hi Iwase,
>
>
> I've tested your suggested patch and it works (although I had to apply updates manually).
>
>
> The develop branch of nmeta has been updated to consume the event timestamp, if it exists (see
> https://github.com/mattjhayes/nmeta/blob/develop/nmeta/nmeta.py#L330)
>
>
> I've attached a brief analysis of the benefits of event receive timestamps for measuring
> controller/app performance.
>
>
> Please let me know if this enhancement makes it into the upstream, a command line switch to enable
> it would be just fine.
Thank you so much for your suggestion!
I've posted the patches for supporting this feature.
Could you reviewing my patches?
[Ryu-devel] [PATCH 0/2] Option to enable timestamp
Please note this feature is only enabled with "--with-timestamp" option in order to avoid changing
the existing features.
Thanks,
Iwase
>
>
> Thanks,
>
>
> Matt.
>
>
>
> ----------------------------------------------------------------------------------------------------
> *From:* Iwase Yusuke <***@gmail.com>
> *Sent:* Wednesday, 12 July 2017 12:38 a.m.
> *To:* ***@hotmail.com
> *Cc:* ryu-***@lists.sourceforge.net
> *Subject:* Re: [Ryu-devel] Event receive timestamps
> Hi Matt,
>
> Oops, sorry the snippet I wrote on the previous mail is not the official patch.
> And currently, I don't have a plan to send it into the upstream.
>
> If adding timestamps into upstream, I guess we need to take care about the
> performance.
> For example, with tons of Packet-In, we want to reduce the overhead of receiving
> and parsing OpenFlow messages in "_recv_loop".
> I think better to add the new options for taking timestamps.
> e.g.) taking timestamps only when "--with-timestamp" option is specified.
>
> Thanks,
> Iwase
>
>
> On 2017年07月11日 18:59, Matthew Hayes wrote:
>> Hi Iwase
>>
>>
>> Thank you for the really prompt reply. I will test your patch out with my project.
>>
>> Will this patch make it into the main Ryu distribution at some stage?
>>
>>
>> Thanks,
>>
>>
>> Matt.
>>
>>
>> ----------------------------------------------------------------------------------------------------
>> *From:* Iwase Yusuke <***@gmail.com>
>> *Sent:* Tuesday, 11 July 2017 12:31 a.m.
>> *To:* ***@hotmail.com
>> *Cc:* ryu-***@lists.sourceforge.net
>> *Subject:* Re: [Ryu-devel] Event receive timestamps
>> Hi Matt,
>>
>> Ryu handles the low level messages receiving at ryu/controller/controller.py, I guess we need to
>> get the timestamp here.
>> https://github.com/osrg/ryu/blob/master/ryu/controller/controller.py#L233
> <https://github.com/osrg/ryu/blob/master/ryu/controller/controller.py#L233>
>
> ryu/controller.py at master · osrg/ryu · GitHub
> <https://github.com/osrg/ryu/blob/master/ryu/controller/controller.py#L233>
> github.com
> ryu - Ryu component-based software defined networking framework
>
>
>>
>>
>> Then, how about the following?
>> I added the "timestamp" into "EventOFP***" events.
>>
>> $ git diff
>> diff --git a/ryu/controller/controller.py b/ryu/controller/controller.py
>> index 62bca5f..4c7259c 100644
>> --- a/ryu/controller/controller.py
>> +++ b/ryu/controller/controller.py
>> @@ -22,6 +22,7 @@ The main component of OpenFlow controller.
>>
>> """
>>
>> +import time
>> import contextlib
>> from ryu import cfg
>> import logging
>> @@ -266,11 +267,13 @@ class Datapath(ofproto_protocol.ProtocolDesc):
>> remaining_read_len = (msg_len - buf_len)
>> break
>>
>> + _received_time = time.time()
>> msg = ofproto_parser.msg(
>> self, version, msg_type, msg_len, xid, buf[:msg_len])
>> # LOG.debug('queue msg %s cls %s', msg, msg.__class__)
>> if msg:
>> ev = ofp_event.ofp_msg_to_ev(msg)
>> + ev.timestamp = _received_time
>> self.ofp_brick.send_event_to_observers(ev, self.state)
>>
>> dispatchers = lambda x: x.callers[ev.__class__].dispatchers
>>
>>
>> Thanks,
>> Iwase
>>
>>
>> On 2017年07月10日 19:34, Matthew Hayes wrote:
>>> Hi all,
>>>
>>> Can Ryu present timestamps to applications detailing when it received particular OpenFlow events
>>> (example: timestamp for when a Packet-In event was received by Ryu)?
>>>
>>> I have a reactive SDN project built on Ryu (see: https://nmeta.readthedocs.io ), and telemetry built
>>> into the app records processing time for OpenFlow events, such as Packet-In.
>>>
>>> I want to be able to access to the timestamp of when the OpenFlow event is received by the
>>> controller, to enable tracking of the delay in the application receiving the event, which will vary
>>> under load. This feature would also help with accuracy of algorithms that analyse packet arrival times.
>>>
>>> Please advise if this data is available in Ryu, and if not, whether it would be possible to develop it?
>>>
>>> Thanks,
>>>
>>> Matt.
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> 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-***@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> 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-***@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>
>
>
> ------------------------------------------------------------------------------
> 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-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>