calling send_delete_all_flows function in the core (for all
applications) is a bad idea since some applications don't want such
(e.g. failover).

send_delete_all_flows function doesn't work for OF1.2. nxm
code needs the specific code for each OF version. I really don't want
to do so.

So let's remove this function. At this point, it's impossible to write
applications that can work with any OF versions (incluing nxm). Let
applications do whatever they want.

We should remove send_flow_mod and send_flow_del for the same
reason. Also trying to enable NXM blindly is very bad for buggy
hardware switches. But they are not called in the core code so I leave
them alone for now.

Signed-off-by: FUJITA Tomonori <[email protected]>
---
 ryu/app/simple_isolation.py  |    1 -
 ryu/controller/controller.py |    7 -------
 ryu/controller/handler.py    |    5 -----
 3 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/ryu/app/simple_isolation.py b/ryu/app/simple_isolation.py
index 3535e73..cf6630e 100644
--- a/ryu/app/simple_isolation.py
+++ b/ryu/app/simple_isolation.py
@@ -272,7 +272,6 @@ class SimpleIsolation(app_manager.RyuApp):
         msg = ev.msg
         datapath = msg.datapath
 
-        datapath.send_delete_all_flows()
         datapath.send_barrier()
         self.nw.port_added(datapath, msg.desc.port_no)
 
diff --git a/ryu/controller/controller.py b/ryu/controller/controller.py
index 5158323..95795b1 100644
--- a/ryu/controller/controller.py
+++ b/ryu/controller/controller.py
@@ -235,13 +235,6 @@ class Datapath(object):
                            idle_timeout=0, hard_timeout=0, priority=0,
                            out_port=out_port)
 
-    def send_delete_all_flows(self):
-        rule = nx_match.ClsRule()
-        self.send_flow_mod(
-            rule=rule, cookie=0, command=self.ofproto.OFPFC_DELETE,
-            idle_timeout=0, hard_timeout=0, priority=0, buffer_id=0,
-            out_port=self.ofproto.OFPP_NONE, flags=0, actions=None)
-
     def send_barrier(self):
         barrier_request = self.ofproto_parser.OFPBarrierRequest(self)
         self.send_msg(barrier_request)
diff --git a/ryu/controller/handler.py b/ryu/controller/handler.py
index 9fc4e5a..b1150a5 100644
--- a/ryu/controller/handler.py
+++ b/ryu/controller/handler.py
@@ -191,11 +191,6 @@ class ConfigHandler(object):
             )
         datapath.send_msg(set_config)
 
-        #
-        # drop all flows in order to put datapath into unknown state
-        #
-        datapath.send_delete_all_flows()
-
         datapath.send_barrier()
 
         # We had better to move on to the main state after getting the
-- 
1.7.4.4


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to