<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Weird, not sure how that happened. I think you can just change the "n" argument to "part", but that code is actually right around some other work I've been doing in betta's libopenflow, so I've just pushed my latest libopenflow which also addresses this.<div><br></div><div>-- Murphy<div> <br><div><div>On Oct 6, 2012, at 10:47 AM, Tmusic wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<br><br>Thank you very much!!<br>Topology and discovery are working.<br>Flow stats are working.<br><br>Port stats still give errors:<br>Request goes well and the switch responds (checked with wireshark).<br>I think it happens while parsing the received packet.<br>
<br>Traceback (most recent call last):<br> File "/home/openflow/pox_workspace/OFcontroller/pox/openflow/of_01.py", line 835, in run<br> if con.read() is False:<br> File "/home/openflow/pox_workspace/OFcontroller/pox/openflow/of_01.py", line 700, in read<br>
msg.unpack(self.buf)<br> File "/home/openflow/pox_workspace/OFcontroller/pox/openflow/libopenflow_01.py", line 2332, in unpack<br> self.body.append(n)<br>NameError: global name 'n' is not defined<br>
<br><br>This the wireshark analysis of the port stats response:<br><br>Frame 4515: 496 bytes on wire (3968 bits), 496 bytes captured (3968 bits)<br>Linux cooked capture<br>Internet Protocol, Src: 127.0.0.1 (127.0.0.1), Dst: 127.0.0.1 (127.0.0.1)<br>
Transmission Control Protocol, Src Port: 53590 (53590), Dst Port: 6633 (6633), Seq: 269, Ack: 353, Len: 428<br>OpenFlow Protocol<br> Header<br> Version: 0x01<br> Type: Stats Reply (CSM) (17)<br> Length: 428<br>
Transaction ID: 14<br> Stats Reply<br> Type: Physical port statistics (0x0004)<br> Flags: 0<br> Port Stats<br> Port #: 3<br> # Received packets: 6<br> # Transmitted packets: 88<br>
# Received bytes: 468<br> # Transmitted bytes: 3608<br> # RX dropped: 0<br> # TX dropped: 0<br> # RX errors: 0<br> # TX errors: 0<br> # RX frame errors: 0<br>
# RX overrun errors: 0<br> # RX CRC errors: 0<br> # Collisions: 0<br> Port Stats<br> Port #: 2<br> # Received packets: 6<br> # Transmitted packets: 79<br>
# Received bytes: 468<br> # Transmitted bytes: 3239<br> # RX dropped: 0<br> # TX dropped: 0<br> # RX errors: 0<br> # TX errors: 0<br> # RX frame errors: 0<br>
# RX overrun errors: 0<br> # RX CRC errors: 0<br> # Collisions: 0<br> Port Stats<br> Port #: Local (local openflow "port")<br> # Received packets: 0<br>
# Transmitted packets: 0<br> # Received bytes: 0<br> # Transmitted bytes: 0<br> # RX dropped: 0<br> # TX dropped: 0<br> # RX errors: 0<br> # TX errors: 0<br>
# RX frame errors: 0<br> # RX overrun errors: 0<br> # RX CRC errors: 0<br> # Collisions: 0<br> Port Stats<br> Port #: 1<br> # Received packets: 6<br>
# Transmitted packets: 72<br> # Received bytes: 468<br> # Transmitted bytes: 2952<br> # RX dropped: 0<br> # TX dropped: 0<br> # RX errors: 0<br> # TX errors: 0<br>
# RX frame errors: 0<br> # RX overrun errors: 0<br> # RX CRC errors: 0<br> # Collisions: 0<br><br>Thanks,<br><br>Tim<br><br><br><br><div class="gmail_quote">2012/10/6 Murphy McCauley <span dir="ltr"><<a href="mailto:murphy.mccauley@gmail.com" target="_blank">murphy.mccauley@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">All right, yeah, openflow.topology was majorly broken. It should be in somewhat better shape now.<div>
<br></div><div>(I never use it -- it's due for a major overhaul.)</div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span><div><span class="HOEnZb"><font color="#888888">-- Murphy</font></span><div>
<div class="h5"><div><br><div><div>On Oct 6, 2012, at 7:03 AM, Murphy McCauley wrote:</div><br><blockquote type="cite"><div style="word-wrap:break-word">That method was renamed to listen_to_dependencies(). I think it's in there twice. Does renaming it fix everything?<div>
<br></div><div>You'll also need to run openflow.discovery if you want topology discovery, BTW.</div><div><br></div><div>-- Murphy</div><div><div><br><div><div>On Oct 6, 2012, at 5:49 AM, Tmusic wrote:</div><br><blockquote type="cite">
Hi,<br><br>Thanks!<br>I'm indeed running python 32bit in a VM.<br>Betta can run now, but topology discovery is not working.<br>When running the topology and openflow.topology components, I get following error:<br><br>
Traceback (most recent call last):<br>
File "/home/openflow/pox_workspace/OFcontroller/pox/boot.py", line 447, in boot<br> if _do_launch(argv):<br> File "/home/openflow/pox_workspace/OFcontroller/pox/boot.py", line 187, in _do_launch<br>
f(**params)<br> File "/home/openflow/pox_workspace/OFcontroller/pox/openflow/topology.py", line 316, in launch<br> core.register("openflow_topology", OpenFlowTopology())<br> File "/home/openflow/pox_workspace/OFcontroller/pox/openflow/topology.py", line 66, in __init__<br>
if not core.listenToDependencies(self, self._wantComponents):<br> File "/home/openflow/pox_workspace/OFcontroller/pox/core.py", line 481, in __getattr__<br> raise AttributeError("'%s' not registered" % (name,))<br>
AttributeError: 'listenToDependencies' not registered<br><br>Topology seems to be ok, but PyDev indicates an unresolved import in openflow.topology (xid_generator).<br><br>Any ideas?<br><br>Thanks,<br><br>Tim<br>
<br>
<br><div class="gmail_quote">2012/10/5 Murphy McCauley <span dir="ltr"><<a href="mailto:murphy.mccauley@gmail.com" target="_blank">murphy.mccauley@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Oct 5, 2012, at 1:34 PM, Murphy McCauley wrote:<br>
>> Betta (0ca0a8b5b5726195aa2c69337af98a146308dab9) always gives following error (no matter which components are loaded):<br>
> ...<br>
>> File "/home/openflow/temp_repo/poxrefbetta/pox/openflow/libopenflow_01.py", line 51, in xid_generator<br>
>> return chain.from_iterable(repeat(xrange(start,stop+1))).next<br>
>> OverflowError: Python int too large to convert to C long<br>
><br>
> Oh, weird. I guess you're running a 32 bit Python? Try knocking the +1 off the second arg to xrange and seeing if that fixes it.<br>
<br>
</div>Yeah, I confirmed this was a 32 bit issue. I've pushed a fix. Thanks for the report.<br>
<span><font color="#888888"><br>
-- Murphy</font></span></blockquote></div><br>
</blockquote></div><br></div></div></div></blockquote></div><br></div></div></div></div></div></blockquote></div><br>
</blockquote></div><br></div></div></body></html>