Aqsa Malik
2016-11-23 15:02:28 UTC
Hi All,
I want to delete a single flow entry from the switch table.
Here are the flow entries in my switch:
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x0, duration=176.841s, table=0, n_packets=0, n_bytes=0,
priority=35,icmp6,ipv6_dst=2001:db8:0:f101::1 actions=output:1
cookie=0x0, duration=176.841s, table=0, n_packets=0, n_bytes=0,
priority=1,icmp6,ipv6_src=2001:db8:0:f101::1
actions=set_field:fe80::200:ff:fe00:1->ipv6_src,output:2
cookie=0x0, duration=176.843s, table=0, n_packets=0, n_bytes=0,
priority=0,arp actions=NORMAL
cookie=0x0, duration=176.841s, table=0, n_packets=0, n_bytes=0,
priority=0,icmp6 actions=CONTROLLER:65509
and here is my code:
table_id=0
parser = datapath.ofproto_parser
ofproto = datapath.ofproto
match = parser.OFPMatch()
instructions = [parser.OFPActionOutput(1)]
dpid=1
priority=35
flow_mod = datapath.ofproto_parser.OFPFlowMod(datapath, cookie=0,
cookie_mask=0, table_id=0, hard_timeout=0, priority=priority,
buffer_id=ofproto.OFPCML_NO_BUFFER, out_port=ofproto.OFPP_ANY,
out_group=ofproto.OFPG_ANY, command=datapath.ofproto.OFPFC_DELETE,
match=match, instructions=instructions)
datapath.send_msg(flow_mod)
but it does not delete any flow entry. Also I am not sure what to add in
the "match" and "instructions".
I want to delete a single flow entry from the switch table.
Here are the flow entries in my switch:
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x0, duration=176.841s, table=0, n_packets=0, n_bytes=0,
priority=35,icmp6,ipv6_dst=2001:db8:0:f101::1 actions=output:1
cookie=0x0, duration=176.841s, table=0, n_packets=0, n_bytes=0,
priority=1,icmp6,ipv6_src=2001:db8:0:f101::1
actions=set_field:fe80::200:ff:fe00:1->ipv6_src,output:2
cookie=0x0, duration=176.843s, table=0, n_packets=0, n_bytes=0,
priority=0,arp actions=NORMAL
cookie=0x0, duration=176.841s, table=0, n_packets=0, n_bytes=0,
priority=0,icmp6 actions=CONTROLLER:65509
and here is my code:
table_id=0
parser = datapath.ofproto_parser
ofproto = datapath.ofproto
match = parser.OFPMatch()
instructions = [parser.OFPActionOutput(1)]
dpid=1
priority=35
flow_mod = datapath.ofproto_parser.OFPFlowMod(datapath, cookie=0,
cookie_mask=0, table_id=0, hard_timeout=0, priority=priority,
buffer_id=ofproto.OFPCML_NO_BUFFER, out_port=ofproto.OFPP_ANY,
out_group=ofproto.OFPG_ANY, command=datapath.ofproto.OFPFC_DELETE,
match=match, instructions=instructions)
datapath.send_msg(flow_mod)
but it does not delete any flow entry. Also I am not sure what to add in
the "match" and "instructions".
--
Aqsa Malik
visit my blog at
http://www.techiworld4u.blogspot.com
Aqsa Malik
visit my blog at
http://www.techiworld4u.blogspot.com