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, at 8:09 PM, [email protected] wrote:

> 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 .. 
> flow1 = {'dl_dst': array('B', [0, 96, 221, 70, 81, 94]), 'dl_src': array('B', 
> [0, 96, 221, 70, 81, 94])}
> flow2 = {'dl_src': array('B', [0, 96, 221, 70, 81, 94])}
> 
> and I invoke install_datapath_flow to insert entries flow flow1 and flow2.
> 
> From what I understand install_datapath_flow internally calls set_match to 
> create the ofp_match object for the flow.
> I even tried creating a ofp_match object for the given flow and passing it to 
> the install_datapath_flow command in place of flow but that gave me an 
> AttributeError
> 
> Following is the traceback.
> 
> Traceback (most recent call last):
>   File "./nox/lib/util.py", line 138, in f
>     ret = f.cb(event.datapath_id, attrs)
>   File "./nox/coreapps/examples/hybriddc.py", line 66, in 
> datapath_join_callback
>     rules.insert_static_rules(inst, dpid, 1)
>   File "./nox/coreapps/examples/staticrules.py", line 38, in 
> insert_static_rules
>     self.insert_rules_pod01(inst, dpid)
>   File "./nox/coreapps/examples/staticrules.py", line 112, in 
> insert_rules_pod01
>     None, None)
>   File "./nox/coreapps/examples/staticrules.py", line 288, in 
> insert_forwarding_rule
>     port, buf)
>   File "./nox/lib/core.py", line 380, in install_datapath_flow
>     (idle_timeout, actions, buffer_id), hard_timeout)
>   File "./nox/lib/core.py", line 253, in send_flow_command
>     m = set_match(attrs)
>   File "./nox/lib/util.py", line 250, in set_match
>     if attrs.has_key(core.IN_PORT):
>   File "./nox/lib/openflow.py", line 756, in <lambda>
>     __getattr__ = lambda self, name: _swig_getattr(self, ofp_match, name)
>   File "./nox/lib/openflow.py", line 54, in _swig_getattr
>     raise AttributeError(name)
> 
> 
> 
> 
> ----- Original Message -----
> From: "Murphy McCauley" <[email protected]>
> To: [email protected]
> Cc: "nox-dev" <[email protected]>
> Sent: Monday, February 21, 2011 7:41:47 PM GMT -08:00 US/Canada Pacific
> Subject: Re: [nox-dev] Matching wildcard flows with different priorities
> 
> 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, 2011, at 6:18 PM, [email protected] wrote:
> 
> 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)
> 
> The flow between src1 and dst1 is correctly being sent on port x. This is 
> expected because flow entry 1 has a higher priority.
> 
> However for a flow between src1 and dst2, the packets  are being sent to the 
> controller instead of being sent out on port y.
> 
> I had expected that since the match will fail for a higher priority flow 
> entry it'll be matched against the lower priority entry and sent out on port 
> y but this doesn't seem to be the case.
> Is this the expected behavior ?
> 
> If so, what should I change so that the flows between src1 and destination 
> other than dst1 are sent out on port y ?
> 
> 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

Reply via email to