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==0x3fffff should be working too. Something to look into, thanks for 
> bringing it up.
> 
> On Mon, Feb 21, 2011 at 5:35 PM, Malveeka Tewari <[email protected]> wrote:
> Setting flow.wildcards  = 0xffffffff solved the problem :-)
> 
> Thanks!
> 
> ----- Original Message -----
> From: "Kyriakos Zarifis" <[email protected]>
> To: [email protected]
> Cc: [email protected], "Murphy McCauley" <[email protected]>
> Sent: Monday, February 21, 2011 5:01:52 PM GMT -08:00 US/Canada Pacific
> Subject: Re: [nox-dev] Getting individual flow stats for an python app
> 
> So the thing is that flow.wildcard definitely needs to be at least 0x3fffff 
> (and not 0xffff, 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 should be equal to 0x3fffff, or 4194303) should cover it.
> 
> As a fast check, could you try manually setting flow.wildcard = 0xffffffff
> just to make sure that it's a wildcard issue?
> 
> 
> On Mon, Feb 21, 2011 at 2:58 PM, <[email protected]> wrote:
> Even with flow.wildcard = openflow.OFPFW_ALL the counters seem to be zero .. 
> :(
> 
> 
> ----- Original Message -----
> From: "Kyriakos Zarifis" <[email protected]>
> To: [email protected]
> Cc: [email protected], "Murphy McCauley" <[email protected]>
> Sent: Monday, February 21, 2011 2:47:10 PM GMT -08:00 US/Canada Pacific
> Subject: Re: [nox-dev] Getting individual flow stats for an python app
> 
> 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, <[email protected]> wrote:
> 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 the (src_mac, dst_mac) pair matches.
> 
> However, when I request for aggregate flow stats from the nox controller, it 
> does not show any flows
> 
> 00117|openflow-event|DBG:received stats reply from 00ffca7e3ad4
> Aggregate stats in from datapath 00.:ff:ca:7e:3a:d4
>       {'packet_count': 0L, 'byte_count': 0L, 'flow_count': 0L}
> 
> This is how I am requesting for aggregate flow stats
>  def aggregate_timer(self, dpid):
>         flow = ofp_match()
>         flow.wildcards = 0xffff
>         self.ctxt.send_aggregate_stats_request(dpid, flow,  0xff)
>         self.post_callback(MONITOR_TABLE_PERIOD, lambda : 
> self.aggregate_timer(dpid))
> 
> But running ovs-ofctl on the switch does show that there are flows in the 
> forwarding table.
> 
> Jan 02 11:25:34|00001|ofctl|INFO|connecting to 
> unix://var/run/openvswitch/ful0.mgmt
> stats_reply (xid=0xe9c1a): flags=none type=2(aggregate)
>  packet_count=414 byte_count=42228 flow_count=2
> 
> I am not sure why sending a request from the nox controller does not give the 
> correct response. I don't know if that's a bug with the switch's 
> implementation or nox or I am doing something wrong while requesting for 
> stats.
> The following thread leads me to believe that I am missing something but I am 
> not sure what.
> https://mailman.stanford.edu/pipermail/openflow-spec/2010-February/000890.html
> 
> Any thoughts ?
> 
> Thanks!
> Malveeka
> 
> 
> 
> 
> ----- Original Message -----
> From: "Kyriakos Zarifis" <[email protected]>
> To: "Murphy McCauley" <[email protected]>
> Cc: "Malveeka Tewari" <[email protected]>, [email protected]
> Sent: Monday, February 21, 2011 1:10:42 PM GMT -08:00 US/Canada Pacific
> Subject: Re: [nox-dev] Getting individual flow stats for an python app
> 
> 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 Mon, Feb 21, 2011 at 8:44 AM, Murphy McCauley <[email protected]> wrote:
> 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 switch 
> to the destiny branch, or look at the relevant patch to destiny 
> (21e3bf59aca5d3df8e86bcd09cc9156a66866f7f) which should demonstrate how to 
> register a callback for flow stats events (it's not particularly hard -- 
> basically you call register_handler with 
> Flow_stats_in_event.static_get_name() as the first parameter).
> 
> Hope that helps.
> 
> -- Murphy
> 
> On Feb 21, 2011, at 8:30 AM, Malveeka Tewari wrote:
> 
> 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 the handler for individual flow stat seems to be missing.  
> 
> Any suggestions on how can I extend the functionality to handle flow stats 
> event in a python nox app.
> 
> Thanks!
> Malveeka
> _______________________________________________
> nox-dev mailing list
> [email protected]
> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
> 
> 
> _______________________________________________
> nox-dev mailing list
> [email protected]
> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
> 
> 
> 
> 
> 

_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org

Reply via email to