Hi all,
Today I want handle flow remove event,
So I modify add_flow function from simple_switch_13.py
Let
mod = parser.OFPFlowMod(datapath=datapath, priority=priority,
buffer_id=buffer_id,
match=match, instructions=inst,
idle_timeout=idle_timeout,
hard_timeout=hard_timeout,
flags=datapath.ofproto.OFPFF_SEND_FLOW_REM)
but I run the controller, and I got an error that I can't understand why.
The error message:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/ryu/base/app_manager.py", line
290, in _event_loop
handler(ev)
File "/home/ntl/PycharmProjects/sdntest/m_simple_switch_13.py", line 325,
in _packet_in_handler
self.add_flow(datapath, 10, match, actions, needREM=True)
File "/home/ntl/PycharmProjects/sdntest/m_simple_switch_13.py", line 140,
in add_flow
datapath.send_msg(mod)
File
"/usr/local/lib/python3.4/dist-packages/ryu/controller/controller.py", line
333, in send_msg
msg.serialize()
File
"/usr/local/lib/python3.4/dist-packages/ryu/ofproto/ofproto_parser.py", line
211, in serialize
self._serialize_body()
File
"/usr/local/lib/python3.4/dist-packages/ryu/ofproto/ofproto_v1_3_parser.py",
line 2649, in _serialize_body
self.out_group, self.flags)
File "/usr/local/lib/python3.4/dist-packages/ryu/lib/pack_utils.py", line
25, in msg_pack_into
buf += struct.pack(fmt, *args)
struct.error: required argument is not an integer
So I tried
mod = parser.OFPFlowMod(datapath=datapath, priority=priority,
buffer_id=buffer_id,
match=match, instructions=inst,
idle_timeout=idle_timeout,
hard_timeout=hard_timeout,
flags=1)
same error too.
I really don't get it why.
Please help, thanks!
Nathaniel Chen
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel