Hi, Murphy Thank you for your suggestion, I use wireshark to examine the flow mod, but I can't get any useful information. It doesn't matter, I will keep checking. Now I have two question: 1) When I execute the nox and openflow, what environment configuration do I have to set up? For example: network configuration.
2) I traceback error message about "ofdatapath: lib/ofpbuf.c:168: ofpbuf_prealloc_headroom: Assertion `size <= ofpbuf_headroom(b)' failed.", so I edit ofpbuf_prealloc_headroom and print out the headroom value, just see below: *******************lib/ofpbuf.c************************** void ofpbuf_prealloc_headroom(struct ofpbuf *b, size_t size) { --------------------------modificiation-------------------------------- printf("headroom value: %d\n",ofpbuf_headroom(b)); assert(0 <= ofpbuf_headroom(b)); ---------------------------------------------------------------------------- //assert(size <= ofpbuf_headroom(b)); original } ********************************************************* -----------------------------------------error message------------------------------------------- headroom value: 130 headroom value: 130 headroom value: 0 *** glibc detected *** ofdatapath: double free or corruption (out): 0x081bca18 *** *** glibc detected *** ofdatapath: corrupted double-linked list: 0x081bc9e0 *** ======= Backtrace: ========= /lib/libc.so.6[0x42887ab6] /lib/libc.so.6[0x42889d17] /lib/libc.so.6(__libc_calloc+0xba)[0x4288bbaa] /lib/ld-linux.so.2[0x4280b5eb] /lib/ld-linux.so.2[0x42807021] /lib/ld-linux.so.2[0x42808dff] /lib/ld-linux.so.2[0x42812a0c] /lib/ld-linux.so.2[0x4280eda6] /lib/ld-linux.so.2[0x428123f2] /lib/libc.so.6[0x429282e2] /lib/ld-linux.so.2[0x4280eda6] /lib/libc.so.6(__libc_dlopen_mode+0x55)[0x42928495] /lib/libc.so.6[0x429050f9] /lib/libc.so.6(backtrace+0xf3)[0x42905293] /lib/libc.so.6[0x428812a1] /lib/libc.so.6[0x428895a5] /lib/libc.so.6(cfree+0x59)[0x428899e9] ofdatapath(ofpbuf_delete+0x16)[0x805af16] ofdatapath[0x80523ef] ofdatapath(dp_run+0x39f)[0x80531af] ofdatapath(udatapath_cmd+0x615)[0x8054a65] ofdatapath(main+0x22)[0x8054b82] /lib/libc.so.6(__libc_start_main+0xdc)[0x42835e9c] ofdatapath[0x804f8d1] ======= Memory map: ======== 08048000-08079000 r-xp 00000000 08:01 1578384 /usr/local/bin/ofdatapath 08079000-0807b000 rw-p 00031000 08:01 1578384 /usr/local/bin/ofdatapath 0807b000-081c6000 rw-p 00000000 00:00 0 [heap] 42801000-4281c000 r-xp 00000000 08:01 2357240 /lib/ld-2.5.so 4281c000-4281d000 r--p 0001a000 08:01 2357240 /lib/ld-2.5.so 4281d000-4281e000 rw-p 0001b000 08:01 2357240 /lib/ld-2.5.so 42820000-42973000 r-xp 00000000 08:01 2357242 /lib/libc-2.5.so 42973000-42975000 r--p 00152000 08:01 2357242 /lib/libc-2.5.so 42975000-42976000 rw-p 00154000 08:01 2357242 /lib/libc-2.5.so 42976000-42979000 rw-p 00000000 00:00 0 429a6000-429a9000 r-xp 00000000 08:01 2358413 /lib/libdl-2.5.so 429a9000-429aa000 r--p 00002000 08:01 2358413 /lib/libdl-2.5.so 429aa000-429ab000 rw-p 00003000 08:01 2358413 /lib/libdl-2.5.so 43900000-4390b000 r-xp 00000000 08:01 2357180 /lib/libgcc_s-4.1.2-20080825.so.1 4390b000-4390c000 rw-p 0000a000 08:01 2357180 /lib/libgcc_s-4.1.2-20080825.so.1 b7600000-b7621000 rw-p 00000000 00:00 0 b7621000-b7700000 ---p 00000000 00:00 0 b77b8000-b783b000 rw-p 00000000 00:00 0 b7845000-b7847000 rw-p 00000000 00:00 0 b7847000-b7848000 r-xp 00000000 00:00 0 [vdso] bfb38000-bfb4d000 rw-p 00000000 00:00 0 [stack] -------------------------------------------------------------------------------------------------- I find headroom values is "130, 130 and 0" , what are these value mean?why does the last value is 0? Any suggestion will be helpful, Thank you. Yi-Shou --- 11/3/7 (一),Murphy McCauley <jam...@nau.edu> 寫道: 寄件者: Murphy McCauley <jam...@nau.edu> 主旨: Re: [nox-dev] Setting VLAN_ID by nox controller, but it's error 收件者: "false" <ladj...@yahoo.com.tw> 副本: nox-dev@noxrepo.org 日期: 2011年3月7日,一,上午5:20 One last thought is that... you probably also want to have an output action as well as the VLAN action. It could be that the switch assumes there will be one. -- Murphy On Mar 6, 2011, at 9:09 AM, false wrote: Hi, I want setting VLAN_ID to OpenFlow by nox controller, so I edit pyswitch.py, see below: ----------------------------------------------------------------------- def forward_l2_packet(dpid, inport, packet, buf, bufid): dstaddr = packet.dst.tostring() print "test" if not ord(dstaddr[0]) & 1 and inst.st[dpid].has_key(dstaddr) : prt = inst.st[dpid][dstaddr] if prt[0] == inport: log.err('**warning** learned port = inport', system="pyswitch") inst.send_openflow(dpid, bufid, buf, openflow.OFPP_FLOOD, inport) else: # We know the outport, set up a flow log.msg('installing flow for ' + str(packet), system="pyswitch") flow = extract_flow(packet) flow[core.IN_PORT] = inport #actions = [[openflow.OFPAT_OUTPUT, [0, prt[0]]]] #################### modification################## ### actions = [[openflow.OFPAT_SET_VLAN_VID, 2]] ############################## ##################### inst.install_datapath_flow( dpid, flow, CACHE_TIMEOUT, openflow.OFP_FLOW_PERMANENT, actions, bufid, openflow.OFP_DEFAULT_PRIORITY, inport, buf) ------------------------------ ------------------------------ --------------- Then I execute nox controller and OpenFlow Execution in NOX controller: ./nox_core -i ptcp:6633 pyswitch -v Execution in OpenFlow switch: ofdatapath punix:/var/run/testa -d 004E46000000 -i nf2c0,nf2c1,nf2c2,nf2c3 & ofprotocol unix:/var/run/testa --out-of-band --stp tcp:xxx.xxx.xxx.xxx:6633 -l ptcp:5566 Then, I got some errors in OpenFlow: Mar 07 00:35:09|00001|secchan|INFO| OpenFlow reference implementation version 1.0.0 Mar 07 00:35:09|00002|secchan|INFO| OpenFlow protocol version 0x01 Mar 07 00:35:09|00003|secchan|WARN| new management connection will receive asynchronous messages Mar 07 00:35:09|00004|rconn|INFO| unix:/var/run/testa: connecting... Mar 07 00:35:09|00005|rconn|INFO|tcp: xxx.xxx.xxx.xxx:6633: connecting... Mar 07 00:35:09|00006|rconn|INFO| unix:/var/run/testa: connected Mar 07 00:35:09|00007|port_watcher| INFO|Datapath id is 004e46000000 Mar 07 00:35:09|00008|port_watcher| INFO|Identified data path local port as "tap0". ... Mar 07 00:35:09|00013|rconn|INFO|tcp: xxx.xxx.xxx.xxx:6633: connected Mar 07 00:35:09|00001|datapath|WARN| unknown vendor: 0x2320 ... ofdatapath: lib/ofpbuf.c:168: ofpbuf_prealloc_headroom: Assertion `size <= ofpbuf_headroom(b)' failed. Mar 07 00:35:12|00002|fault|EMER| Caught signal 6. 0xbf9425c8 Mar 07 00:35:12|00003|fault|EMER| Caught signal 11. 0x00000000 Mar 07 00:35:12|00018|netdev|ERR| ioctl(SIOCGIFFLAGS) on tap0 device failed: No such device Mar 07 00:35:12|00019|port_watcher| WARN|could not get flags for tap0 Mar 07 00:35:12|00020|netdev|ERR| ioctl(SIOCGIFFLAGS) on tap0 device failed: No such device Mar 07 00:35:12|00021|port_watcher| WARN|could not get flags for tap0 Mar 07 00:35:12|00022|rconn|WARN| unix:/var/run/testa: connection dropped (Connection reset by peer) Mar 07 00:35:13|00023|rconn|INFO| unix:/var/run/testa: connecting... Mar 07 00:35:13|00024|vconn_unix|ERR| /tmp/vconn-unix.7349.1: connection to /var/run/testa failed: Connection refused Mar 07 00:35:13|00025|rconn|WARN| unix:/var/run/testa: connection failed (Connection refused) Mar 07 00:35:13|00026|rconn|INFO| unix:/var/run/testa: waiting 2 seconds before reconnect Can anybody tell me how to solve this problem? Any suggest will be helpful. Thank you. Yi-Shou _______________________________________________ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
_______________________________________________ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev