<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>ColdFire/68K Microcontrollers and ProcessorsのトピックHandling ARP reply when no more buffers, using Interniche and MCF52235</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Handling-ARP-reply-when-no-more-buffers-using-Interniche-and/m-p/143309#M2681</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I use a variant of the Interniche TCP/IP stack in superloop mode. The following problem probably applies to other implementations as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my gdb output:&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;PRE&gt;Program received signal SIGTRAP, Trace/breakpoint trap.dtrap () at ether.c:7676&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm("halt");(gdb) backtrace#0&amp;nbsp; dtrap () at ether.c:76#1&amp;nbsp; 0x000181b0 in arpReply (pkt=0x20004f6c) at net/mip/m_arp.c:300#2&amp;nbsp; 0x0001844a in arprcv (pkt=0x20004f6c) at net/mip/m_arp.c:383#3&amp;nbsp; 0x00018d44 in pktdemux () at net/mip/m_ipnet.c:253#4&amp;nbsp; 0x0000a580 in ethernet_check () at ether.c:843#5&amp;nbsp; 0x00008a72 in main_loop (loop=&amp;lt;value optimized out&amp;gt;) at router.c:762#6&amp;nbsp; 0x00009494 in main () at router.c:773(gdb)&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have suggestions on how to handle this? Performing an assembly halt is not a good option.&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2020 08:43:48 GMT</pubDate>
    <dc:creator>Petter_fupp</dc:creator>
    <dc:date>2020-10-29T08:43:48Z</dc:date>
    <item>
      <title>Handling ARP reply when no more buffers, using Interniche and MCF52235</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Handling-ARP-reply-when-no-more-buffers-using-Interniche-and/m-p/143309#M2681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I use a variant of the Interniche TCP/IP stack in superloop mode. The following problem probably applies to other implementations as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my gdb output:&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;PRE&gt;Program received signal SIGTRAP, Trace/breakpoint trap.dtrap () at ether.c:7676&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm("halt");(gdb) backtrace#0&amp;nbsp; dtrap () at ether.c:76#1&amp;nbsp; 0x000181b0 in arpReply (pkt=0x20004f6c) at net/mip/m_arp.c:300#2&amp;nbsp; 0x0001844a in arprcv (pkt=0x20004f6c) at net/mip/m_arp.c:383#3&amp;nbsp; 0x00018d44 in pktdemux () at net/mip/m_ipnet.c:253#4&amp;nbsp; 0x0000a580 in ethernet_check () at ether.c:843#5&amp;nbsp; 0x00008a72 in main_loop (loop=&amp;lt;value optimized out&amp;gt;) at router.c:762#6&amp;nbsp; 0x00009494 in main () at router.c:773(gdb)&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have suggestions on how to handle this? Performing an assembly halt is not a good option.&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:43:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Handling-ARP-reply-when-no-more-buffers-using-Interniche-and/m-p/143309#M2681</guid>
      <dc:creator>Petter_fupp</dc:creator>
      <dc:date>2020-10-29T08:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Handling ARP reply when no more buffers, using Interniche and MCF52235</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Handling-ARP-reply-when-no-more-buffers-using-Interniche-and/m-p/143310#M2682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;You can reduce this problem enough for it to go away, by improving the receive ISR for the FEC.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I seem to remember that the RX ISR is pretty dumb and simply tries to&amp;nbsp;pass any valid frame up the stack. You can improve matters by examining the frames and simply discard any that are not of importance.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have modified the RX ISR so that I only bother with broadcast ARP matching my host IP address (ARP request), unicast ARP (reply), TCP, UDP&amp;nbsp;addressed to me, or unicast ICMP request and reply frames. Anything else is just ignored.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The FEC sets a flag for broadcast frames,so you just need to test if the protocol is ARP to see if you are interested, all other broadcast frames are dumped. I then check if the request is for my host IP address.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;For non-broadcast, check the protocol, and for ARP, TCP and UDP, check if the address matches your host address(es).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Although this adds cycles to the RX ISR, these are cycles that have to happen anyway, they are very minimal, and they will save a lot of buffers.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Paul.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2007 23:20:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Handling-ARP-reply-when-no-more-buffers-using-Interniche-and/m-p/143310#M2682</guid>
      <dc:creator>mccPaul</dc:creator>
      <dc:date>2007-08-21T23:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Handling ARP reply when no more buffers, using Interniche and MCF52235</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Handling-ARP-reply-when-no-more-buffers-using-Interniche-and/m-p/143311#M2683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks for a detailed and helpful reply, Paul. I really understand why you would like an svn server (or similar) for a code repository now.&lt;BR /&gt;&lt;BR /&gt;The RX ISR is a bit stupid, and we might need to improve it (but we need to parse some UDP broadcast packets). For the moment, I have chosen to silently drop the ARP request if there are no more buffers. Then we need to hope the other end performs a (successful) retry later on.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 13:52:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Handling-ARP-reply-when-no-more-buffers-using-Interniche-and/m-p/143311#M2683</guid>
      <dc:creator>Petter_fupp</dc:creator>
      <dc:date>2007-08-23T13:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Handling ARP reply when no more buffers, using Interniche and MCF52235</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Handling-ARP-reply-when-no-more-buffers-using-Interniche-and/m-p/143312#M2684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;This is a architectual issue with the stack,&amp;nbsp; that I have a fix for and will be available in the next release after some extensive testing.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;As you stated,&amp;nbsp; the FEC ISR is very dumb,&amp;nbsp; and tends to use a lot of packet buffers for packets that the stack just throws out.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I&amp;nbsp;have moved&amp;nbsp;some of the initial filters from the stack into the FEC ISR.&amp;nbsp; It makes the code less modular, but&amp;nbsp;more memory efficient.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Aug 2007 07:39:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Handling-ARP-reply-when-no-more-buffers-using-Interniche-and/m-p/143312#M2684</guid>
      <dc:creator>ericgregori</dc:creator>
      <dc:date>2007-08-25T07:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Handling ARP reply when no more buffers, using Interniche and MCF52235</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Handling-ARP-reply-when-no-more-buffers-using-Interniche-and/m-p/143313#M2685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;This sounds like a great idea, Eric! I'm looking forward to the next release.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2007 15:56:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Handling-ARP-reply-when-no-more-buffers-using-Interniche-and/m-p/143313#M2685</guid>
      <dc:creator>Petter_fupp</dc:creator>
      <dc:date>2007-08-27T15:56:20Z</dc:date>
    </item>
  </channel>
</rss>

