[nox-dev] Spanning tree implementation (not 802.1D STP)

2008-08-09 Thread Glen Gibb

Hi all,

I've implemented basic spanning tree support for NOX as a Python app. 
I've attached my implementation as a diff. This requires the 
send_port_mod patch that I sent to the list earlier to use. I suspect 
the patch to configure.ac may not apply cleanly as my patch has 
reference to two apps that we've added locally.


A couple of notes about my implementation:

   * This is *not* an implementation of IEEE 802.1D Spanning Tree
 Protocol and is *not* compatible.
   * The app uses the information gathered by the discovery module to
 identify links and construct the spanning tree.
   * I have made no attempt to optimize the algorithm that builds the
 spanning tree. It works well for a small number of switches -- I
 haven't tested in large topologies.
   * When a switch connects the app disables flooding to all ports
 initially.
   * Ports are only eligible for flooding after a waiting period. This
 waiting period is currently a fixed period but should probably
 adjust dynamically depending upon the number of ports in the
 system. (Look at discovery to understand why it should adjust
 dynamically with the number of ports.)
   * The switch with the lowest DPID will always be the root in any tree.
   * This implementation doesn't properly handle the case where one
 port is connected to multiple switches.
   * The app listens for packet in events to enable it to drop packets
 received on non-flood ports. It must be the first app that
 receives packet ins to allow it to return STOP before any other
 event can process the packet.

I should point out that so far it has received relatively little 
testing. I've only run it in a topology with 3 switches connected in a 
triangle.


Again, let me know if you have comments/questions.

Glen
diff --git a/configure.ac b/configure.ac
index 4c6813b..825cc40 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,6 +96,8 @@ ACI_MODULE([examples],[Set of example apps],
[],[],[yes])
 ACI_MODULE([mobilevms],[MobileVMs app for VM mobility],
[],[],[yes])
+ACI_MODULE([spanning_tree],[Basic spanning tree support],
+   [],[],[yes])
 ACI_MODULE([throughput],[Monitor link throughputs],
[],[],[yes])
 ACI_MODULE([hub],[dumb hub],
@@ -117,6 +119,7 @@ ACI_MODULE([apps],[main source libarary],
sepl storage tests topology discovery coreui
simple_c_app simple_c_py_app noop hub switch
examples exit directory
+  spanning_tree
bindings_storage switchstats mobilevms throughput],
[yes])
 ACI_MODULES_VERIFY
@@ -226,6 +229,7 @@ src/nox/apps/hub/Makefile
 src/nox/apps/examples/Makefile
 src/nox/apps/exit/Makefile
 src/nox/apps/mobilevms/Makefile
+src/nox/apps/spanning_tree/Makefile
 src/nox/apps/throughput/Makefile
 ])
 AC_OUTPUT
diff --git a/src/etc/nox.xml b/src/etc/nox.xml
index 55e954e..158eb54 100644
--- a/src/etc/nox.xml
+++ b/src/etc/nox.xml
@@ -10,6 +10,7 @@
 
 
 
+  spanning_tree
   authenticator
   dwh
   noop
diff --git a/src/nox/apps/spanning_tree/Makefile.am 
b/src/nox/apps/spanning_tree/Makefile.am
new file mode 100644
index 000..d2271c6
--- /dev/null
+++ b/src/nox/apps/spanning_tree/Makefile.am
@@ -0,0 +1,17 @@
+include ../../../Make.vars 
+
+EXTRA_DIST =\
+   meta.xml\
+__init__.py \
+   spanning_tree.py
+
+NOX_RUNTIMEFILES = meta.xml\
+__init__.py \
+   spanning_tree.py
+
+all-local: 
+   @dlist="$(NOX_RUNTIMEFILES)";for f in $$dlist; do \
+ if test -f $(srcdir)/$$f && test ! -f $$f; then \
+   ln -sf $(srcdir)/$$f $(builddir)/$$f;\
+ fi;\
+   done; 
diff --git a/src/nox/apps/spanning_tree/__init__.py 
b/src/nox/apps/spanning_tree/__init__.py
new file mode 100644
index 000..e69de29
diff --git a/src/nox/apps/spanning_tree/meta.xml 
b/src/nox/apps/spanning_tree/meta.xml
new file mode 100644
index 000..2c6fd15
--- /dev/null
+++ b/src/nox/apps/spanning_tree/meta.xml
@@ -0,0 +1,13 @@
+
+http://www.noxrepo.org/components.xsd";>
+  
+spanning_tree
+
+  python
+
+
+  discovery
+
+nox.apps.spanning_tree.spanning_tree
+  
+
diff --git a/src/nox/apps/spanning_tree/spanning_tree.py 
b/src/nox/apps/spanning_tree/spanning_tree.py
new file mode 100644
index 000..8147292
--- /dev/null
+++ b/src/nox/apps/spanning_tree/spanning_tree.py
@@ -0,0 +1,290 @@
+# --
+# Spanning tree -- software based
+# Authors: Glen Gibb <[EMAIL PROTECTED]>
+# Date: 08/08/08
+#
+# Changes:
+#
+# Notes: This won't work correctly if there are more than 2 switches on
+#any one "link". ie. if we were on a broadcast network or there was an
+#extra switch in the middle
+# --
+
+import array
+import struct
+import time
+from nox.apps.pyrt.py

Re: [nox-dev] Core dump when registering non-existent callback in post_callback

2008-08-09 Thread Glen Gibb
Yup, I've got a basic implementation together. It's not STP -- it just 
uses information from discovery. I'll send our more info about it soon.

Glen


Martin Casado wrote:
> Btw, are you doing a spanning tree implementation?
>> I accidentally tried to register a non-existent callback with 
>> post_callback and Nox dumped core:
>>
>> terminate called after throwing an instance of 'std::runtime_error'
>>   what():  cannot install the Python component: Traceback (most 
>> recent call last):
>>   File "./nox/apps/spanning_tree/spanning_tree.py", line 74, in install
>> self.post_callback(1, self.process_links)
>> AttributeError: Spanning_Tree instance has no attribute 'process_links'
>>
>> Caught signal 6.
>>   0xb7d7da0d   32 (vigil::fault_handler(int)+0x3d)
>>   0xb7ee9400 2901005704 (__kernel_sigreturn+0x0)
>>   0xb7af0fb8  296 (abort+0x188)
>>   0xb7d0e8f8   64 (__gnu_cxx::__verbose_terminate_handler()+0x158)
>>   0xb7d0c7d5
>>   0xb7d0c812
>>   0xb7d0c835
>>   0xb7d0c168   96 (__cxa_call_unexpected+0x48)
>>   0x08093149  112 (vigil::Kernel::change(vigil::Component_context*, 
>> vigil::Component_state)+0x339)
>>   0x080932fb   96 
>> (vigil::Kernel::install(vigil::Component_context*)+0x13b)
>>   0x0807ef30   64 (vigil::Deployer::deploy(vigil::Kernel*, 
>> std::string const&)+0xa0)
>>   0x0809493a  496 (vigil::Kernel::install(std::string const&)+0x12a)
>>   0x080743df
>>   0x0807dad1   80 
>> (boost::detail::function::void_function_obj_invoker0>  
>> void (*)(vigil::Kernel*, std::__debug::list> std::__debug::list > >, 
>> std::allocator> std::allocator > > > > const&, 
>> std::__debug::vector >, 
>> bool), boost::_bi::list4, 
>> boost::_bi::value> std::__debug::list > >, 
>> std::allocator> std::allocator > > > > >, 
>> boost::_bi::value> std::allocator > >, boost::_bi::value > >, 
>> void>::invoke(boost::detail::function::function_buffer&)+0x41)
>>   0xb7da36cc   80 (boost::function0 
>>  >::operator()() const+0x2c)
>>   0xb7d9cf03
>>   0xb76e04b0
>> Aborted (core dumped)
>>
>> Glen
>>
>> ___
>> nox-dev mailing list
>> nox-dev@noxrepo.org
>> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>>   
>
>


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


[nox-dev] Debian unstable dependency name change

2008-08-09 Thread David Erickson
Just installed unstable today and nox on it, wanted to report that the 
package libxerces27-dev appears to have changed names to libxerces-c2-dev.

Thanks,
David

___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Core dump when registering non-existent callback in post_callback

2008-08-09 Thread Martin Casado
Btw, are you doing a spanning tree implementation?
> I accidentally tried to register a non-existent callback with 
> post_callback and Nox dumped core:
>
> terminate called after throwing an instance of 'std::runtime_error'
>   what():  cannot install the Python component: Traceback (most recent 
> call last):
>   File "./nox/apps/spanning_tree/spanning_tree.py", line 74, in install
> self.post_callback(1, self.process_links)
> AttributeError: Spanning_Tree instance has no attribute 'process_links'
>
> Caught signal 6.
>   0xb7d7da0d   32 (vigil::fault_handler(int)+0x3d)
>   0xb7ee9400 2901005704 (__kernel_sigreturn+0x0)
>   0xb7af0fb8  296 (abort+0x188)
>   0xb7d0e8f8   64 (__gnu_cxx::__verbose_terminate_handler()+0x158)
>   0xb7d0c7d5
>   0xb7d0c812
>   0xb7d0c835
>   0xb7d0c168   96 (__cxa_call_unexpected+0x48)
>   0x08093149  112 (vigil::Kernel::change(vigil::Component_context*, 
> vigil::Component_state)+0x339)
>   0x080932fb   96 (vigil::Kernel::install(vigil::Component_context*)+0x13b)
>   0x0807ef30   64 (vigil::Deployer::deploy(vigil::Kernel*, std::string 
> const&)+0xa0)
>   0x0809493a  496 (vigil::Kernel::install(std::string const&)+0x12a)
>   0x080743df
>   0x0807dad1   80 
> (boost::detail::function::void_function_obj_invoker0 void (*)(vigil::Kernel*, std::__debug::list std::__debug::list > >, 
> std::allocator std::allocator > > > > const&, 
> std::__debug::vector >, bool), 
> boost::_bi::list4, 
> boost::_bi::value std::__debug::list > >, 
> std::allocator std::allocator > > > > >, 
> boost::_bi::value std::allocator > >, boost::_bi::value > >, 
> void>::invoke(boost::detail::function::function_buffer&)+0x41)
>   0xb7da36cc   80 (boost::function0 
>  >::operator()() const+0x2c)
>   0xb7d9cf03
>   0xb76e04b0
> Aborted (core dumped)
>
> Glen
>
> ___
> nox-dev mailing list
> nox-dev@noxrepo.org
> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>   


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Core dump when registering non-existent callback in post_callback

2008-08-09 Thread Martin Casado
Great, thanks Glen.  I'll submit a bug.
> I accidentally tried to register a non-existent callback with 
> post_callback and Nox dumped core:
>
> terminate called after throwing an instance of 'std::runtime_error'
>   what():  cannot install the Python component: Traceback (most recent 
> call last):
>   File "./nox/apps/spanning_tree/spanning_tree.py", line 74, in install
> self.post_callback(1, self.process_links)
> AttributeError: Spanning_Tree instance has no attribute 'process_links'
>
> Caught signal 6.
>   0xb7d7da0d   32 (vigil::fault_handler(int)+0x3d)
>   0xb7ee9400 2901005704 (__kernel_sigreturn+0x0)
>   0xb7af0fb8  296 (abort+0x188)
>   0xb7d0e8f8   64 (__gnu_cxx::__verbose_terminate_handler()+0x158)
>   0xb7d0c7d5
>   0xb7d0c812
>   0xb7d0c835
>   0xb7d0c168   96 (__cxa_call_unexpected+0x48)
>   0x08093149  112 (vigil::Kernel::change(vigil::Component_context*, 
> vigil::Component_state)+0x339)
>   0x080932fb   96 (vigil::Kernel::install(vigil::Component_context*)+0x13b)
>   0x0807ef30   64 (vigil::Deployer::deploy(vigil::Kernel*, std::string 
> const&)+0xa0)
>   0x0809493a  496 (vigil::Kernel::install(std::string const&)+0x12a)
>   0x080743df
>   0x0807dad1   80 
> (boost::detail::function::void_function_obj_invoker0 void (*)(vigil::Kernel*, std::__debug::list std::__debug::list > >, 
> std::allocator std::allocator > > > > const&, 
> std::__debug::vector >, bool), 
> boost::_bi::list4, 
> boost::_bi::value std::__debug::list > >, 
> std::allocator std::allocator > > > > >, 
> boost::_bi::value std::allocator > >, boost::_bi::value > >, 
> void>::invoke(boost::detail::function::function_buffer&)+0x41)
>   0xb7da36cc   80 (boost::function0 
>  >::operator()() const+0x2c)
>   0xb7d9cf03
>   0xb76e04b0
> Aborted (core dumped)
>
> Glen
>
> ___
> nox-dev mailing list
> nox-dev@noxrepo.org
> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>   


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


[nox-dev] Core dump when registering non-existent callback in post_callback

2008-08-09 Thread Glen Gibb
I accidentally tried to register a non-existent callback with 
post_callback and Nox dumped core:

terminate called after throwing an instance of 'std::runtime_error'
  what():  cannot install the Python component: Traceback (most recent 
call last):
  File "./nox/apps/spanning_tree/spanning_tree.py", line 74, in install
self.post_callback(1, self.process_links)
AttributeError: Spanning_Tree instance has no attribute 'process_links'

Caught signal 6.
  0xb7d7da0d   32 (vigil::fault_handler(int)+0x3d)
  0xb7ee9400 2901005704 (__kernel_sigreturn+0x0)
  0xb7af0fb8  296 (abort+0x188)
  0xb7d0e8f8   64 (__gnu_cxx::__verbose_terminate_handler()+0x158)
  0xb7d0c7d5
  0xb7d0c812
  0xb7d0c835
  0xb7d0c168   96 (__cxa_call_unexpected+0x48)
  0x08093149  112 (vigil::Kernel::change(vigil::Component_context*, 
vigil::Component_state)+0x339)
  0x080932fb   96 (vigil::Kernel::install(vigil::Component_context*)+0x13b)
  0x0807ef30   64 (vigil::Deployer::deploy(vigil::Kernel*, std::string 
const&)+0xa0)
  0x0809493a  496 (vigil::Kernel::install(std::string const&)+0x12a)
  0x080743df
  0x0807dad1   80 
(boost::detail::function::void_function_obj_invoker0 > >, 
std::allocator > > > > const&, 
std::__debug::vector >, bool), 
boost::_bi::list4, 
boost::_bi::value > >, 
std::allocator > > > > >, 
boost::_bi::value > >, boost::_bi::value > >, 
void>::invoke(boost::detail::function::function_buffer&)+0x41)
  0xb7da36cc   80 (boost::function0 
 >::operator()() const+0x2c)
  0xb7d9cf03
  0xb76e04b0
Aborted (core dumped)

Glen

___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Port mod python example?

2008-08-09 Thread Glen Gibb
Yeah, things are working properly. I was treating the bit as a FLOOD, 
not a NO_FLOOD.




Justin Pettit wrote:
> Here's the definition for the flags from "openflow.h":
>
> /* Flags to indicate behavior of the physical port */
> enum ofp_port_flags {
> OFPPFL_NO_FLOOD  = 1 << 0, /* Do not include this port when 
> flooding */
> };
>
> So by default, the flags should be off.  If you do not want to include 
> them when flooding, then they should be enabled.
>
> I think things are working properly, but maybe I'm misunderstanding 
> something here...
>
> --Justin
>
>
> On Aug 9, 2008, at 1:22 PM, Glen Gibb wrote:
>
>> Hi Justin,
>>
>> It seems that the OpenFlow reference implementation is incorrectly 
>> reporting the flags field for ofp_phy_port in the features reply (or 
>> I'm mis-interpreting what this should be).
>>
>> Looking at a packet capture for the features reply (see attached 
>> packet) it always reports 0 in the flags -- I would expect this to be 
>> 1 since by default all ports participate in flooding.
>>
>> Glen
>>
>>
>>
>> Glen Gibb wrote:
>>> I'm looking to set the flood flag so that when I have loops in my 
>>> topology I don't end up looping packets forever.
>>>
>>> I've actually written most of the code -- I'm just having trouble 
>>> right now copying the name into the name field from Python. 
>>> Actually, do I need to send the name back to the OF switch or will 
>>> it work without setting a name?
>>>
>>> Here's the one snippet of code I haven't yet gotten working. In 
>>> openflow.i I have:
>>>
>>> %extend ofp_phy_port {
>>>   void set_hw_addr(uint8_t *addr) {
>>>   memcpy($self->hw_addr, addr, ethernetaddr::LEN);
>>>   }
>>>   void set_name(uint8_t *name) {
>>>   memcpy($self->name, name, OFP_MAX_PORT_NAME_LEN);
>>>   }
>>> };
>>>
>>> (I'm basically trying to copy what you had in that file for ofp_match.)
>>>
>>> The set_hw_addr works perfectly, the set_name fails because I 
>>> haven't yet managed to convert my string to a uint8_t array. Is 
>>> there an easy way to pass in a python string to set_name and copy 
>>> from the Python string to the name field?
>>>
>>> Glen
>>>
>>>
>>>
>>>
>>> Justin Pettit wrote:
 Glen, what are you looking to modify?  Currently, you are only able 
 to set the port flags over OpenFlow and the only flag is one to 
 indicate whether the port should be included in "flood" actions.  
 We're looking to include actions such as disabling ports, but 
 that's not in there yet.

 --Justin


 On Aug 9, 2008, at 12:36 PM, Martin Casado wrote:

> I'm not sure port mod is supported in the OF reference
> implementation.  Justin/Ben?
>
> On Aug 8, 2008, at 4:42 PM, Glen Gibb wrote:
>
>> Hi all,
>>
>> Is there an example available that sends port mod messages to a
>> switch?
>> I'm currently looking for examples but can't find one.
>>
>> Thanks,
>> Glen
>>
>> ___
>> nox-dev mailing list
>> nox-dev@noxrepo.org
>> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>
>
> ___
> nox-dev mailing list
> nox-dev@noxrepo.org
> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


>>>
>>>
>>
>> 
>
>


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Port mod python example?

2008-08-09 Thread Justin Pettit
Here's the definition for the flags from "openflow.h":

/* Flags to indicate behavior of the physical port */
enum ofp_port_flags {
OFPPFL_NO_FLOOD  = 1 << 0, /* Do not include this port when  
flooding */
};

So by default, the flags should be off.  If you do not want to include  
them when flooding, then they should be enabled.

I think things are working properly, but maybe I'm misunderstanding  
something here...

--Justin


On Aug 9, 2008, at 1:22 PM, Glen Gibb wrote:

> Hi Justin,
>
> It seems that the OpenFlow reference implementation is incorrectly  
> reporting the flags field for ofp_phy_port in the features reply (or  
> I'm mis-interpreting what this should be).
>
> Looking at a packet capture for the features reply (see attached  
> packet) it always reports 0 in the flags -- I would expect this to  
> be 1 since by default all ports participate in flooding.
>
> Glen
>
>
>
> Glen Gibb wrote:
>> I'm looking to set the flood flag so that when I have loops in my  
>> topology I don't end up looping packets forever.
>>
>> I've actually written most of the code -- I'm just having trouble  
>> right now copying the name into the name field from Python.  
>> Actually, do I need to send the name back to the OF switch or will  
>> it work without setting a name?
>>
>> Here's the one snippet of code I haven't yet gotten working. In  
>> openflow.i I have:
>>
>> %extend ofp_phy_port {
>>   void set_hw_addr(uint8_t *addr) {
>>   memcpy($self->hw_addr, addr, ethernetaddr::LEN);
>>   }
>>   void set_name(uint8_t *name) {
>>   memcpy($self->name, name, OFP_MAX_PORT_NAME_LEN);
>>   }
>> };
>>
>> (I'm basically trying to copy what you had in that file for  
>> ofp_match.)
>>
>> The set_hw_addr works perfectly, the set_name fails because I  
>> haven't yet managed to convert my string to a uint8_t array. Is  
>> there an easy way to pass in a python string to set_name and copy  
>> from the Python string to the name field?
>>
>> Glen
>>
>>
>>
>>
>> Justin Pettit wrote:
>>> Glen, what are you looking to modify?  Currently, you are only  
>>> able to set the port flags over OpenFlow and the only flag is one  
>>> to indicate whether the port should be included in "flood"  
>>> actions.  We're looking to include actions such as disabling  
>>> ports, but that's not in there yet.
>>>
>>> --Justin
>>>
>>>
>>> On Aug 9, 2008, at 12:36 PM, Martin Casado wrote:
>>>
 I'm not sure port mod is supported in the OF reference
 implementation.  Justin/Ben?

 On Aug 8, 2008, at 4:42 PM, Glen Gibb wrote:

> Hi all,
>
> Is there an example available that sends port mod messages to a
> switch?
> I'm currently looking for examples but can't find one.
>
> Thanks,
> Glen
>
> ___
> nox-dev mailing list
> nox-dev@noxrepo.org
> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


 ___
 nox-dev mailing list
 nox-dev@noxrepo.org
 http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>>>
>>>
>>
>>
>
> 


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Flow setup latency

2008-08-09 Thread Natasha Gude
When making this change, you might see a routing bug we recently  
fixed, but since you're running an old version you should fix it  
yourself:

In nox/apps/routing/routing.hh and .cc, change the prototype of  
'cleanup'

from:
void cleanup(const RoutePtr& route, bool delete_route)

to:
void cleanup(RoutePtr route, bool delete_route)

(removing the reference)

That one slight change is all you need.

On Aug 9, 2008, at 1:12 PM, David Erickson wrote:

> Thanks, we'll give it a try and see if it helps.
>
> -David
>
> Martin Casado wrote:
>> I should have mentioned this yesterday, but if you compile NOX with
>> --enable-ndebug, you'll get at least a factor of 3 improvement in  
>> speed
>> (in C++).  However, I don't know how much this will improve your  
>> code if
>> Python is providing all of the overhead.
>>
>>
>> On Aug 8, 2008, at 11:32 AM, David Erickson wrote:
>>
>>> Ugh :(
>>>
>>> -David
>>>
>>> Martin Casado wrote:
 Rewrite in C++ ;-)  Otherwise, this is going to depend largely on  
 the
 application.  Even when we run pyswitch alone, the latencies are
 20-30ms.


 On Aug 8, 2008, at 11:20 AM, David Erickson wrote:

> Ya our mobilevms app is in Python. Is there any way to speed it  
> up?
>
> -David
>
> Martin Casado wrote:
>> When running from C++ using switch or routing, we generally see
>> under 5ms latency, even with policy.  Do any of your packets go  
>> to
>> Python?
>>> This is with reference kernel switches.
>>>
>>> -David
>>>
>>> Brandon Heller wrote:
>>>
 Which type(s) of OF switches are on the path?

 -Brandon

 On Fri, Aug 8, 2008 at 10:53 AM, David Erickson
 <[EMAIL PROTECTED] > wrote:

 We're currently seeing on the order of ~80ms for the time for a
 packet
 to hit an OF switch, go to NOX, a flow to get pushed out, and
 the packet
 to be sent out. Has anyone done any work on decreasing this
 time, or
 have any suggestions on how to get this as low as possible?
 Unfortunately right now for us when we migrate our game server
 everyone
 gets a brief 'connection interupted' message due to this
 latency, which
 is also compounded based on the number of OF switches the
 packets have
 to go through.

 Thanks,
 David

 ___
 nox-dev mailing list
 nox-dev@noxrepo.org 
 http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org



>>>
>>>
>>> ___
>>> nox-dev mailing list
>>> nox-dev@noxrepo.org
>>> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>>>
>


>>>
>>
>>
>
>
> ___
> nox-dev mailing list
> nox-dev@noxrepo.org
> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Port mod from python -- patch

2008-08-09 Thread Glen Gibb
I just realized that I was doing a double htonl on attrs['speed'] in my 
set_port method in utils.py. There's some funning looking logic there as 
my htonl was generating a -ve value when the speed was 1000 and SWIG was 
generating an error as it wasn't of type unit32 :-(


Corrected patch attached.

Glen

Glen Gibb wrote:

Hi all,

Attached are the diffs to enable me to send port mods from python. 
Feel free to integrate the diff and let me know if you have any 
comments/questions.


Oh, and to actually send a port mod I just do this from my app:
   self.ctxt.send_port_mod(dp, set_port(port))
where port is a dictionary identical to that returned in the stats in 
a dp_join event.


Glen


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


diff --git a/src/nox/apps/pyrt/context.i b/src/nox/apps/pyrt/context.i
index b02a3b8..54d0f4e 100644
--- a/src/nox/apps/pyrt/context.i
+++ b/src/nox/apps/pyrt/context.i
@@ -80,6 +80,9 @@ public:
 void send_port_stats_request(uint64_t datapath_id);
 void send_aggregate_stats_request(uint64_t datapath_ids, const
 struct ofp_match& match, uint8_t table_id);
+
+void send_port_mod(uint64_t datapath_id, 
+   const ofp_phy_port& port);
 private:
 PyContext();
 
diff --git a/src/nox/apps/pyrt/pycontext.cc b/src/nox/apps/pyrt/pycontext.cc
index 87d8111..7c5dc2f 100644
--- a/src/nox/apps/pyrt/pycontext.cc
+++ b/src/nox/apps/pyrt/pycontext.cc
@@ -234,6 +234,30 @@ PyContext::send_stats_request(uint64_t datapath_id, ofp_stats_types type, const
 }
 }
 
+void 
+PyContext::send_port_mod(uint64_t datapath_id, 
+ const ofp_phy_port& port) {
+ofp_port_mod* opm = NULL;
+size_t size = sizeof *opm;
+boost::shared_array raw_of(new uint8_t[size]);
+opm = (ofp_port_mod*) raw_of.get();
+
+opm->header.version = OFP_VERSION;
+opm->header.type = OFPT_PORT_MOD;
+opm->header.length = htons(size);
+opm->header.xid = htonl(0);
+
+::memcpy(&opm->desc, &port, sizeof port);
+
+int error = c->send_openflow_command(datapathid::from_host(datapath_id), 
+ &opm->header, false); 
+if (error == EAGAIN) {
+vlog().log(vlog().get_module_val("pyrt"), Vlog::LEVEL_ERR, 
+   "should queue port_mod");
+}
+}
+
+
 bool
 PyContext::unregister_handler(uint32_t rule_id) {
 return c->unregister_handler(rule_id);
diff --git a/src/nox/apps/pyrt/pycontext.hh b/src/nox/apps/pyrt/pycontext.hh
index a18158d..186b16e 100644
--- a/src/nox/apps/pyrt/pycontext.hh
+++ b/src/nox/apps/pyrt/pycontext.hh
@@ -113,6 +113,9 @@ public:
 void send_aggregate_stats_request(uint64_t datapath_ids, const
 struct ofp_match& match, uint8_t table_id);
 
+void send_port_mod(uint64_t datapath_id, 
+   const ofp_phy_port& port);
+
 /* C++ context */
 const container::Context* ctxt;
 
diff --git a/src/nox/lib/openflow.i b/src/nox/lib/openflow.i
index 3dd2286..3b47d82 100644
--- a/src/nox/lib/openflow.i
+++ b/src/nox/lib/openflow.i
@@ -24,9 +24,19 @@
 using namespace vigil;
 %}
 
+%include "cstring.i"
 %include "common-defs.i"
 %include "openflow.h"
 
+%extend ofp_phy_port {
+void set_hw_addr(uint8_t *addr) {
+memcpy($self->hw_addr, addr, ethernetaddr::LEN);
+}
+void set_name(const char *name) {
+memcpy($self->name, name, OFP_MAX_PORT_NAME_LEN);
+}
+};
+
 %extend ofp_match {
 void set_dl_src(uint8_t *addr) {
 memcpy($self->dl_src, addr, ethernetaddr::LEN);
diff --git a/src/nox/lib/util.py b/src/nox/lib/util.py
index 25f49c5..ed42960 100644
--- a/src/nox/lib/util.py
+++ b/src/nox/lib/util.py
@@ -17,7 +17,7 @@
 
 import core
 import array
-from socket import htons
+from socket import htons, htonl
 
 import nox.lib.openflow as openflow
 
@@ -285,6 +285,53 @@ def set_match(attrs):
 m.wildcards = htons(wildcards)
 return m
 
+def set_port(attrs):
+p = openflow.ofp_phy_port()
+
+print attrs
+if attrs.has_key('port_no'):
+p.port_no = htons(attrs['port_no'])
+else:
+print 'undefined port_no attribute type in attrs', attrs
+return None
+
+if attrs.has_key('hw_addr'):
+v = convert_to_eaddr(attrs['hw_addr'])
+if v == None:
+print 'invalid ethernet addr'
+return None
+p.set_hw_addr(v.octet)
+else:
+print 'undefined hw_addr attribute type in attrs', attrs
+return None
+
+if attrs.has_key('name'):
+p.set_name(attrs['name'])
+else:
+print 'undefined name attribute type in attrs', attrs
+return None
+
+if attrs.has_key('flags'):
+p.flags = htonl(attrs['flags'])
+else:
+p.flags = 0
+
+if attrs.has_key('speed'):
+speed = htonl(attrs['speed'])
+  

[nox-dev] Port mod from python -- patch

2008-08-09 Thread Glen Gibb

Hi all,

Attached are the diffs to enable me to send port mods from python. Feel 
free to integrate the diff and let me know if you have any 
comments/questions.


Oh, and to actually send a port mod I just do this from my app:
   self.ctxt.send_port_mod(dp, set_port(port))
where port is a dictionary identical to that returned in the stats in a 
dp_join event.


Glen
diff --git a/src/nox/apps/pyrt/context.i b/src/nox/apps/pyrt/context.i
index b02a3b8..54d0f4e 100644
--- a/src/nox/apps/pyrt/context.i
+++ b/src/nox/apps/pyrt/context.i
@@ -80,6 +80,9 @@ public:
 void send_port_stats_request(uint64_t datapath_id);
 void send_aggregate_stats_request(uint64_t datapath_ids, const
 struct ofp_match& match, uint8_t table_id);
+
+void send_port_mod(uint64_t datapath_id, 
+   const ofp_phy_port& port);
 private:
 PyContext();
 
diff --git a/src/nox/apps/pyrt/pycontext.cc b/src/nox/apps/pyrt/pycontext.cc
index 87d8111..7c5dc2f 100644
--- a/src/nox/apps/pyrt/pycontext.cc
+++ b/src/nox/apps/pyrt/pycontext.cc
@@ -234,6 +234,30 @@ PyContext::send_stats_request(uint64_t datapath_id, ofp_stats_types type, const
 }
 }
 
+void 
+PyContext::send_port_mod(uint64_t datapath_id, 
+ const ofp_phy_port& port) {
+ofp_port_mod* opm = NULL;
+size_t size = sizeof *opm;
+boost::shared_array raw_of(new uint8_t[size]);
+opm = (ofp_port_mod*) raw_of.get();
+
+opm->header.version = OFP_VERSION;
+opm->header.type = OFPT_PORT_MOD;
+opm->header.length = htons(size);
+opm->header.xid = htonl(0);
+
+::memcpy(&opm->desc, &port, sizeof port);
+
+int error = c->send_openflow_command(datapathid::from_host(datapath_id), 
+ &opm->header, false); 
+if (error == EAGAIN) {
+vlog().log(vlog().get_module_val("pyrt"), Vlog::LEVEL_ERR, 
+   "should queue port_mod");
+}
+}
+
+
 bool
 PyContext::unregister_handler(uint32_t rule_id) {
 return c->unregister_handler(rule_id);
diff --git a/src/nox/apps/pyrt/pycontext.hh b/src/nox/apps/pyrt/pycontext.hh
index a18158d..186b16e 100644
--- a/src/nox/apps/pyrt/pycontext.hh
+++ b/src/nox/apps/pyrt/pycontext.hh
@@ -113,6 +113,9 @@ public:
 void send_aggregate_stats_request(uint64_t datapath_ids, const
 struct ofp_match& match, uint8_t table_id);
 
+void send_port_mod(uint64_t datapath_id, 
+   const ofp_phy_port& port);
+
 /* C++ context */
 const container::Context* ctxt;
 
diff --git a/src/nox/lib/openflow.i b/src/nox/lib/openflow.i
index 3dd2286..3b47d82 100644
--- a/src/nox/lib/openflow.i
+++ b/src/nox/lib/openflow.i
@@ -24,9 +24,19 @@
 using namespace vigil;
 %}
 
+%include "cstring.i"
 %include "common-defs.i"
 %include "openflow.h"
 
+%extend ofp_phy_port {
+void set_hw_addr(uint8_t *addr) {
+memcpy($self->hw_addr, addr, ethernetaddr::LEN);
+}
+void set_name(const char *name) {
+memcpy($self->name, name, OFP_MAX_PORT_NAME_LEN);
+}
+};
+
 %extend ofp_match {
 void set_dl_src(uint8_t *addr) {
 memcpy($self->dl_src, addr, ethernetaddr::LEN);
diff --git a/src/nox/lib/util.py b/src/nox/lib/util.py
index 25f49c5..308a96b 100644
--- a/src/nox/lib/util.py
+++ b/src/nox/lib/util.py
@@ -17,7 +17,7 @@
 
 import core
 import array
-from socket import htons
+from socket import htons, htonl
 
 import nox.lib.openflow as openflow
 
@@ -285,6 +285,53 @@ def set_match(attrs):
 m.wildcards = htons(wildcards)
 return m
 
+def set_port(attrs):
+p = openflow.ofp_phy_port()
+
+print attrs
+if attrs.has_key('port_no'):
+p.port_no = htons(attrs['port_no'])
+else:
+print 'undefined port_no attribute type in attrs', attrs
+return None
+
+if attrs.has_key('hw_addr'):
+v = convert_to_eaddr(attrs['hw_addr'])
+if v == None:
+print 'invalid ethernet addr'
+return None
+p.set_hw_addr(v.octet)
+else:
+print 'undefined hw_addr attribute type in attrs', attrs
+return None
+
+if attrs.has_key('name'):
+p.set_name(attrs['name'])
+else:
+print 'undefined name attribute type in attrs', attrs
+return None
+
+if attrs.has_key('flags'):
+p.flags = htonl(attrs['flags'])
+else:
+p.flags = 0
+
+if attrs.has_key('speed'):
+speed = htonl(attrs['speed'])
+if speed < 0:
+speed += 2**32;
+p.speed = htonl(speed)
+else:
+print 'undefined speed attribute type in attrs', attrs
+return None
+
+if attrs.has_key('features'):
+p.features = htonl(attrs['features'])
+else:
+p.features = 0
+
+return p
+
 def extract_flow(ethernet):
 """
 Extracts and returns flow attributes from the given 'ethernet' packet.
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/li

Re: [nox-dev] Port mod python example?

2008-08-09 Thread Glen Gibb

Hi Justin,

It seems that the OpenFlow reference implementation is incorrectly 
reporting the flags field for ofp_phy_port in the features reply (or I'm 
mis-interpreting what this should be).


Looking at a packet capture for the features reply (see attached packet) 
it always reports 0 in the flags -- I would expect this to be 1 since by 
default all ports participate in flooding.


Glen



Glen Gibb wrote:
I'm looking to set the flood flag so that when I have loops in my 
topology I don't end up looping packets forever.


I've actually written most of the code -- I'm just having trouble 
right now copying the name into the name field from Python. Actually, 
do I need to send the name back to the OF switch or will it work 
without setting a name?


Here's the one snippet of code I haven't yet gotten working. In 
openflow.i I have:


%extend ofp_phy_port {
   void set_hw_addr(uint8_t *addr) {
   memcpy($self->hw_addr, addr, ethernetaddr::LEN);
   }
   void set_name(uint8_t *name) {
   memcpy($self->name, name, OFP_MAX_PORT_NAME_LEN);
   }
};

(I'm basically trying to copy what you had in that file for ofp_match.)

The set_hw_addr works perfectly, the set_name fails because I haven't 
yet managed to convert my string to a uint8_t array. Is there an easy 
way to pass in a python string to set_name and copy from the Python 
string to the name field?


Glen




Justin Pettit wrote:
Glen, what are you looking to modify?  Currently, you are only able 
to set the port flags over OpenFlow and the only flag is one to 
indicate whether the port should be included in "flood" actions.  
We're looking to include actions such as disabling ports, but that's 
not in there yet.


--Justin


On Aug 9, 2008, at 12:36 PM, Martin Casado wrote:


I'm not sure port mod is supported in the OF reference
implementation.  Justin/Ben?

On Aug 8, 2008, at 4:42 PM, Glen Gibb wrote:


Hi all,

Is there an example available that sends port mod messages to a
switch?
I'm currently looking for examples but can't find one.

Thanks,
Glen

___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org



___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org










features_reply.pcap
Description: application/cap
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Flow setup latency

2008-08-09 Thread David Erickson
Thanks, we'll give it a try and see if it helps.

-David

Martin Casado wrote:
> I should have mentioned this yesterday, but if you compile NOX with 
> --enable-ndebug, you'll get at least a factor of 3 improvement in speed 
> (in C++).  However, I don't know how much this will improve your code if 
> Python is providing all of the overhead.
> 
> 
> On Aug 8, 2008, at 11:32 AM, David Erickson wrote:
> 
>> Ugh :(
>>
>> -David
>>
>> Martin Casado wrote:
>>> Rewrite in C++ ;-)  Otherwise, this is going to depend largely on the 
>>> application.  Even when we run pyswitch alone, the latencies are 
>>> 20-30ms.
>>>
>>>
>>> On Aug 8, 2008, at 11:20 AM, David Erickson wrote:
>>>
 Ya our mobilevms app is in Python. Is there any way to speed it up?

 -David

 Martin Casado wrote:
> When running from C++ using switch or routing, we generally see 
> under 5ms latency, even with policy.  Do any of your packets go to 
> Python?
>> This is with reference kernel switches.
>>
>> -David
>>
>> Brandon Heller wrote:
>>
>>> Which type(s) of OF switches are on the path?
>>>
>>> -Brandon
>>>
>>> On Fri, Aug 8, 2008 at 10:53 AM, David Erickson 
>>> <[EMAIL PROTECTED] > wrote:
>>>
>>>   We're currently seeing on the order of ~80ms for the time for a 
>>> packet
>>>   to hit an OF switch, go to NOX, a flow to get pushed out, and 
>>> the packet
>>>   to be sent out. Has anyone done any work on decreasing this 
>>> time, or
>>>   have any suggestions on how to get this as low as possible?
>>>   Unfortunately right now for us when we migrate our game server 
>>> everyone
>>>   gets a brief 'connection interupted' message due to this 
>>> latency, which
>>>   is also compounded based on the number of OF switches the 
>>> packets have
>>>   to go through.
>>>
>>>   Thanks,
>>>   David
>>>
>>>   ___
>>>   nox-dev mailing list
>>>   nox-dev@noxrepo.org 
>>>   http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>>>
>>>
>>>
>>
>>
>> ___
>> nox-dev mailing list
>> nox-dev@noxrepo.org
>> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>>

>>>
>>>
>>
> 
> 


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Port mod python example?

2008-08-09 Thread Martin Casado
You can just import cstring.i in swign and have the method accept a  
const char* (you can cast in the memcpy).  That should work without  
any additional fuss.  Let me know if you still have problems with it.



On Aug 9, 2008, at 12:53 PM, Glen Gibb wrote:

> I'm looking to set the flood flag so that when I have loops in my  
> topology I don't end up looping packets forever.
>
> I've actually written most of the code -- I'm just having trouble  
> right now copying the name into the name field from Python.  
> Actually, do I need to send the name back to the OF switch or will  
> it work without setting a name?
>
> Here's the one snippet of code I haven't yet gotten working. In  
> openflow.i I have:
>
> %extend ofp_phy_port {
>   void set_hw_addr(uint8_t *addr) {
>   memcpy($self->hw_addr, addr, ethernetaddr::LEN);
>   }
>   void set_name(uint8_t *name) {
>   memcpy($self->name, name, OFP_MAX_PORT_NAME_LEN);
>   }
> };
>
> (I'm basically trying to copy what you had in that file for  
> ofp_match.)
>
> The set_hw_addr works perfectly, the set_name fails because I  
> haven't yet managed to convert my string to a uint8_t array. Is  
> there an easy way to pass in a python string to set_name and copy  
> from the Python string to the name field?
>
> Glen
>
>
>
>
> Justin Pettit wrote:
>> Glen, what are you looking to modify?  Currently, you are only able  
>> to set the port flags over OpenFlow and the only flag is one to  
>> indicate whether the port should be included in "flood" actions.   
>> We're looking to include actions such as disabling ports, but  
>> that's not in there yet.
>>
>> --Justin
>>
>>
>> On Aug 9, 2008, at 12:36 PM, Martin Casado wrote:
>>
>>> I'm not sure port mod is supported in the OF reference
>>> implementation.  Justin/Ben?
>>>
>>> On Aug 8, 2008, at 4:42 PM, Glen Gibb wrote:
>>>
 Hi all,

 Is there an example available that sends port mod messages to a
 switch?
 I'm currently looking for examples but can't find one.

 Thanks,
 Glen

 ___
 nox-dev mailing list
 nox-dev@noxrepo.org
 http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>>>
>>>
>>> ___
>>> nox-dev mailing list
>>> nox-dev@noxrepo.org
>>> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>>
>>
>


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Port mod python example?

2008-08-09 Thread Justin Pettit
The name doesn't matter.  Just make sure you have the Ethernet address  
set properly, since OpenFlow performs a sanity-check on that.

--Justin


On Aug 9, 2008, at 12:53 PM, Glen Gibb wrote:

> I'm looking to set the flood flag so that when I have loops in my  
> topology I don't end up looping packets forever.
>
> I've actually written most of the code -- I'm just having trouble  
> right now copying the name into the name field from Python.  
> Actually, do I need to send the name back to the OF switch or will  
> it work without setting a name?
>
> Here's the one snippet of code I haven't yet gotten working. In  
> openflow.i I have:
>
> %extend ofp_phy_port {
>   void set_hw_addr(uint8_t *addr) {
>   memcpy($self->hw_addr, addr, ethernetaddr::LEN);
>   }
>   void set_name(uint8_t *name) {
>   memcpy($self->name, name, OFP_MAX_PORT_NAME_LEN);
>   }
> };
>
> (I'm basically trying to copy what you had in that file for  
> ofp_match.)
>
> The set_hw_addr works perfectly, the set_name fails because I  
> haven't yet managed to convert my string to a uint8_t array. Is  
> there an easy way to pass in a python string to set_name and copy  
> from the Python string to the name field?
>
> Glen
>
>
>
>
> Justin Pettit wrote:
>> Glen, what are you looking to modify?  Currently, you are only able  
>> to set the port flags over OpenFlow and the only flag is one to  
>> indicate whether the port should be included in "flood" actions.   
>> We're looking to include actions such as disabling ports, but  
>> that's not in there yet.
>>
>> --Justin
>>
>>
>> On Aug 9, 2008, at 12:36 PM, Martin Casado wrote:
>>
>>> I'm not sure port mod is supported in the OF reference
>>> implementation.  Justin/Ben?
>>>
>>> On Aug 8, 2008, at 4:42 PM, Glen Gibb wrote:
>>>
 Hi all,

 Is there an example available that sends port mod messages to a
 switch?
 I'm currently looking for examples but can't find one.

 Thanks,
 Glen

 ___
 nox-dev mailing list
 nox-dev@noxrepo.org
 http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>>>
>>>
>>> ___
>>> nox-dev mailing list
>>> nox-dev@noxrepo.org
>>> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>>
>>
>


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Port mod python example?

2008-08-09 Thread Glen Gibb
I'm looking to set the flood flag so that when I have loops in my 
topology I don't end up looping packets forever.

I've actually written most of the code -- I'm just having trouble right 
now copying the name into the name field from Python. Actually, do I 
need to send the name back to the OF switch or will it work without 
setting a name?

Here's the one snippet of code I haven't yet gotten working. In 
openflow.i I have:

%extend ofp_phy_port {
void set_hw_addr(uint8_t *addr) {
memcpy($self->hw_addr, addr, ethernetaddr::LEN);
}
void set_name(uint8_t *name) {
memcpy($self->name, name, OFP_MAX_PORT_NAME_LEN);
}
};

(I'm basically trying to copy what you had in that file for ofp_match.)

The set_hw_addr works perfectly, the set_name fails because I haven't 
yet managed to convert my string to a uint8_t array. Is there an easy 
way to pass in a python string to set_name and copy from the Python 
string to the name field?

Glen




Justin Pettit wrote:
> Glen, what are you looking to modify?  Currently, you are only able to 
> set the port flags over OpenFlow and the only flag is one to indicate 
> whether the port should be included in "flood" actions.  We're looking 
> to include actions such as disabling ports, but that's not in there yet.
>
> --Justin
>
>
> On Aug 9, 2008, at 12:36 PM, Martin Casado wrote:
>
>> I'm not sure port mod is supported in the OF reference
>> implementation.  Justin/Ben?
>>
>> On Aug 8, 2008, at 4:42 PM, Glen Gibb wrote:
>>
>>> Hi all,
>>>
>>> Is there an example available that sends port mod messages to a
>>> switch?
>>> I'm currently looking for examples but can't find one.
>>>
>>> Thanks,
>>> Glen
>>>
>>> ___
>>> nox-dev mailing list
>>> nox-dev@noxrepo.org
>>> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>>
>>
>> ___
>> nox-dev mailing list
>> nox-dev@noxrepo.org
>> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>
>


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Port mod python example?

2008-08-09 Thread Justin Pettit
Glen, what are you looking to modify?  Currently, you are only able to  
set the port flags over OpenFlow and the only flag is one to indicate  
whether the port should be included in "flood" actions.  We're looking  
to include actions such as disabling ports, but that's not in there yet.

--Justin


On Aug 9, 2008, at 12:36 PM, Martin Casado wrote:

> I'm not sure port mod is supported in the OF reference
> implementation.  Justin/Ben?
>
> On Aug 8, 2008, at 4:42 PM, Glen Gibb wrote:
>
>> Hi all,
>>
>> Is there an example available that sends port mod messages to a
>> switch?
>> I'm currently looking for examples but can't find one.
>>
>> Thanks,
>> Glen
>>
>> ___
>> nox-dev mailing list
>> nox-dev@noxrepo.org
>> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>
>
> ___
> nox-dev mailing list
> nox-dev@noxrepo.org
> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Port mod python example?

2008-08-09 Thread Martin Casado
I'm not sure port mod is supported in the OF reference  
implementation.  Justin/Ben?

On Aug 8, 2008, at 4:42 PM, Glen Gibb wrote:

> Hi all,
>
> Is there an example available that sends port mod messages to a  
> switch?
> I'm currently looking for examples but can't find one.
>
> Thanks,
> Glen
>
> ___
> nox-dev mailing list
> nox-dev@noxrepo.org
> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] Flow setup latency

2008-08-09 Thread Martin Casado
I should have mentioned this yesterday, but if you compile NOX with -- 
enable-ndebug, you'll get at least a factor of 3 improvement in speed  
(in C++).  However, I don't know how much this will improve your code  
if Python is providing all of the overhead.


On Aug 8, 2008, at 11:32 AM, David Erickson wrote:

> Ugh :(
>
> -David
>
> Martin Casado wrote:
>> Rewrite in C++ ;-)  Otherwise, this is going to depend largely on  
>> the application.  Even when we run pyswitch alone, the latencies  
>> are 20-30ms.
>>
>>
>> On Aug 8, 2008, at 11:20 AM, David Erickson wrote:
>>
>>> Ya our mobilevms app is in Python. Is there any way to speed it up?
>>>
>>> -David
>>>
>>> Martin Casado wrote:
 When running from C++ using switch or routing, we generally see  
 under 5ms latency, even with policy.  Do any of your packets go  
 to Python?
> This is with reference kernel switches.
>
> -David
>
> Brandon Heller wrote:
>
>> Which type(s) of OF switches are on the path?
>>
>> -Brandon
>>
>> On Fri, Aug 8, 2008 at 10:53 AM, David Erickson <[EMAIL PROTECTED] 
>>  > wrote:
>>
>>   We're currently seeing on the order of ~80ms for the time for  
>> a packet
>>   to hit an OF switch, go to NOX, a flow to get pushed out, and  
>> the packet
>>   to be sent out. Has anyone done any work on decreasing this  
>> time, or
>>   have any suggestions on how to get this as low as possible?
>>   Unfortunately right now for us when we migrate our game  
>> server everyone
>>   gets a brief 'connection interupted' message due to this  
>> latency, which
>>   is also compounded based on the number of OF switches the  
>> packets have
>>   to go through.
>>
>>   Thanks,
>>   David
>>
>>   ___
>>   nox-dev mailing list
>>   nox-dev@noxrepo.org 
>>   http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>>
>>
>>
>
>
> ___
> nox-dev mailing list
> nox-dev@noxrepo.org
> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>
>>>
>>
>>
>


___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org