Re: [nox-dev] Matching wildcard flows with different priorities

2011-02-21 Thread malveeka
I am using a Fulcrum microsystems switch that has provided an openvswitch implementation for their switches. I need to run ovs-openflowd on the switch that connects to the specified nox controller and supports the standard openvswitch flow insertion rules etc. - Original Message -

Re: [nox-dev] Matching wildcard flows with different priorities

2011-02-21 Thread Kyriakos Zarifis
Hey Malveeka, what kind of switch are you using? (sorry if you mentioned this and I missed it) On Mon, Feb 21, 2011 at 9:08 PM, wrote: > So if I insert the rules in the order flow1, flow2 then you're right flow2 > doesn't get installed . > However, if I insert flow2 and then flow1, both rule d

Re: [nox-dev] Matching wildcard flows with different priorities

2011-02-21 Thread malveeka
So if I insert the rules in the order flow1, flow2 then you're right flow2 doesn't get installed . However, if I insert flow2 and then flow1, both rule do get installed but in that case, even packets that should match flow1 (because it's higher priority) match against flow2 and get forwarded i

Re: [nox-dev] Matching wildcard flows with different priorities

2011-02-21 Thread Murphy McCauley
I think my next step would be to inspect the switch and see if the flows I'm expecting are there (that is... is flow2 actually getting installed?). If you're using the reference switch or Open vSwitch, I'd just use the appropriate dpctl tool to dump the flow table. -- Murphy On Feb 21, 2011,

Re: [nox-dev] Matching wildcard flows with different priorities

2011-02-21 Thread malveeka
I am not building the match by hand. I am specifying the flow as a dictionary and calling the install_datapath_flow method: inst.install_datapath_flow(dpid, flow, CACHE_TIMEOUT, openflow.OFP_FLOW_PERMANENT, actions, bufid, priority, port, buf) where flow is simply a dictionary .. flow

Re: [nox-dev] Matching wildcard flows with different priorities

2011-02-21 Thread Murphy McCauley
The expected behavior is as you expect, not what you're observing. Are you building the match by hand, or are you using set_match() (in util) or something that calls it? If you're building it by hand, are you accounting for byte order in the wildcards field using htonl()? -- Murphy On Feb 21

[nox-dev] Matching wildcard flows with different priorities

2011-02-21 Thread malveeka
Hi I thought I'd start another thread for this issue.. I am inserting the following two flow entries in the switch. 1) match: (src1, dst1, *) , action: send out on port x, priority = 101 (higher priority) 2) match: (src1, *) action: send out on port y, priority = 5 (lower priority) T

Re: [nox-dev] Getting individual flow stats for an python app

2011-02-21 Thread Murphy McCauley
Byte order? -- Murphy On Feb 21, 2011, at 5:53 PM, Kyriakos Zarifis wrote: > Glad it works. Interesting, looking at it now it still looks like > OFPFW_ALL==0x3f should be working too. Something to look into, thanks for > bringing it up. > > On Mon, Feb 21, 2011 at 5:35 PM, Malveeka Tewari

Re: [nox-dev] Getting individual flow stats for an python app

2011-02-21 Thread Kyriakos Zarifis
Glad it works. Interesting, looking at it now it still looks like OFPFW_ALL==0x3f should be working too. Something to look into, thanks for bringing it up. On Mon, Feb 21, 2011 at 5:35 PM, Malveeka Tewari wrote: > Setting flow.wildcards = 0x solved the problem :-) > > Thanks! > > ---

Re: [nox-dev] Getting individual flow stats for an python app

2011-02-21 Thread Malveeka Tewari
Setting flow.wildcards = 0x solved the problem :-) Thanks! - Original Message - From: "Kyriakos Zarifis" To: malve...@cs.ucsd.edu Cc: nox-dev@noxrepo.org, "Murphy McCauley" Sent: Monday, February 21, 2011 5:01:52 PM GMT -08:00 US/Canada Pacific Subject: Re: [nox-dev] Get

Re: [nox-dev] Getting individual flow stats for an python app

2011-02-21 Thread Kyriakos Zarifis
So the thing is that flow.wildcard definitely needs to be at least 0x3f (and not 0x, which I am guessing you got from the monitor.py example, which is actually obsolete and should be updated, as the wildcard field has been changed to 32 bits (actual max length is 22). So OFPFW_ALL (which s

Re: [nox-dev] Getting individual flow stats for an python app

2011-02-21 Thread malveeka
Even with flow.wildcard = openflow.OFPFW_ALL the counters seem to be zero .. :( - Original Message - From: "Kyriakos Zarifis" To: malve...@cs.ucsd.edu Cc: nox-dev@noxrepo.org, "Murphy McCauley" Sent: Monday, February 21, 2011 2:47:10 PM GMT -08:00 US/Canada Pacific Subject: Re: [

Re: [nox-dev] Getting individual flow stats for an python app

2011-02-21 Thread Kyriakos Zarifis
can you try using "flow.wildcards = openflow.OFPFW_ALL" after making sure that nox.lib.openflow has been imported? On Mon, Feb 21, 2011 at 1:37 PM, wrote: > Thanks! > I have another question. > > Using the nox controller , I have inserted forwarding rules such that > packets that match a part

Re: [nox-dev] Getting individual flow stats for an python app

2011-02-21 Thread malveeka
In light of the previous discussion, I also tried tagging the packets with a particular vlan id using the OFPAT.SET_VLAN_VID but I do not see any flow entries being instantiated in the switch. On some more digging, I found that no corresponding method for vlan tagging in nox/nox/src/lib/openf

Re: [nox-dev] Getting individual flow stats for an python app

2011-02-21 Thread malveeka
Thanks! I have another question. Using the nox controller , I have inserted forwarding rules such that packets that match a particular (src_mac, dst_mac) pair be sent out on a particular port. Since this is a wildcard entry, it also matches packets that belong to the null vlan as long as th

Re: [nox-dev] Getting individual flow stats for an python app

2011-02-21 Thread Kyriakos Zarifis
Exactly - there's an example of using this in netapps/monitoring.py (line 188) in destiny, (and you can trace how it's handled etc) If all you need is to print out/look at the flow stats (rather than act on them programatically), and you do switch to destiny, you could use the gui for that. On M

Re: [nox-dev] nox gui

2011-02-21 Thread Kyriakos Zarifis
Hey Shiva, are you sure NOX is running properly? I noticed you mentioned running it with "./nox_core -v -i tcp:6633 monitoring" That should probably be "./nox_core -v -i ptcp:6633 monitoring" ('tcp'->'ptcp'). As long as you have one or more switches trying to connect to NOX after you run this, y

Re: [nox-dev] Getting individual flow stats for an python app

2011-02-21 Thread Murphy McCauley
I believe that the flow stats event is Pythonized in both the zaku and destiny branches -- it's just that a helper method to make the callback easy to register is missing from zaku. A simple register_for_flow_stats_in method DOES exist in the destiny branch, though. So I'd suggest you either s

[nox-dev] Getting individual flow stats for an python app

2011-02-21 Thread Malveeka Tewari
Hi I am writing a python app for the NOX controller and want to obtain flow statistics for individual flows from an openflow switch. I can see that nox supports python callback handlers for handling stats reply for aggregate flows stats, table stats , port stats and desc stats events, but th