Petter Nordby

Handling ARP reply when no more buffers, using Interniche and MCF52235

Discussion created by Petter Nordby on Aug 20, 2007
Latest reply on Aug 27, 2007 by Petter Nordby
I use a variant of the Interniche TCP/IP stack in superloop mode. The following problem probably applies to other implementations as well.

This is my gdb output:
Program received signal SIGTRAP, Trace/breakpoint trap.dtrap () at ether.c:7676                      asm("halt");(gdb) backtrace#0  dtrap () at ether.c:76#1  0x000181b0 in arpReply (pkt=0x20004f6c) at net/mip/m_arp.c:300#2  0x0001844a in arprcv (pkt=0x20004f6c) at net/mip/m_arp.c:383#3  0x00018d44 in pktdemux () at net/mip/m_ipnet.c:253#4  0x0000a580 in ethernet_check () at ether.c:843#5  0x00008a72 in main_loop (loop=<value optimized out>) at router.c:762#6  0x00009494 in main () at router.c:773(gdb)

The dtrap() in arpReply() seems to be called because pk_alloc() fails to find an empty buffer. As I understand it, this can happen if I'm "busy" sending data to a few other IP's and suddenly receive an ARP request from somewhere else.

Does anyone have suggestions on how to handle this? Performing an assembly halt is not a good option.