Re: [nox-dev] Quick Bugfix for pyglue.

2011-01-06 Thread kk yap
Hi Derek,

Yes, we use doxypy for Python comments.  I pushed a simple_py_app
today, with example of how the documentation works.

Regards
KK

On 6 January 2011 18:44, Derek Cormier  wrote:
> Hi KK,
>
> No problem. I'm working on some more changes to further expose python, and I
> noticed that core.py has both method header comments and doc strings. If I
> clean up the comments, which should I use? And, do you also format python
> comments for doxygen?
>
> Thanks,
> -Derek
>
> On 01/06/2011 05:03 AM, kk yap wrote:
>>
>> Hi Derek,
>>
>> I pushed all the patches.  I did not realize you are just exposing
>> things to Python and not declaring new structs.  Sorry.  A quick
>> glimpse has failed me.
>>
>> Regards
>> KK
>>
>> On 3 January 2011 21:07, Derek Cormier
>>  wrote:
>>>
>>> Here is a patch for destiny to fix a bug where pyglue.cc was using ntohl
>>> on
>>> ofp_flow_stat's cookie field instead of ntohll, which is required for
>>> 64-bit
>>> values.
>>>
>>> -Derek
>>>
>>> ___
>>> 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] Quick Bugfix for pyglue.

2011-01-06 Thread Derek Cormier

Hi KK,

No problem. I'm working on some more changes to further expose python, 
and I noticed that core.py has both method header comments and doc 
strings. If I clean up the comments, which should I use? And, do you 
also format python comments for doxygen?


Thanks,
-Derek

On 01/06/2011 05:03 AM, kk yap wrote:

Hi Derek,

I pushed all the patches.  I did not realize you are just exposing
things to Python and not declaring new structs.  Sorry.  A quick
glimpse has failed me.

Regards
KK

On 3 January 2011 21:07, Derek Cormier  wrote:

Here is a patch for destiny to fix a bug where pyglue.cc was using ntohl on
ofp_flow_stat's cookie field instead of ntohll, which is required for 64-bit
values.

-Derek

___
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] Quick Bugfix for pyglue.

2011-01-05 Thread kk yap
Hi Derek,

I pushed all the patches.  I did not realize you are just exposing
things to Python and not declaring new structs.  Sorry.  A quick
glimpse has failed me.

Regards
KK

On 3 January 2011 21:07, Derek Cormier  wrote:
> Here is a patch for destiny to fix a bug where pyglue.cc was using ntohl on
> ofp_flow_stat's cookie field instead of ntohll, which is required for 64-bit
> values.
>
> -Derek
>
> ___
> 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] Quick Bugfix for pyglue.

2011-01-03 Thread Derek Cormier
Here is a patch for destiny to fix a bug where pyglue.cc was using ntohl 
on ofp_flow_stat's cookie field instead of ntohll, which is required for 
64-bit values.


-Derek
>From 05b659b0ba0840045b0223fb7f6843f7742c18ba Mon Sep 17 00:00:00 2001
From: Derek Cormier 
Date: Tue, 4 Jan 2011 13:55:51 +0900
Subject: [PATCH] Fix pyglue's cookie conversion for flow stats structure.

When pyglue.cc converted the cookie in an ofp_flow_stats structure from
network to host byte order, it used ntohl rather than ntohll. This gave
incorrect values since cookies 64-bit.
---
 src/nox/coreapps/pyrt/pyglue.cc |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/nox/coreapps/pyrt/pyglue.cc b/src/nox/coreapps/pyrt/pyglue.cc
index 1a6f780..b9db96f 100644
--- a/src/nox/coreapps/pyrt/pyglue.cc
+++ b/src/nox/coreapps/pyrt/pyglue.cc
@@ -519,7 +519,7 @@ to_python(const ofp_flow_stats& fs)
 }
 pyglue_setdict_string(dict, "table_id", to_python(fs.table_id));
 pyglue_setdict_string(dict, "match", to_python(fs.match));
-pyglue_setdict_string(dict, "cookie", to_python(ntohl(fs.cookie)));
+pyglue_setdict_string(dict, "cookie", to_python(ntohll(fs.cookie)));
 pyglue_setdict_string(dict, "duration_sec", to_python(ntohl(fs.duration_sec)));
 pyglue_setdict_string(dict, "duration_nsec", to_python(ntohl(fs.duration_nsec)));
 pyglue_setdict_string(dict, "priority", to_python(ntohs(fs.priority)));
-- 
1.7.0.4

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