v2 patch updates v1 to remove [PATCH 1/2] for Iwamoto-San comment because
v1 will break OpenStack ovs-agent feature.

v1:
These patches introduce a new option "--with-timestamp" which enables to
get timestamp when Ryu received the OpenFlow message.
This feature is suggested by Matthew on the following post.
  [Ryu-devel] Event receive timestamps

With this option, we can get the received time of each message.

$ git diff
diff --git a/ryu/app/simple_switch_13.py b/ryu/app/simple_switch_13.py
index 3e7c598..056510e 100644
--- a/ryu/app/simple_switch_13.py
+++ b/ryu/app/simple_switch_13.py
@@ -89,6 +89,7 @@ class SimpleSwitch13(app_manager.RyuApp):
         self.mac_to_port.setdefault(dpid, {})
 
         self.logger.info("packet in %s %s %s %s", dpid, src, dst, in_port)
+        self.logger.info('with timestamp: %s', getattr(ev, 'timestamp', None))
 
         # learn a mac address to avoid FLOOD next time.
         self.mac_to_port[dpid][src] = in_port


$ ryu-manager ryu/app/simple_switch_13.py --with-timestamp
...(snip)...
packet in 1 4e:94:3b:80:26:6f 33:33:00:00:00:16 1
with timestamp: 1500946087.7320635
...(snip)...

Please note this feature is only enabled with "--with-timestamp" option
in order to avoid changing the existing features.

IWASE Yusuke (1):
  manager: Option to enable timestamp

 ryu/cmd/manager.py          |  6 ++++++
 ryu/controller/ofp_event.py | 42 ++++++++++++++++++++++++++++--------------
 2 files changed, 34 insertions(+), 14 deletions(-)

-- 
2.7.4


------------------------------------------------------------------------------
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

Reply via email to