lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] RE: [Virtex II Pro] pbuf / DHCP / lwIP upgrade to EDK/upgra


From: Arden Llewellyn
Subject: [lwip-users] RE: [Virtex II Pro] pbuf / DHCP / lwIP upgrade to EDK/upgrade to EDK 9.1i (Louis Filasky) (Goldschmidt Simon)
Date: Mon, 18 Jun 2007 13:00:09 -0700 (PDT)

Simon,

I did a fresh pull from CVS today, changed PBUF_LINK_HLEN to 14 (ETH_PAD_SIZE is 0) and here is what I get in debug for an ICMP ping:

-----------------------ICMP Ping debug---------------------------------------
Calling tcpip_init
sys_timeosys_timeout:xemacif_pkt_ut: 0x269eb4 0x269eb4 mseprocess_thr msecs=1000
 cs=1000 h=0x1ead createdh=0x1f9f4 arf9f4 arg=0x0
g=0x0

sys_timeout: 0x269ea4 msecs=5000 h=0x1f9b4 arg=0x0
D- NO_SYS == 0
netif_set_ipaddr: netif address being changed
netif: IP address of interface  set to 151.190.95.120
netif: netmask of interface  set to 255.255.255.0
netif: GW address of interface  set to 0.0.0.0
netif: added interface e0 IP addr 151.190.95.120 netmask 255.255.255.0 gw 0.0.0.
0
netif: setting default interface e0
tcpip_thread: API message 0x2ee5a4
lwip_socket(PF_INET, SOCK_STREAM, 0) = 0
lwip_bind(0, addr=151.190.95.120 port=10001)
tcpip_thread: API message 0x2ee59c
tcp_bind: bind to port 10001
lwip_bind(0) succeeded
lwip_listen(0, backlog=5)
tcpip_thread: API message 0x2ee5bc
I- SOCKET: Accepting a new connection...
lwip_accept(0)...
smf calling h=0x1f9f4(0x0)
tcpip: ip_reass_tmr()
sys_timeout: 0x269eb4 msecs=1000 h=0x1f9f4 arg=0x0
smf calling h=0x1f9f4(0x0)
tcpip: ip_reass_tmr()
sys_timeout: 0x269eb4 msecs=1000 h=0x1f9f4 arg=0x0
smf calling h=0x1f9f4(0x0)
tcpip: ip_reass_tmr()
sys_timeout: 0x269eb4 msecs=1000 h=0x1f9f4 arg=0x0
smf calling h=0x1f9f4(0x0)
tcpip: ip_reass_tmr()
sys_timeout: 0x269eb4 msecs=1000 h=0x1f9f4 arg=0x0
smf calling h=0x1f9b4(0x0)
tcpip: etharp_tmr()
sys_timeout: 0x269ea4 msecs=5000 h=0x1f9b4 arg=0x0
smf calling h=0x1f9f4(0x0)
tcpip: ip_reass_tmr()
sys_timeout: 0x269eb4 msecs=1000 h=0x1f9f4 arg=0x0
smf calling h=0x1f9f4(0x0)
tcpip: ip_reass_tmr()
sys_timeout: 0x269eb4 msecs=1000 h=0x1f9f4 arg=0x0
smf calling h=0x1f9f4(0x0)
tcpip: ip_reass_tmr()
sys_timeout: 0x269eb4 msecs=1000 h=0x1f9f4 arg=0x0
smf calling h=0x1f9f4(0x0)
tcpip: ip_reass_tmr()
sys_timeout: 0x269eb4 msecs=1000 h=0x1f9f4 arg=0x0
smf calling h=0x1f9f4(0x0)
tcpip: ip_reass_tmr()
sys_timeout: 0x269eb4 msecs=1000 h=0x1f9f4 arg=0x0
pbuf_alloc(length=64)
pbuf_alloc: allocated pbuf 0x269888
pbuf_alloc(length=64) == 0x269888
pbuf_free(0x269888)
pbuf_free: deallocating 0x269888
pbuf_alloc(length=78)
pbuf_alloc: allocated pbuf 0x269888
pbuf_alloc(length=78) == 0x269888
pbuf_header: old 0x269898 new 0x2698a6 (-14)
tcpip_thread: IP packet 0x1aa584
ip_input: iphdr->dest 0x97be5f78 netif->ip_addr 0x97be5f78 (0x97be5f00, 0x97be5f
00, 0x78)
ip_input: packet accepted on interface e0
ip_input:
IP header:
+-------------------------------+
| 4 | 5 |  0x00 |        60     | (v, hl, tos, len)
+-------------------------------+
|    49289      |000|       0   | (id, flags, offset)
+-------------------------------+
|  128  |    1  |    0x8c37     | (ttl, proto, chksum)
+-------------------------------+
|  151  |  190  |   95  |   11  | (src)
+-------------------------------+
|  151  |  190  |   95  |  120  | (dest)
+-------------------------------+
ip_input: p->len 60 p->tot_len 60
pbuf_header: old 0x2698a6 new 0x2698ba (-20)
icmp_input: ping
pbuf_header: old 0x2698ba new 0x269898 (34)
pbuf_header: old 0x269898 new 0x2698ba (-34)
pbuf_header: old 0x2698ba new 0x2698a6 (20)
ip_output_if: e00
IP header:
+-------------------------------+
| 4 | 5 |  0x00 |        60     | (v, hl, tos, len)
+-------------------------------+
|    49289      |000|       0   | (id, flags, offset)
+-------------------------------+
|  128  |    1  |    0x8c37     | (ttl, proto, chksum)
+-------------------------------+
|  151  |  190  |   95  |  120  | (src)
+-------------------------------+
|  151  |  190  |   95  |   11  | (dest)
+-------------------------------+
--------------------------------------------------------END ICMP Ping Debug-------------------------------------------

So it now crashes in ip_output_if???  Kind of like you thought it might.  Below is a dump of debug when I attempt to connect to my server:


------------------------------------------------Connect Debug-----------------------------------------------
Calling tcpip_init
sys_timeosys_timeout:xemacif_pkt_ut: 0x269eb4 0x269eb4 mseprocess_thr msecs=1000
 cs=1000 h=0x1ead created h=0x1f9f4 af9f4 arg=0x0
rg=0x0

sys_timeout: 0x269ea4 msecs=5000 h=0x1f9b4 arg=0x0
D- NO_SYS == 0
netif_set_ipaddr: netif address being changed
netif: IP address of interface  set to 151.190.95.120
netif: netmask of interface  set to 255.255.255.0
netif: GW address of interface  set to 0.0.0.0
netif: added interface e0 IP addr 151.190.95.120 netmask 255.255.255.0 gw 0.0.0.
0
netif: setting default interface e0
tcpip_thread: API message 0x2ee5a4
lwip_socket(PF_INET, SOCK_STREAM, 0) = 0
lwip_bind(0, addr=151.190.95.120 port=10001)
tcpip_thread: API message 0x2ee59c
tcp_bind: bind to port 10001
lwip_bind(0) succeeded
lwip_listen(0, backlog=5)
tcpip_thread: API message 0x2ee5bc
I- SOCKET: Accepting a new connection...
lwip_accept(0)...
smf calling h=0x1f9f4(0x0)
tcpip: ip_reass_tmr()
sys_timeout: 0x269eb4 msecs=1000 h=0x1f9f4 arg=0x0
smf calling h=0x1f9f4(0x0)
tcpip: ip_reass_tmr()
sys_timeout: 0x269eb4 msecs=1000 h=0x1f9f4 arg=0x0
smf calling h=0x1f9f4(0x0)
tcpip: ip_reass_tmr()
sys_timeout: 0x269eb4 msecs=1000 h=0x1f9f4 arg=0x0
smf calling h=0x1f9f4(0x0)
tcpip: ip_reass_tmr()
sys_timeout: 0x269eb4 msecs=1000 h=0x1f9f4 arg=0x0
smf calling h=0x1f9b4(0x0)
tcpip: etharp_tmr()
sys_timeout: 0x269ea4 msecs=5000 h=0x1f9b4 arg=0x0
smf calling h=0x1f9f4(0x0)
tcpip: ip_reass_tmr()
sys_timeout: 0x269eb4 msecs=1000 h=0x1f9f4 arg=0x0
smf calling h=0x1f9f4(0x0)
tcpip: ip_reass_tmr()
sys_timeout: 0x269eb4 msecs=1000 h=0x1f9f4 arg=0x0
smf calling h=0x1f9f4(0x0)
tcpip: ip_reass_tmr()
sys_timeout: 0x269eb4 msecs=1000 h=0x1f9f4 arg=0x0
smf calling h=0x1f9f4(0x0)
tcpip: ip_reass_tmr()
sys_timeout: 0x269eb4 msecs=1000 h=0x1f9f4 arg=0x0
pbuf_alloc(length=66)
pbuf_alloc: allocated pbuf 0x269888
pbuf_alloc(length=66) == 0x269888
pbuf_header: old 0x269898 new 0x2698a6 (-14)
tcpip_thread: IP packet 0x1aa584
ip_input: iphdr->dest 0x97be5f78 netif->ip_addr 0x97be5f78 (0x97be5f00, 0x97be5f
00, 0x78)
ip_input: packet accepted on interface e0
ip_input:
IP header:
+-------------------------------+
| 4 | 5 |  0x00 |        48     | (v, hl, tos, len)
+-------------------------------+
|    52551      |010|       0   | (id, flags, offset)
+-------------------------------+
|  128  |    6  |    0x3f80     | (ttl, proto, chksum)
+-------------------------------+
|  151  |  190  |   95  |   11  | (src)
+-------------------------------+
|  151  |  190  |   95  |  120  | (dest)
+-------------------------------+
ip_input: p->len 48 p->tot_len 48
TCP header:
+-------------------------------+
|     2685      |    10001      | (src port, dest port)
+-------------------------------+
|           3147000861          | (seq no)
+-------------------------------+
|           0000000000          | (ack no)
+-------------------------------+
|  7 |   |000010|     65535     | (hdrlen, flags (SYN ), win)
+-------------------------------+
|    0x3be0     |         0     | (chksum, urgp)
+-------------------------------+
pbuf_header: old 0x2698a6 new 0x2698ba (-20)
pbuf_header: old 0x2698ba new 0x2698d6 (-28)
tcp_input: packed for LISTENing connection.
TCP connection request 2685 -> 10001.
sys_timeout: 0x269e94 msecs=250 h=0x1fc20 arg=0x0
tcp_enqueue(pcb=0x1a8ea8, arg=0x0, len=0, flags=12, copy=0)
tcp_enqueue: queuelen: 0
pbuf_alloc(length=4)
pbuf_alloc(length=4) == 0x19ddec
pbuf_header: old 0x19de34 new 0x19de20 (20)
tcp_enqueue: queueing 6510:6511 (0x12)
tcp_enqueue: 1 (after enqueued)
tcp_output: snd_wnd 65535, cwnd 1, wnd 1, effwnd 0, seq 6510, ack 6510
tcp_output: snd_wnd 65535, cwnd 1, wnd 1, effwnd 0, seq 6510, ack 6510, i 0
tcp_output_segment: rtseq 6510
tcp_output_segment: 6510:6510
pbuf_header: old 0x19de20 new 0x19de0c (20)
ip_output_if: e00
IP header:
+-------------------------------+
| 4 | 5 |  0x00 |        44     | (v, hl, tos, len)
+-------------------------------+
|        0      |000|       0   | (id, flags, offset)
+-------------------------------+
|  255  |    6  |    0xcdcb     | (ttl, proto, chksum)
+-------------------------------+
|  151  |  190  |   95  |  120  | (src)
+-------------------------------+
|  151  |  190  |   95  |   11  | (dest)
+-------------------------------+
netif->output()pbuf_header: failed as 0xf1 < 0x1a8ebc (not enough space for new
header size)
-----------------------------------------------------Connect Debug End----------------------------

Again, it crashes in netif->output()... does this give you any more ideas on what might be wrong or what I should do??  Thanks in advance.


Arden


----- Original Message ----
Message: 1
Date: Sat, 16 Jun 2007 13:23:33 +0200
From: "Goldschmidt Simon" <address@hidden>
Subject: [lwip-users] RE: [Virtex II Pro] pbuf / DHCP / lwIP upgrade
    to EDK/    upgrade to EDK 9.1i (Louis Filasky)
To: <address@hidden>
Message-ID:
    <address@hidden>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

first, there was a bug in pbuf_copy(), I don't know if your CVS snapshot is new enough, please check for changes on pbuf.c in CVS. But is not what your problem is now, only to make sure you don't run into it later.

What I'm surprised about is the following line of debug output when receiving the ping:
>>>
pbuf_header: failed as 0x270162 < 0x270164 (not enough space for new header size)
<<<
Here, the icmp code tries to move the payload pointer from the start of the icmp header to the start of the ethernet header. It does that using 2 header-length defines: PBUF_IP_HLEN for the IP header and PBUF_LINK_HLEN for the ethernet header. Since pbuf_header() failes because the pbuf is 2 bytes too small, this looks like, on receive, you have 14 bytes in your RX-pbuf for the ethernet-header (which is normal if alignment of IP-header is not needed) while PBUF_LINK_HLEN is set to 16 (to achieve IP-header and -data alignment to 4 byte).

That would be a configuration fault! If PBUF_LINK_HLEN is set to 16 instead of 14, ETH_PAD_SIZE must be set to 2 (see ethernetif.c for an example of achieving alignment). Otherwise, try to set PBUF_LINK_HLEN to 14 (also the default in opt.h) and PBUF_LINK_HLEN to 0. This might solve your problem.

If PBUF_LINK_HLEN is set to 16 and ETH_PAD_SIZE already is set to 2: see ethernetif.c on how to create an RX-pbuf compatible to that alignment.

In your case, etharp_output might have the same problem with pbuf_header (like icmp_input) and thus, ip_output_if might return ERR_BUF instead of sending the packet. I've checked in some more debug code for icmp.c to check that.


Of course, I might be completely wrong and your problem is somewhere else...


Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.gnu.org/pipermail/lwip-users/attachments/20070616/74625a79/attachment.html

------------------------------

_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users

End of lwip-users Digest, Vol 46, Issue 22
******************************************


reply via email to

[Prev in Thread] Current Thread [Next in Thread]