[nox-dev] Pyglue Table_stats patch

2011-02-27 Thread Derek Cormier
ere being converted to 64-bit signed, but that's a different issue in itself. I changed the code to 'I' for 32-bit unsigned. Here's a patch to fix this. -- Derek >From 5f077992ee10a20f3136178a1f1ee288e468b502 Mon Sep 17 00:00:00 2001 From: Derek Cormier Date: Mon, 28 Feb 20

[nox-dev] Flow removed message's match has extra 0-fields

2011-02-15 Thread Derek Cormier
Hello, I think I may have found a bug. First, I add a flow where the dl_type set and everything else is wildcarded. Then I delete it using delete_strict_datapath_flow(). When I receive a flow removed event, I print out the match dictionary and see: {'dl_type': 5, 'nw_dst_n_wild': 0L, 'nw_dst

Re: [nox-dev] Getting Actions From Events in Python

2011-01-27 Thread Derek Cormier
Without minding the typos, that is... On 01/28/2011 04:46 PM, Derek Cormier wrote: Ok I'll give it a try and submit a patch when I'm finished. Could you please tell me if the following is the right approach? template <> PyObject* to_python(const ofp_action_header &a)

Re: [nox-dev] Getting Actions From Events in Python

2011-01-27 Thread Derek Cormier
e to_python() for ofp_flow_stats. Step two, unpack v_actions from the Flow_stats struct into a list of dicts and throw it into "dict" too. Except instead of step two, we have /* XXX actions */. :) You should be able to just go ahead and implement it there. -- Murphy On Fri, 2011-0

[nox-dev] Getting Actions From Events in Python

2011-01-27 Thread Derek Cormier
Hello, I was looking at pyglue.cc and it looks like actions are never included in python events. A comment says to use Flow_stats, but flow stats contains a vector ofp_action_header's. Since actions are variable-length, won't this cut off data when the action is longer than the header? (For

Re: [nox-dev] Contributing to Nox

2011-01-12 Thread Derek Cormier
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

Re: [nox-dev] Contributing to Nox

2011-01-12 Thread Derek Cormier
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/201

Re: [nox-dev] Contributing to Nox

2011-01-11 Thread Derek Cormier
*/ 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 s

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

2011-01-06 Thread Derek Cormier
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

[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

Re: [nox-dev] Telling Like Flows Apart

2011-01-03 Thread Derek Cormier
Srini, it appears I was mistaken. Open vSwitch does not add a duplicate. I thought it did before, but I might have been imagining things. -Derek On 12/29/2010 02:32 PM, Derek Cormier wrote: Hi Srini, If I recall correctly, when I add two flows with the same match pattern, Open vSwitch shows

Re: [nox-dev] Telling Like Flows Apart

2010-12-28 Thread Derek Cormier
7;m curious: How do you add flows with same match pattern and not have > them be overwritten at the switch level? > > On Sun, Dec 19, 2010 at 4:46 PM, Derek Cormier > wrote: > > Let's say you add a few flows that are exactly the same using > > install_datapath_flow(). Th

Re: [nox-dev] Contributing to Nox

2010-12-27 Thread Derek Cormier
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.

Re: [nox-dev] Contributing to Nox

2010-12-26 Thread Derek Cormier
Great. Should I post any future changes here on the Nox board or send them to a developer like yourself? -Derek On 12/27/2010 02:54 PM, kk yap wrote: Hi Derek, Thanks. I pushed this to destiny (unstable). Regards KK On 26 December 2010 16:56, Derek Cormier <mailto:derek.c

Re: [nox-dev] Contributing to Nox

2010-12-26 Thread Derek Cormier
Woops! I'm not sure how it happened but I somehow messed up the patch file. Please use this attached one instead. -Derek On 12/27/2010 09:48 AM, Derek Cormier wrote: Hi KK, I've attached the patch. Sorry for taking so long to reply, I was away for the holidays. The patch is for

Re: [nox-dev] Contributing to Nox

2010-12-26 Thread Derek Cormier
rballed? Sorry Gmail reformats things a little, so the git-format-patch output is distorted. Regards KK On 21 December 2010 23:38, Derek Cormier wrote: Hello, I would like to start contributing to the Nox code. This is my first time contributing to open source software, and I'm still new to git,

[nox-dev] Contributing to Nox

2010-12-21 Thread Derek Cormier
et me know if I didn't do this right. Thanks! Derek From ea590df29ae342bb9029b90829fa1ddf3ff36d10 Mon Sep 17 00:00:00 2001 From: Derek Cormier Date: Wed, 22 Dec 2010 16:18:33 +0900 Subject: [PATCH] Allow python components to register for error events through a class method. --- src/nox

[nox-dev] nox and cookies

2010-12-21 Thread Derek Cormier
Does Nox use a flow entry's cookie field? Or, can we use it for our own purposes? Thanks -Derek ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org

Re: [nox-dev] Is flow mod event misleading?

2010-12-19 Thread Derek Cormier
On 19 December 2010 21:10, Derek Cormier wrote: I noticed that the flow mod event fires in response to a successful NOX API call for adding a flow. It gives the impression that it was successfully added to the switch, but, this is not always the case. For example, if I send two identical ofp_flo

[nox-dev] Is flow mod event misleading?

2010-12-19 Thread Derek Cormier
I noticed that the flow mod event fires in response to a successful NOX API call for adding a flow. It gives the impression that it was successfully added to the switch, but, this is not always the case. For example, if I send two identical /ofp_flow_mod/ requests with the *OFPFF_CHECK_OVERLAP*

[nox-dev] Telling Like Flows Apart

2010-12-19 Thread Derek Cormier
Let's say you add a few flows that are exactly the same using /install_datapath_flow()/. Then, you do a flow stats request for that flow. The response body should contain an array of flow stats- one for each flow. Is there any way to know which stats element belongs to which flow? Is the first

Re: [nox-dev] Help modifying some Nox code for the first time

2010-12-17 Thread Derek Cormier
at on the way out in pycontext.cc. -Derek On 12/17/2010 04:07 PM, Derek Cormier wrote: It works =) On 12/17/2010 04:03 PM, Murphy McCauley wrote: Ugh, I have actually been sitting on a patch forever that add support for xids all the way through Python; I really should nail it down and comm

Re: [nox-dev] Help modifying some Nox code for the first time

2010-12-16 Thread Derek Cormier
, at 10:52 PM, Derek Cormier wrote: Hello, I'm modifying some Nox code so that core.py's *install_datapath_flow* takes another argument- the xid for the flow mod request. def install_datapath_flow(self, dp_id, attrs, idle_timeout, hard_timeout, actions,

[nox-dev] Help modifying some Nox code for the first time

2010-12-16 Thread Derek Cormier
Hello, I'm modifying some Nox code so that core.py's *install_datapath_flow* takes another argument- the xid for the flow mod request. def install_datapath_flow(self, dp_id, attrs, idle_timeout, hard_timeout, actions, buffer_id=None,

Re: [nox-dev] "ERR:Application 'python' description not found" when running latest NOX

2010-12-16 Thread Derek Cormier
Did you call the configure script with python? ./configure --with-python=yes -Derek On 12/17/2010 10:18 AM, Stephen Wong wrote: Hi, I just compiled NOX from the latest repository (make/make check/make install all succeed), but when I tried to run it, I got the following error: openf...@

Re: [nox-dev] Associate xid with a flow mod event

2010-12-15 Thread Derek Cormier
@KK It turns out I made a wrong assumption. I thought that when an ofp_flow_mod (OFPFC_ADD) message was sent, it returns a reply with the same xid. After looking at the OF protocol, it looks like a message is only sent back if an error occurred. @Rob The cookie isn't quite what I'm looking fo

[nox-dev] Associate xid with a flow mod event

2010-12-15 Thread Derek Cormier
Hello, When you receive a flow mod event, is there any way to associate it with the xid of the original request that caused it? I'm looking for a way to confirm that a specific request generated a specific response. For example, if multiple components are running and they both send a packet t

[nox-dev] Making the repository available via HTTP

2010-12-13 Thread Derek Cormier
Dear Nox devs, If possible, would you consider making the git repository available via HTTP? The proxy at my work (and perhaps others') blocks git requests. Thank you, Derek ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/li

Re: [nox-dev] Error feedback from adding flows

2010-12-13 Thread Derek Cormier
a handler for that. For the details of Error_event, please see include/error-event.hh On Fri, Dec 10, 2010 at 12:12 AM, Derek Cormier wrote: Hello, I'm looking for a way to see if adding a flow failed. In the OpenFlow protocol, it says an ofp_error_msg message is returned. Is there

[nox-dev] Error feedback from adding flows

2010-12-10 Thread Derek Cormier
Hello, I'm looking for a way to see if adding a flow failed. In the OpenFlow protocol, it says an ofp_error_msg message is returned. Is there any event I can register for to catch this? I would also like to catch an error of type OFPET_FLOW_MOD_FAILED. I'm using a python component. Thanks! -

Re: [nox-dev] Help creating a flow

2010-12-02 Thread Derek Cormier
Oh, that's embarrasing! I was using body.port_no instead of body.out_port. It works now. -Derek On 12/03/2010 10:34 AM, Derek Cormier wrote: I registered for flow mod events and the event shows the flow being added. I can also see the flow through Open vSwitch. I'm not receiving

Re: [nox-dev] Help creating a flow

2010-12-02 Thread Derek Cormier
I registered for flow mod events and the event shows the flow being added. I can also see the flow through Open vSwitch. I'm not receiving any errors, so the request is in the correct format. Could it be a problem with Open vSwitch? Request == request = ofp_stats_request() req

Re: [nox-dev] Help creating a flow

2010-11-30 Thread Derek Cormier
quest. and also looks the same as some code that I have that's working.. the only difference is that I'm using body.match.wildcards = 0x although that shouldn't make a difference. But if you want you can try it out On Tue, Nov 30, 2010 at 5:56 PM, Derek Cormie

Re: [nox-dev] Help creating a flow

2010-11-30 Thread Derek Cormier
d and send your stats request? On Tue, Nov 30, 2010 at 5:48 PM, Derek Cormier mailto:derek.corm...@lab.ntt.co.jp>> wrote: Interesting. I used Open vSwitch's ovs-ofctl dump-flows and I can see the flow. I am waiting three seconds after installing the flow before requesting th

Re: [nox-dev] Help creating a flow

2010-11-30 Thread Derek Cormier
using dpctl to verify that it is empty? ( could it be the timing? are you sending the request right after you send the flowmod?) On Tue, Nov 30, 2010 at 5:33 PM, Derek Cormier mailto:derek.corm...@lab.ntt.co.jp>> wrote: Oh, and I forgot to mention that I am sending a flow stats reques

Re: [nox-dev] Help creating a flow

2010-11-30 Thread Derek Cormier
Oh, and I forgot to mention that I am sending a flow stats request. On 12/01/2010 10:30 AM, Derek Cormier wrote: Hello, I am trying to add a flow to a switch in my Nox component. After the switch joins the datapath, I create a simple flow to test that it works: flow = dict() flow[NW_PROTO

[nox-dev] Help creating a flow

2010-11-30 Thread Derek Cormier
Hello, I am trying to add a flow to a switch in my Nox component. After the switch joins the datapath, I create a simple flow to test that it works: flow = dict() flow[NW_PROTO] = UDP_PROTOCOL self.install_datapath_flow(dpid, flow, OFP_FLOW_PERMANENT, OFP_FLOW_PERMANENT, [[OFPAT_OUTPUT, [0, O

Re: [nox-dev] Arguments For Components

2010-11-29 Thread Derek Cormier
Hi Derek, In C/C++, jsonmessenger provides an example. Regards KK On 29 November 2010 17:57, Derek Cormier wrote: Hi Kyriakos, I was looking to send arguments when running ./nox_core. I just found the documentation on the Wiki, but it's not clear on how to access the arguments fro

Re: [nox-dev] Arguments For Components

2010-11-29 Thread Derek Cormier
component. (If you use the GUI from destiny, you can type a json command in the console and direct it to any component) On Mon, Nov 29, 2010 at 4:48 PM, Derek Cormier mailto:derek.corm...@lab.ntt.co.jp>> wrote: Is there any way to send command line arguments to Nox components? T

[nox-dev] Arguments For Components

2010-11-29 Thread Derek Cormier
Is there any way to send command line arguments to Nox components? Thanks, Derek ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org

[nox-dev] Finding out the switches connected to NOX

2010-11-24 Thread Derek Cormier
If I write a NOX component in python, are there any methods for returning the datapath ID of all connected switches? As I was browsing through the core API and components, I saw that many methods take a dpid, but I couldn't find any for retrieving them in the first place. Thanks, -Derek _

Re: [nox-dev] TCP Server in NOX Component

2010-11-22 Thread Derek Cormier
l you need is the following in the install() method: factory = Factory() factory.protocol = QOTD reactor.listenTCP(8007, factory) -- Murphy On Nov 21, 2010, at 11:57 PM, Derek Cormier wrote: Hello, I am trying to run a thread inside of a python NOX component using twisted that listen

[nox-dev] TCP Server in NOX Component

2010-11-22 Thread Derek Cormier
Hello, I am trying to run a thread inside of a python NOX component using twisted that listens for TCP connections. I added code to pyswitch.py to see if I could get it working. However, I am getting this seg fault from NOX. It seems to be failing at 'reactor.listenTCP(8007, factory)'. Any id

Re: [nox-dev] Cannot access repository

2010-11-11 Thread Derek Cormier
Regards KK On 11 November 2010 16:25, Derek Cormier wrote: Hmm, the same thing happens with that address: Initialized empty Git repository in /home/derek/VirtualBoxShared/Switch/Code/nox/.git/ fatal: http://noxrepo.org/nox/info/refs not found: did you run git update-server-info on the serve

Re: [nox-dev] Cannot access repository

2010-11-11 Thread Derek Cormier
Hmm, the same thing happens with that address: Initialized empty Git repository in /home/derek/VirtualBoxShared/Switch/Code/nox/.git/ fatal: http://noxrepo.org/nox/info/refs not found: did you run git update-server-info on the server? On 11/12/2010 03:22 AM, Upthegrove, Timothy A wrote: Try

[nox-dev] Cannot access repository

2010-11-11 Thread Derek Cormier
Hello, Whenever I try to clone the repository using: git clone http://noxrepo.org/noxcore I get the following error: Initialized empty Git repository in /home/derek/VirtualBoxShared/Switch/Code/noxcore/.git/ fatal: http://noxrepo.org/noxcore/info/refs not found: did you run git update-server

[nox-dev] Problem Installed NOX: make check

2010-11-01 Thread Derek Cormier
Hello, I was able to build NOX, but I get some errors when running 'make check'. I found a poster with the exact same problem as me , but I could not find a solution (http://www.mail-archive.com/nox-dev@noxrepo.org/msg00495.html). Here is some of my output (everything above this is good):