Hello,

I try something similar and I am unable to match the flows.

In datapath_join I install a flow:

actions = [[openflow.OFPAT_OUTPUT, [0, 2]]]
        flow ={}
        flow[core.IN_PORT] = 1
        flow[core.DL_TYPE]=0x0800
        flow[core.NW_SRC] =  str((10<<24) + (92<<16) + 100)
        self.install_datapath_flow(dpid, flow, openflow.OFP_FLOW_PERMANENT,
openflow.OFP_FLOW_PERMANENT, actions, None, openflow.OFP_DEFAULT_PRIORITY,
None, None)


on the switch using dpctl I receive :
cookie=0, duration_sec=11s, duration_nsec=874000000s, table_id=0,
priority=65535, n_packets=1, n_bytes=60,
idle_timeout=15,hard_timeout=0,tcp,in_port=1,dl_vlan=0xffff,dl_vlan_pcp=0x00,dl_src=00:26:b9:69:2a:5b,dl_dst=00:1d:7e:1b:0f:7a,nw_src=10.92.0.100,nw_dst=10.92.0.3,nw_tos=0x00,tp_src=6633,tp_dst=37479,actions=LOCAL


I try to match it in the aggregated stats:
def aggregate_timer(self, dpid):
        flow = ofp_match()
        flow.wildcard = 0xffffffff
        flow.nw_src = (10<<24) + (92<<16) + 100
        self.ctxt.send_aggregate_stats_request(dpid, flow,  0xff)
        self.post_callback(MONITOR_TABLE_PERIOD, lambda :
self.aggregate_timer(dpid))


but the statistics received are empty. Do you have any idea where I
inserted a mistake?

Thank you a lot!!!
Diana



On Thu, Mar 8, 2012 at 2:12 PM, Murphy McCauley <[email protected]> wrote:

> In order for NW_DST to be valid, you must set DL_TYPE to 0x0800 (IP).
>
> -- Murphy
>
> On Mar 8, 2012, at 4:52 AM, bbs wrote:
>
>  Hi,
>
> I want to insert some flow-entries into the openflow-switch from the NOX,
> so I write some program using python, and a part of the program is as
> follows.
>
> flow = { }
> flow[core.NW_DST] = ipstr_to_int("10.0.0.1")
> flow[core.NW_DST_N_WILD] = 8
> actions = [[openflow.OFPAT_OUTPUT, [0, 2]]]
> inst.install_datapath_flow(dpid, flow, CACHE_TIMEOUT,
> openflow.OFP_FLOW_PERMANENT, actions)
>
> but the flow-entry inserted into the openflow-switch is not what I
> wanted. the flow-entry is as follows.
>
> cookie=0, duration_sec=10870s, duration_nsec=7250000s, table_id=1,
> priority=32768, n_packet=254, n_bytes=9402, idle_timeout=0, hard_timeout=0,
> actions=output:2
>
> could someone tell me why? and how to make it ?
>
> thanks a lot!
>
> John
>
>
> ------------------------------
> 三八节,网易微博替男人伸冤!<http://pub.t.163.com/special/weibotupian/3838.html?from=mail>
>
>
>

Reply via email to