Re: [nox-dev] Contributing to Nox

2011-01-12 Thread Derek Cormier
Woops, I introduced a bug. I was converting 'reason' to host byte order, 
but it's only 8 bits. This causes it to always be 0 since it turns into 
a short before ntohs(). I attached the fix, sorry about that.


-Derek

On 01/13/2011 02:55 PM, kk yap wrote:

Thanks.  I pushed this.

Regards
KK

On 12 January 2011 21:40, Derek Cormier  wrote:

Thanks! I'm glad my patches are decent.

I've attached another one for destiny:

In a Flow_removed_event, the fields are taken from an ofp_flow_removed
message,
but a couple of fields were missing (reason and priority). I added these to
the event
struct and changed python's flow removed callback generator to give these
new parameters.

-Derek

On 01/12/2011 04:43 AM, kk yap wrote:

Hi Derek,

Thanks.  Great patches as usual.  I have pushed them to the destiny
branch.

Martin and Murphy, I believe I have pushed most (if not all) of
Derek's patches at this moment.  If anything else is missing, let me
know.

Thanks.

Regards
KK

On 11 January 2011 07:23, Martin Casadowrote:

Derek,

Thanks for the patches, these are very helpful.  One of us will take a
look
shortly.

.martin

Hello,
Here are two patches for destiny for the Python API.

patch 1:
  - in pyrt.cc, add datapath id to the dictionaries created by
Flow_removed_event and Error_event

patch2:
- add lots of doxygen doc strings to core.api
- add callback generators for flow mod and flow removed events
- change the names of callback generators to make them more readable
- add more constants for dictionary keys

-Derek

On 01/04/2011 10:27 AM, kk yap wrote:

Hi Derek,

Thanks.  Doxygen comments are presented in the code.  E.g.,

/** \brief Event
   * Some event
   *
   * @author ykk
   * @date Jan 2011
   */
struct x_event
{
...
}

They are more in-depth example in the components.

Regards
KK

On 3 January 2011 17:19, Derek Cormier
wrote:

Sure thing. Where do the doxygen comments go? I've never used doxygen
before, I'm assuming they go above the struct definition but I don't see
any
such comments in the files I edited. Is there another file?

Thanks,
-Derek

On 01/04/2011 06:20 AM, kk yap wrote:

Hi Derek,

Sorry it took me a while to get to this.  Can you put in doxygen
comments for these patches?  The patches includes new structs and so
on from what I can see.  Else, I can do it.  But I doubt I can get to
it fast enough.  Thanks.

Regards
KK

On 27 December 2010 23:23, Derek Cormier
   wrote:

Here's a couple more patches for destiny.

'barrier-reply.tar.gz'  -  make barrier reply events available to the
Python
API.
'flow-stats-in.tar.gz'  -  add a convenience method in component to
register
for flow stats in events.

-Derek

On 12/28/2010 01:30 AM, Martin Casado wrote:

Thanks KK.  I pushed a few edits as well.

Hi,

I have done that for destiny and pushed the file.  Martin, you should
probably check the list again.  If I have missed you out (since I only
exploited git log), do let me know.

Regards
KK

___
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


--
~~~
Martin Casado
Nicira Networks, Inc.
www.nicira.com | www.openvswitch.org
cell: 650-776-1457
~~~






>From 3578f2c1aa8b0d62bf56198d23d419a4529f86a6 Mon Sep 17 00:00:00 2001
From: Derek Cormier 
Date: Thu, 13 Jan 2011 15:18:57 +0900
Subject: [PATCH 11/11] Fix a bug where the 8-bit reason field in a Flow_removed_event
 is being converted to host byte order.

---
 src/include/flow-removed.hh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/include/flow-removed.hh b/src/include/flow-removed.hh
index 206c4f5..8a7c81c 100644
--- a/src/include/flow-removed.hh
+++ b/src/include/flow-removed.hh
@@ -100,7 +100,7 @@ Flow_removed_event::Flow_removed_event(datapathid datapath_id_,
   datapath_id(datapath_id_)
 {
 priority  = ntohs(ofr->priority);
-reason= ntohs(ofr->reason);
+reason= ofr->reason;
 cookie= ntohll(ofr->cookie);
 duration_sec  = ntohl(ofr->duration_sec);
 duration_nsec = ntohl(ofr->duration_nsec);
-- 
1.7.0.4

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


[nox-dev] Overview Slides for NOX

2011-01-12 Thread kk yap
Hi,

A "quick" overview of NOX was prepared for a class in Stanford.  These
slides are made publicly available via GoogleDoc
(http://tinyurl.com/noxreview).  These might be useful for those who
want a quick overview of NOX and get started on it.  Hope people do
find it useful.

Regards
KK

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


Re: [nox-dev] Contributing to Nox

2011-01-12 Thread kk yap
Thanks.  I pushed this.

Regards
KK

On 12 January 2011 21:40, Derek Cormier  wrote:
> Thanks! I'm glad my patches are decent.
>
> I've attached another one for destiny:
>
> In a Flow_removed_event, the fields are taken from an ofp_flow_removed
> message,
> but a couple of fields were missing (reason and priority). I added these to
> the event
> struct and changed python's flow removed callback generator to give these
> new parameters.
>
> -Derek
>
> On 01/12/2011 04:43 AM, kk yap wrote:
>>
>> Hi Derek,
>>
>> Thanks.  Great patches as usual.  I have pushed them to the destiny
>> branch.
>>
>> Martin and Murphy, I believe I have pushed most (if not all) of
>> Derek's patches at this moment.  If anything else is missing, let me
>> know.
>>
>> Thanks.
>>
>> Regards
>> KK
>>
>> On 11 January 2011 07:23, Martin Casado  wrote:
>>>
>>> Derek,
>>>
>>> Thanks for the patches, these are very helpful.  One of us will take a
>>> look
>>> shortly.
>>>
>>> .martin
>>>
>>> Hello,
>>> Here are two patches for destiny for the Python API.
>>>
>>> patch 1:
>>>  - in pyrt.cc, add datapath id to the dictionaries created by
>>> Flow_removed_event and Error_event
>>>
>>> patch2:
>>> - add lots of doxygen doc strings to core.api
>>> - add callback generators for flow mod and flow removed events
>>> - change the names of callback generators to make them more readable
>>> - add more constants for dictionary keys
>>>
>>> -Derek
>>>
>>> On 01/04/2011 10:27 AM, kk yap wrote:
>>>
>>> Hi Derek,
>>>
>>> Thanks.  Doxygen comments are presented in the code.  E.g.,
>>>
>>> /** \brief Event
>>>   * Some event
>>>   *
>>>   * @author ykk
>>>   * @date Jan 2011
>>>   */
>>> struct x_event
>>> {
>>>    ...
>>> }
>>>
>>> They are more in-depth example in the components.
>>>
>>> Regards
>>> KK
>>>
>>> On 3 January 2011 17:19, Derek Cormier
>>> wrote:
>>>
>>> Sure thing. Where do the doxygen comments go? I've never used doxygen
>>> before, I'm assuming they go above the struct definition but I don't see
>>> any
>>> such comments in the files I edited. Is there another file?
>>>
>>> Thanks,
>>> -Derek
>>>
>>> On 01/04/2011 06:20 AM, kk yap wrote:
>>>
>>> Hi Derek,
>>>
>>> Sorry it took me a while to get to this.  Can you put in doxygen
>>> comments for these patches?  The patches includes new structs and so
>>> on from what I can see.  Else, I can do it.  But I doubt I can get to
>>> it fast enough.  Thanks.
>>>
>>> Regards
>>> KK
>>>
>>> On 27 December 2010 23:23, Derek Cormier
>>>   wrote:
>>>
>>> Here's a couple more patches for destiny.
>>>
>>> 'barrier-reply.tar.gz'  -  make barrier reply events available to the
>>> Python
>>> API.
>>> 'flow-stats-in.tar.gz'  -  add a convenience method in component to
>>> register
>>> for flow stats in events.
>>>
>>> -Derek
>>>
>>> On 12/28/2010 01:30 AM, Martin Casado wrote:
>>>
>>> Thanks KK.  I pushed a few edits as well.
>>>
>>> Hi,
>>>
>>> I have done that for destiny and pushed the file.  Martin, you should
>>> probably check the list again.  If I have missed you out (since I only
>>> exploited git log), do let me know.
>>>
>>> Regards
>>> KK
>>>
>>> ___
>>> 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
>>>
>>>
>>> --
>>> ~~~
>>> Martin Casado
>>> Nicira Networks, Inc.
>>> www.nicira.com | www.openvswitch.org
>>> cell: 650-776-1457
>>> ~~~
>>
>
>

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


Re: [nox-dev] Contributing to Nox

2011-01-12 Thread Derek Cormier

Thanks! I'm glad my patches are decent.

I've attached another one for destiny:

In a Flow_removed_event, the fields are taken from an ofp_flow_removed 
message,
but a couple of fields were missing (reason and priority). I added these 
to the event

struct and changed python's flow removed callback generator to give these
new parameters.

-Derek

On 01/12/2011 04:43 AM, kk yap wrote:

Hi Derek,

Thanks.  Great patches as usual.  I have pushed them to the destiny branch.

Martin and Murphy, I believe I have pushed most (if not all) of
Derek's patches at this moment.  If anything else is missing, let me
know.

Thanks.

Regards
KK

On 11 January 2011 07:23, Martin Casado  wrote:

Derek,

Thanks for the patches, these are very helpful.  One of us will take a look
shortly.

.martin

Hello,
Here are two patches for destiny for the Python API.

patch 1:
  - in pyrt.cc, add datapath id to the dictionaries created by
Flow_removed_event and Error_event

patch2:
- add lots of doxygen doc strings to core.api
- add callback generators for flow mod and flow removed events
- change the names of callback generators to make them more readable
- add more constants for dictionary keys

-Derek

On 01/04/2011 10:27 AM, kk yap wrote:

Hi Derek,

Thanks.  Doxygen comments are presented in the code.  E.g.,

/** \brief Event
   * Some event
   *
   * @author ykk
   * @date Jan 2011
   */
struct x_event
{
...
}

They are more in-depth example in the components.

Regards
KK

On 3 January 2011 17:19, Derek Cormier   wrote:

Sure thing. Where do the doxygen comments go? I've never used doxygen
before, I'm assuming they go above the struct definition but I don't see any
such comments in the files I edited. Is there another file?

Thanks,
-Derek

On 01/04/2011 06:20 AM, kk yap wrote:

Hi Derek,

Sorry it took me a while to get to this.  Can you put in doxygen
comments for these patches?  The patches includes new structs and so
on from what I can see.  Else, I can do it.  But I doubt I can get to
it fast enough.  Thanks.

Regards
KK

On 27 December 2010 23:23, Derek Cormier
   wrote:

Here's a couple more patches for destiny.

'barrier-reply.tar.gz'  -  make barrier reply events available to the
Python
API.
'flow-stats-in.tar.gz'  -  add a convenience method in component to
register
for flow stats in events.

-Derek

On 12/28/2010 01:30 AM, Martin Casado wrote:

Thanks KK.  I pushed a few edits as well.

Hi,

I have done that for destiny and pushed the file.  Martin, you should
probably check the list again.  If I have missed you out (since I only
exploited git log), do let me know.

Regards
KK

___
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


--
~~~
Martin Casado
Nicira Networks, Inc.
www.nicira.com | www.openvswitch.org
cell: 650-776-1457
~~~




>From 9d769739a48653f5806f85a05deebe165b79deaa Mon Sep 17 00:00:00 2001
From: Derek Cormier 
Date: Thu, 13 Jan 2011 14:09:04 +0900
Subject: [PATCH 09/10] Added the priority and reason field from ofp_flow_removed
 to Flow_removed_event.

The python flow removed callback generator also includes these
new parameters.
---
 src/include/flow-removed.hh   |   27 +--
 src/nox/coreapps/pyrt/pyrt.cc |2 ++
 src/nox/lib/core.py   |9 ++---
 src/nox/lib/util.py   |5 +++--
 4 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/src/include/flow-removed.hh b/src/include/flow-removed.hh
index f164f5e..206c4f5 100644
--- a/src/include/flow-removed.hh
+++ b/src/include/flow-removed.hh
@@ -43,16 +43,17 @@ struct Flow_removed_event
   public Flow_event,
   boost::noncopyable
 {
-Flow_removed_event(datapathid datapath_id_, 
-   uint32_t duration_sec_, uint32_t duration_nsec_,
-		   uint16_t idle_timeout_,
-   uint64_t packet_count_, uint64_t byte_count_,
-		   uint64_t cookie_)
-: Event(static_get_name()), datapath_id(datapath_id_), 
+Flow_removed_event(
+   datapathid datapath_id_, uint16_t priority_,
+   uint8_t reason_, uint32_t duration_sec_,
+   uint32_t duration_nsec_, uint16_t idle_timeout_,
+   uint64_t packet_count_, uint64_t byte_count_,
+   uint64_t cookie_)
+: Event(static_get_name()), datapath_id(datapath_id_),
+  priority(priority_), reason(reason_),
   duration_sec(duration_sec_), duration_nsec(duration_nsec_),
-	  idle_timeout(idle_timeout_),
-  packet_count(packet_count_), byte_count(byte_count_),
-  cookie(cookie_) { }
+  idle_timeout(idle_timeout_), packet_count(packet_count_),
+  byte_count(byte_count_), cookie(cookie_) { }
 
 
 Flow_removed_event(const datapathid datapath_id_, 
@@ -73

Re: [nox-dev] NOX Error

2011-01-12 Thread Syed Akbar Mehdi
Thanks Murphy, Kyriakos. That is exactly the problem. Actually the data I am
using has about 1400 TCP connection initiations. Whenever a SYNACK is
received, I set the flow specifically for that connection with an idle
timeout of 1 sec. The data is for almost a whole day and most of these flows
are short-lived. I dumped the flow table at one point while the datapath was
complaining with the flow table full message and there were 57 flows.

The spec does not say anything about the maximum number of flows in a table
(or at least I could not find that). Also, all the flows that I am adding
are going into table 1, which might be because of the fact that all of them
have the same priority.

Regards,
Akbar

On Wed, Jan 12, 2011 at 7:15 PM, Murphy McCauley  wrote:

> I think type 3 code 0 is failure to add a flow because you already have too
> many, but you can look it up in the OpenFlow specification.
> The data that goes with an error depends on the error.  In the case of
> failure to add a flow, I think it just returns the flow mod message to you
> (or at least the beginning of it).  In zaku, I think the data just gets
> thrown away, but I recently pushed a patch that lets you retrieve it in
> destiny.  I have a vague memory that the data count might also include the
> error packet size or something, so if you're using C++ you should watch out
> for that (I think in Python you can just len() the buffer and get the right
> answer).
>
> -- Murphy
>
>
> On Jan 12, 2011, at 5:45 AM, Syed Akbar Mehdi wrote:
>
> > Hi,
> >
> > While running some captured network data through an openflow switch
> running on a Linux box, I get the following error messages at the
> controller:
> >
> > 00015|openflow-event|ERR:received Openflow error packet from
> dpid=002320b77f72: type=3, code=0, 80 bytes of data
> >
> > What is meant by the type = 3, code = 0 ? Also does the 80 bytes mean
> that the packet at the switch that caused it to send this error to the
> controller was 80 bytes in size?
> >
> > --
> > Regards,
> > Syed Akbar Mehdi,
> > School of EECS (SEECS),
> > National University of Sciences and Technology (NUST),
> > Pakistan.
> >
> > ___
> > nox-dev mailing list
> > nox-dev@noxrepo.org
> > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>
>


-- 
Regards,
Syed Akbar Mehdi,
School of EECS (SEECS),
National University of Sciences and Technology (NUST),
Pakistan.
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


Re: [nox-dev] NOX Error

2011-01-12 Thread Murphy McCauley
I think type 3 code 0 is failure to add a flow because you already have too 
many, but you can look it up in the OpenFlow specification.
The data that goes with an error depends on the error.  In the case of failure 
to add a flow, I think it just returns the flow mod message to you (or at least 
the beginning of it).  In zaku, I think the data just gets thrown away, but I 
recently pushed a patch that lets you retrieve it in destiny.  I have a vague 
memory that the data count might also include the error packet size or 
something, so if you're using C++ you should watch out for that (I think in 
Python you can just len() the buffer and get the right answer).

-- Murphy


On Jan 12, 2011, at 5:45 AM, Syed Akbar Mehdi wrote:

> Hi,
> 
> While running some captured network data through an openflow switch running 
> on a Linux box, I get the following error messages at the controller:
> 
> 00015|openflow-event|ERR:received Openflow error packet from 
> dpid=002320b77f72: type=3, code=0, 80 bytes of data
> 
> What is meant by the type = 3, code = 0 ? Also does the 80 bytes mean that 
> the packet at the switch that caused it to send this error to the controller 
> was 80 bytes in size?
> 
> -- 
> Regards,
> Syed Akbar Mehdi,
> School of EECS (SEECS),
> National University of Sciences and Technology (NUST),
> Pakistan.
> 
> ___
> 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] NOX Error

2011-01-12 Thread Kyriakos Zarifis
Hi Syed,

type=3 corresponds to "OFPET_FLOW_MOD_FAILED", and code=0 to
"OFPFMFC_ALL_TABLES_FULL"

Any reason why the flow table would be indeed full?


On Wed, Jan 12, 2011 at 3:45 PM, Syed Akbar Mehdi <
akbar.me...@seecs.nust.edu.pk> wrote:

> Hi,
>
> While running some captured network data through an openflow switch running
> on a Linux box, I get the following error messages at the controller:
>
> 00015|openflow-event|ERR:received Openflow error packet from
> dpid=002320b77f72: type=3, code=0, 80 bytes of data
>
> What is meant by the type = 3, code = 0 ? Also does the 80 bytes mean that
> the packet at the switch that caused it to send this error to the controller
> was 80 bytes in size?
>
> --
> Regards,
> Syed Akbar Mehdi,
> School of EECS (SEECS),
> National University of Sciences and Technology (NUST),
> Pakistan.
>
>
> ___
> 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] NOX Error

2011-01-12 Thread Syed Akbar Mehdi
Hi,

While running some captured network data through an openflow switch running
on a Linux box, I get the following error messages at the controller:

00015|openflow-event|ERR:received Openflow error packet from
dpid=002320b77f72: type=3, code=0, 80 bytes of data

What is meant by the type = 3, code = 0 ? Also does the 80 bytes mean that
the packet at the switch that caused it to send this error to the controller
was 80 bytes in size?

-- 
Regards,
Syed Akbar Mehdi,
School of EECS (SEECS),
National University of Sciences and Technology (NUST),
Pakistan.
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org