|
From: | William D. Anderson |
Subject: | [lwip-users] (no subject) |
Date: | Fri, 24 May 2013 02:50:43 +0000 |
Hello, I have been beating my head against an issue related to losing netconn buffers and hoped someone on the list might shed some light as to what I should look out for. I have lwip up and running and it responds very reliably to external arp and ping traffic. When I originate pings I can currently send only 8 ping requests using either Sockets or Raw api. On the 9th request I can no longer allocate a socket or pbuf depending on the mode being used. When I use socket API for each socket request I call sys_thead_new. After processing each ping I either call lwip_close(s) or raw_remove(ping_pcb) respectively; I am using Xilinix provide lwip140_v1_03_a with xilkernel. Example debug output below shows one good request followed by failing request. I hope I Am correct to assume that I can open and close then reuse raw sockets and raw_pcbs ? Any help greatly appreciated.
Thanks
pingloop c0a8000b cnt = 8 pinghost c0a8000b Ping w socket Dst IP c0a8000b sys_thread_new funcp 0xF0005C34 arg 0xF013EAA1 stacksz 2048 prior 2 lwip_socket(PF_INET, SOCK_RAW, 1) = 7 lwip_setsockopt(7, SOL_SOCKET, UNIMPL: optname=0x1006, ..) Ping Valid IP Str 0x0B00A8C0 lwip_sendto(7, data="" short_size=40, flags=0x0 to=192.168.0.11 port=0 ping: send 192.168.0.11 lwip_recvfrom(7, 0xf0186a94, 40, 0x0, ..) lwip_recvfrom: top while sock->lastdata=0x0 lwip_recvfrom: netconn_recv err=0, netbuf=0xf009ab7c lwip_recvfrom: buflen=60 len=40 off=0 sock->lastoffset=0 lwip_recvfrom(7): addr=192.168.0.11 port=1 len=60 lwip_recvfrom: deleting netbuf=0xf009ab7c ping: recv 168.192.6.240 0 ms pinlwip_recvfrom: netconn_recv err=0, netbuf=0xf009aafc lwip_recvfrom: buflen=60 len=40 off=0 sock->lastoffset=0 lwiplwip_recvfrom: netconn_recv err=0, netbuf=0xf009ac3c lwip_recvfrom: buflen=60 len=40 off=0 sock->lastoffset=0 lwip_lwip_recvfrom: netconn_recv err=0, netbuf=0xf009abbc lwip_recvfrom: buflen=60 len=40 off=0 sock->lastoffset=0 lwip_recvfrom(4): addr=192.168.0.11 port=1lwip_recvfrom: netconn_recv err=0, netbuf=0xf009abfc lwip_recvfrom: buflen=60lwip_recvfrom: netconn_recv err=0, netbuf=0xf009ac7c lwip_recvfrom: buflen=60 len=40 off=0 sock->lastoffset=0 lwip_recvfrom(2): addr=192.168.0.11 port=1 len=60lwip_recvfrom: netconn_recv err=0, netbuf=0xf009ab3c lwip_recvfrom: bulwip_recvfrom: netconn_recv err=0, netbuf=0xf009aabc lwip_recvfrom: buflen=60 len=40 off=0 sock->lastoffset=0 lwip_recvfrom(0): addr=192.168.0.11 port=1 len=60 lwip_recvfrom: deleting netbuf=0xf009aabc ping: recv 168.192.6.240 0g: recv lwip_recvfrom(7, 0xf0186a94, 40, 0x0, ..) lwip_recvfrom: top while sock->lastdata=0x0 _recvfrom: top while sock->lastdata=0x0 en=60 lwip_recvfrom: deleting netbuf=0xf009aafc ping: recv 168.192.6.240 0 ms ping: drop lwrecvfrom(6, 0xf017ea94, 40, 0x0, ..) 0 en=60 lwip_recvfrom: deleting netbuf=0xf009ac3c ping: recv 168.192.6.240 len=60 lwip_recvfrom: deleting netbuf=0xf009abbc ping: recv 168.192.6.240 0 ms ping: drop lwip_recvfrom(4, 0xf0 94, 40, 0x0, ..) 0 en=60 fset=0 lwip_recvfrom(3): addr=192.168.0.11 port=1 len=60 lwip_recvfrom: deleting netb lwip_recvfrom: deleting netbuf=0xf009ac7c ping: recv 168.192.6.240 0 ms ping: drop lwip_recvfrom(2, 0xf015ea94,fxf015ea94, 40, 0x0, ..) len=60 fset=0 lwip_recvfrom(1): addr=192.168.0.11 port=1 len=60 lwip_recvfrom: deletin bufping: drop lwip_recvfrom(0, 0xf014ea94, 40, 0x0, ..) lwip_recvfrom: top while sock->lastdata=0x0 ip_recvfrom:0ock-ping: drop lwip_recvfrom(5, 0xf0176a94, 40, 0x0, ..) lwip_recvfrom: top while sock->lastdata=0x0 1le sock->lastdata=0xlwip_recvfrom: top while sock->lastdata=0x0 u->lastdata=0xping: recv 168.192.6.240 0 ms ping: drop lwip_recvfrom(3, 0xf0166a94, 40, 0x0, ..) lwip_recvfrom: top while sock->lastdata=0x0 ->lastdata=0xlwip_recvfrom: top while sock->lastdata=0x0 ge sock->lastdata=0xping: recv 168.192.6.240 0 ms ping: drop lwip_recvfrom(1, 0xf0156a94, 40, 0x0, ..) lwip_recvfrom: top while sock->lastdata=0x0 top while sock->lastdata=0xlwip_recvfrom: top while sock->lastdata=0x0 sys_thread_new done ping: arp lookup ok 0 90-E2-BA-2E-E5-7C pingloop c0a8000b cnt = 9 pinghost c0a8000b Ping w socket Dst IP c0a8000b sys_thread_new funcp 0xF0005C34 arg 0xF013EAA1 stacksz 2048 prior 2 lwip_socket(PF_INET, SOCK_RAW, 1) = -1 / ENOBUFS (could not create netconn) sys_thread_new done |
[Prev in Thread] | Current Thread | [Next in Thread] |