Hello,

I'm attempting to upgrade one of the basic examples that Atmel provides (http 
example with lwip), that comes with lwip 1.4.1, and upgrade it to lwip 2.0.0.  
I'm fairly new to using these tools, so I figured I could essentially remove 
the lwip 1.4.1 folder+files and replace it with lwip 2.0.0 folder/files.  When 
compiling, some files needed to change slightly, such as knowing where the new 
header files are and such, but nothing major (I don't think).  The one thing I 
left the same was the lwip1.4.1-port folder, which includes the "lwip MAC 
driver for lwip".

This was all that was done in terms of changing files.  The project compiles 
without any issues, but when programmed to the board (I'm running an Atmel 
Sam4e Xplained Pro) there are a couple things.  Other functions such as the 
console work just fine without a problem, but when I try to ping the board, it 
fails to.  When the board is first turned on, it can ping the board once, and 
then it stops.  The board is still running it's ethernet_task() function which 
is searching for signals.  I turned on debugging for a few things and I get an 
error message.  The error message that I get is "gmac_rx_populate_queue: pbuf 
allocation failure" and then later "etharp_input: ARP request was not for us."

To me, it seems like the initial setup of lwip works just fine, since it is 
able to ping the board at least once when it boots up, but rather it might be 
an issue with the lwip1.4.1-port folder that I left alone when doing the 
upgrade.  Could it be possible that this driver is causing the issue?  The 
error messages also come from this file as well which leads me to believe that 
the error relies in there.

Looking up the pbuf allocation failure, I found another post that suggested to 
increase the size of my pbuf_pool_size.  The default size was 4, so I changed 
it to 16 and yielded some results.  With the increased pbuf pool size I am able 
to ping the board continuously now, but other functions that were working 
before (before chanign the files from 1.4.1 to 2.0.0) such as an HTTP page and 
SNMP still do not work.

Here is an example of the debugging when the board is powered on.

udp_bind(ipaddr = 0.0.0.0, port = 161)
udp_bind: bound to 0.0.0.0, port 161)
netif: netmask of interface  set to 255.255.255.0
netif: GW address of interface  set to 192.168.101.1
netif_set_ipaddr: netif address being changed
netif: IP address of interface  set to 192.168.101.100
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x2000a77c
pbuf_alloc(length=1536) == 0x2000a77c
gmac_rx_populate_queue: new pbuf allocated: 0x2000a77c [idx=0]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x2000a16c
pbuf_alloc(length=1536) == 0x2000a16c
gmac_rx_populate_queue: new pbuf allocated: 0x2000a16c [idx=1]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x20009b5c
pbuf_alloc(length=1536) == 0x20009b5c
gmac_rx_populate_queue: new pbuf allocated: 0x20009b5c [idx=2]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x2000954c
pbuf_alloc(length=1536) == 0x2000954c
gmac_rx_populate_queue: new pbuf allocated: 0x2000954c [idx=3]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x20008f3c
pbuf_alloc(length=1536) == 0x20008f3c
gmac_rx_populate_queue: new pbuf allocated: 0x20008f3c [idx=4]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x2000892c
pbuf_alloc(length=1536) == 0x2000892c
gmac_rx_populate_queue: new pbuf allocated: 0x2000892c [idx=5]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x2000831c
pbuf_alloc(length=1536) == 0x2000831c
gmac_rx_populate_queue: new pbuf allocated: 0x2000831c [idx=6]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x20007d0c
pbuf_alloc(length=1536) == 0x20007d0c
gmac_rx_populate_queue: new pbuf allocated: 0x20007d0c [idx=7]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x200076fc
pbuf_alloc(length=1536) == 0x200076fc
gmac_rx_populate_queue: new pbuf allocated: 0x200076fc [idx=8]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x200070ec
pbuf_alloc(length=1536) == 0x200070ec
gmac_rx_populate_queue: new pbuf allocated: 0x200070ec [idx=9]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x20006adc
pbuf_alloc(length=1536) == 0x20006adc
gmac_rx_populate_queue: new pbuf allocated: 0x20006adc [idx=10]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x200064cc
pbuf_alloc(length=1536) == 0x200064cc
gmac_rx_populate_queue: new pbuf allocated: 0x200064cc [idx=11]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x20005ebc
pbuf_alloc(length=1536) == 0x20005ebc
gmac_rx_populate_queue: new pbuf allocated: 0x20005ebc [idx=12]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x200058ac
pbuf_alloc(length=1536) == 0x200058ac
gmac_rx_populate_queue: new pbuf allocated: 0x200058ac [idx=13]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x2000529c
pbuf_alloc(length=1536) == 0x2000529c
gmac_rx_populate_queue: new pbuf allocated: 0x2000529c [idx=14]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x20004c8c
pbuf_alloc(length=1536) == 0x20004c8c
gmac_rx_populate_queue: new pbuf allocated: 0x20004c8c [idx=15]
netif: added interface en IP addr 192.168.101.100 netmask 255.255.255.0 gw 
192.168.101.1
netif: setting default interface en

Here's some debugging that pops up throughout.

gmac_low_level_input: DMA buffer 0x2000a77c received, size=64 [idx=0]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x0
gmac_rx_populate_queue: pbuf allocation failure
ethernet_input: dest:ff:ff:ff:ff:ff:ff, src:f0:de:f1:47:25:9a, type:806
pbuf_header: old 0x2000a78c new 0x2000a79a (-14)
etharp_update_arp_entry: 192.168.101.10 - f0:de:f1:47:25:9a
etharp_find_entry: found empty entry 0
etharp_find_entry: no empty entry found and not allowed to recycle
etharp_input: incoming ARP request
etharp_input: ARP request was not for us.
pbuf_free(0x2000a77c)
pbuf_free: deallocating 0x2000a77c
gmac_low_level_input: DMA buffer 0x2000a16c received, size=64 [idx=1]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x2000a77c
pbuf_alloc(length=1536) == 0x2000a77c
gmac_rx_populate_queue: new pbuf allocated: 0x2000a77c [idx=0]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x0
gmac_rx_populate_queue: pbuf allocation failure
ethernet_input: dest:ff:ff:ff:ff:ff:ff, src:f0:de:f1:47:25:9a, type:806
pbuf_header: old 0x2000a17c new 0x2000a18a (-14)
etharp_update_arp_entry: 192.168.101.10 - f0:de:f1:47:25:9a
etharp_find_entry: found empty entry 0
etharp_find_entry: no empty entry found and not allowed to recycle
etharp_input: incoming ARP request
etharp_input: ARP request was not for us.
pbuf_free(0x2000a16c)
pbuf_free: deallocating 0x2000a16c
gmac_low_level_input: DMA buffer 0x20009b5c received, size=64 [idx=2]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x2000a16c
pbuf_alloc(length=1536) == 0x2000a16c
gmac_rx_populate_queue: new pbuf allocated: 0x2000a16c [idx=1]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x0
gmac_rx_populate_queue: pbuf allocation failure
ethernet_input: dest:ff:ff:ff:ff:ff:ff, src:f0:de:f1:47:25:9a, type:806
pbuf_header: old 0x20009b6c new 0x20009b7a (-14)
etharp_update_arp_entry: 0.0.0.0 - f0:de:f1:47:25:9a
etharp_update_arp_entry: will not add non-unicast IP address to ARP cache
etharp_input: incoming ARP request
etharp_input: ARP request was not for us.
pbuf_free(0x20009b5c)
pbuf_free: deallocating 0x20009b5c
gmac_low_level_input: DMA buffer 0x2000954c received, size=64 [idx=3]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x20009b5c
pbuf_alloc(length=1536) == 0x20009b5c
gmac_rx_populate_queue: new pbuf allocated: 0x20009b5c [idx=2]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x0
gmac_rx_populate_queue: pbuf allocation failure
ethernet_input: dest:ff:ff:ff:ff:ff:ff, src:f0:de:f1:47:25:9a, type:806
pbuf_header: old 0x2000955c new 0x2000956a (-14)
etharp_update_arp_entry: 192.168.101.10 - f0:de:f1:47:25:9a
etharp_find_entry: found empty entry 0
etharp_find_entry: no empty entry found and not allowed to recycle
etharp_input: incoming ARP request
etharp_input: ARP request was not for us.
pbuf_free(0x2000954c)
pbuf_free: deallocating 0x2000954c
gmac_low_level_input: DMA buffer 0x20008f3c received, size=64 [idx=4]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x2000954c
pbuf_alloc(length=1536) == 0x2000954c
gmac_rx_populate_queue: new pbuf allocated: 0x2000954c [idx=3]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x0
gmac_rx_populate_queue: pbuf allocation failure
ethernet_input: dest:ff:ff:ff:ff:ff:ff, src:f0:de:f1:47:25:9a, type:806
pbuf_header: old 0x20008f4c new 0x20008f5a (-14)
etharp_update_arp_entry: 192.168.101.10 - f0:de:f1:47:25:9a
etharp_find_entry: found empty entry 0
etharp_find_entry: no empty entry found and not allowed to recycle
etharp_input: incoming ARP request
etharp_input: ARP request was not for us.
pbuf_free(0x20008f3c)
pbuf_free: deallocating 0x20008f3c
gmac_low_level_input: DMA buffer 0x2000892c received, size=64 [idx=5]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x20008f3c
pbuf_alloc(length=1536) == 0x20008f3c
gmac_rx_populate_queue: new pbuf allocated: 0x20008f3c [idx=4]
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x0
gmac_rx_populate_queue: pbuf allocation failure
ethernet_input: dest:ff:ff:ff:ff:ff:ff, src:f0:de:f1:47:25:9a, type:806
pbuf_header: old 0x2000893c new 0x2000894a (-14)
etharp_update_arp_entry: 0.0.0.0 - f0:de:f1:47:25:9a
etharp_update_arp_entry: will not add non-unicast IP address to ARP cache
etharp_input: incoming ARP request
etharp_input: ARP request was not for us.
pbuf_free(0x2000892c)
pbuf_free: deallocating 0x2000892c

And what is says when I try to contact the board via SNMP for example.

pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x20005ebc
pbuf_alloc(length=1536) == 0x20005ebc
pbuf_alloc(length=1536)
pbuf_alloc: allocated pbuf 0x0
pbuf_header: old 0x200058bc new 0x200058ca (-14)
pbuf_header: old 0x200058ca new 0x200058de (-20)
udp_input: received datagram of length 48
UDP header:
+-------------------------------+
|     55459     |       161     | (src port, dest port)
+-------------------------------+
|        48     |     0x1de5    | (len, chksum)
+-------------------------------+
udp (192.168.101.100, 161) <-- (192.168.101.10, 55459)
pcb (0.0.0.0, 161) <-- (0.0.0.0, 0)
udp_input: calculating checksum
pbuf_header: old 0x200058de new 0x200058e6 (-8)
pbuf_alloc(length=1472)
pbuf_alloc(length=1472) == 0x20003bdc
SNMP get-next request
udp_send
udp_send: No route to 192.168.101.10
pbuf_free(0x20003bdc)
pbuf_free: deallocating 0x20003bdc
pbuf_free(0x200058ac)
pbuf_free: deallocating 0x200058ac

Any ideas as to what could be causing my issues?

Thanks in advance for any help regarding this issue.

Nick


======================================================================
The information contained in this e-mail, including all of its attachments, is
confidential and proprietary information of IPG Photonics and its affiliates and
intended only for the use of the individual or entity named above.  If the
reader of this message is not the intended recipient, or the employee or agent
responsible to deliver it to the intended recipient, you are hereby notified
that any dissemination, distribution or copying of this communication is 
strictly
prohibited.

If you have received this communication in error, please immediately notify the
sender by telephone or e-mail, and destroy this communication and all copies.  

Thank you.
=======================================================================
This Email has been scanned for all viruses by IPG Photonics Email Scanning 
Services.
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to