Regards,
Matt.
----------------------------------------------------------------------------------------------------
*From:* Iwase Yusuke <iwase.yusu...@gmail.com>
*Sent:* Friday, 28 July 2017 12:20 a.m.
*To:* matthew_john_ha...@hotmail.com
*Cc:* ryu-devel@lists.sourceforge.net
*Subject:* Re: [Ryu-devel] Event receive timestamps
Hi Matt,
I recommend you to use Git in order to apply patches.
For installing Ryu from Git source, how about trying the following procedures?
https://github.com/osrg/ryu#quick-start
For applying patches manually, you can use "git am" command.
If you are using Thunderbird as your mailer, save message of path as a file
into your local
directory, then run "git am" at Ryu's Git directory.
e.g.)
# Save patch as a file and apply it
$ cd ryu
$ ls
...(snip)...
[PATCH v2] manager: Option to enable timestamp.eml
...(snip)...
$ git am \[PATCH\ v2\]\ manager\:\ Option\ to\ enable\ timestamp.eml
Applying: manager: Option to enable timestamp
# Confirm in on Git
$ git log
commit fe62d6524bfdb107c4b7c1248c51cc2a76e2d758
Author: IWASE Yusuke <iwase.yusu...@gmail.com>
Date: Tue Jul 25 13:23:10 2017 +0900
manager: Option to enable timestamp
This patch introduces a new option "--with-timestamp" which enable to
get timestamp when Ryu received the OpenFlow message.
Suggested-by: Matthew Hayes <matthew_john_ha...@hotmail.com>
Signed-off-by: IWASE Yusuke <iwase.yusu...@gmail.com>
...(snip)...
# Then, reinstall Ryu
$ pip uninstall Ryu
$ pip install -r tools/pip-requires
$ python setup.py install
# If you can install Ryu successfully, "--with-timestamp" will be inserted
$ ryu-manager --help
...(snip)...
--with-timestamp enable timestamps when receiving OpenFlow messages
...(snip)...
Thanks,
Iwase
On 2017年07月27日 18:20, Matthew Hayes wrote:
Hi Iwase,
Can you please advise the method to apply the patch?
I have installed Ryu from pip, as there are a lot of dependencies if cloned
from GitHub. Do I need a
git install of Ryu to test the patch, and if so where can I find instructions
to install the
dependencies?
Thanks,
Matt.
----------------------------------------------------------------------------------------------------
*From:* Iwase Yusuke <iwase.yusu...@gmail.com>
*Sent:* Tuesday, 25 July 2017 1:38 a.m.
*To:* matthew_john_ha...@hotmail.com
*Cc:* ryu-devel@lists.sourceforge.net
*Subject:* Re: [Ryu-devel] Event receive timestamps
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)
<https://github.com/mattjhayes/nmeta/blob/develop/nmeta/nmeta.py#L330>
mattjhayes/nmeta <https://github.com/mattjhayes/nmeta/blob/develop/nmeta/nmeta.py#L330>
github.com
nmeta - Extensible Traffic Classification on SDN
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 <iwase.yusu...@gmail.com>
*Sent:* Wednesday, 12 July 2017 12:38 a.m.
*To:* matthew_john_ha...@hotmail.com
*Cc:* ryu-devel@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 <iwase.yusu...@gmail.com>
*Sent:* Tuesday, 11 July 2017 12:31 a.m.
*To:* matthew_john_ha...@hotmail.com
*Cc:* ryu-devel@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
<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
ryu/controller.py at master · osrg/ryu · GitHub
<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
github.com
ryu - Ryu component-based software defined networking framework
<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
<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
ryu/controller.py at master · osrg/ryu · GitHub
<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
github.com
ryu - Ryu component-based software defined networking framework
ryu/controller.py at master · osrg/ryu · GitHub
<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
<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
ryu/controller.py at master · osrg/ryu · GitHub
<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
github.com
ryu - Ryu component-based software defined networking framework
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
nmeta — nmeta 0.4.1 documentation <https://nmeta.readthedocs.io/>
nmeta.readthedocs.io
nmeta¶ The nmeta project is a research platform for traffic classification on Software Defined
Networking (SDN). Read More. Contents:
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-devel@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-devel@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-devel@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-devel@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-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel