<?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のトピックFEC Driver using Small Buffers?</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FEC-Driver-using-Small-Buffers/m-p/286670#M11999</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working on a project where the usual small number of Ethernet FEC Receive Buffers just won't cut it. I'm getting data overruns.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this project on an MCF5235, we're using the internal static RAM for both the Descriptor Ring and the buffers. That makes things a whole lot easier than having to worry about flushing the cache.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't use a lot of 1600-byte buffers as there's not enough SRAM. Fine, the FEC supports small buffers and will chain them for me. So I'm going to use 64 256-byte buffers. Small packets will take a single buffer and large ones might take six.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for some example code that does this so I don't repeat the mistakes others have made.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Linux uses big buffers (where "big" means "will hold a full-size packet").&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FNET uses big buffers.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Freescale's TCP/IP Lite (the Nichelite stack) has small and big buffers, but only uses big ones in the receive ring.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know of any examples of a FEC driver that uses chained buffers?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TOm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Sep 2013 07:32:21 GMT</pubDate>
    <dc:creator>TomE</dc:creator>
    <dc:date>2013-09-02T07:32:21Z</dc:date>
    <item>
      <title>FEC Driver using Small Buffers?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FEC-Driver-using-Small-Buffers/m-p/286670#M11999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working on a project where the usual small number of Ethernet FEC Receive Buffers just won't cut it. I'm getting data overruns.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this project on an MCF5235, we're using the internal static RAM for both the Descriptor Ring and the buffers. That makes things a whole lot easier than having to worry about flushing the cache.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't use a lot of 1600-byte buffers as there's not enough SRAM. Fine, the FEC supports small buffers and will chain them for me. So I'm going to use 64 256-byte buffers. Small packets will take a single buffer and large ones might take six.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for some example code that does this so I don't repeat the mistakes others have made.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Linux uses big buffers (where "big" means "will hold a full-size packet").&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FNET uses big buffers.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Freescale's TCP/IP Lite (the Nichelite stack) has small and big buffers, but only uses big ones in the receive ring.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know of any examples of a FEC driver that uses chained buffers?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TOm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 07:32:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FEC-Driver-using-Small-Buffers/m-p/286670#M11999</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2013-09-02T07:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: FEC Driver using Small Buffers?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FEC-Driver-using-Small-Buffers/m-p/286671#M12000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I put together a lwip (OS-less mode) driver for the MCF52235 MCU a while ago. IIRC, its FEC is the same. I can't say it's seen a huge amount of testing, but it works in a number of always-on products with built-in web server and SNMP agent. I think I looked at Coldfire ethernet driver from eCos and got some ideas there. Feel free to use it as you wish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 19:28:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FEC-Driver-using-Small-Buffers/m-p/286671#M12000</guid>
      <dc:creator>scifi</dc:creator>
      <dc:date>2013-09-02T19:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: FEC Driver using Small Buffers?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FEC-Driver-using-Small-Buffers/m-p/286672#M12001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. That code is simple and easy to understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 13:18:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FEC-Driver-using-Small-Buffers/m-p/286672#M12001</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2013-09-03T13:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: FEC Driver using Small Buffers?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FEC-Driver-using-Small-Buffers/m-p/286673#M12002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The FEC driver was having problems due to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 - Only 8 receive buffers (other stacks use as few as 2),,&lt;/P&gt;&lt;P&gt;2 - A POLLED driver called from a polling loop to unload/free the buffers,&lt;/P&gt;&lt;P&gt;3 - A large company network with lots of devices using Avahi/Bonjour/Zeroconfig,&lt;/P&gt;&lt;P&gt;4 - The presence of some very large Bonjour/MDNS packets,&lt;/P&gt;&lt;P&gt;5 - That were taking up to 300ms to process in our device,&lt;/P&gt;&lt;P&gt;6 - That were delaying the polling loop and the Ethernet unload by 300ms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it was losing a lot of Ethernet packets. UDP packets, proving that the "U" in "UDP" can mean "Unreliable".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We got the MDNS processing down to 30ms, changed the buffers from 8 * 2k to 64 * 256 byte and now unload the ring under an interrupt into a pool of 150 buffers in main RAM, and it can take almost anything we can throw at it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can your TCP/IP stack take a Flood Ping with a preload of 80 and a count of 3000 on a 100MHz full-duplex Ethernet and not drop a single one? Before this change it would drop with a preload of less than 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 13:38:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FEC-Driver-using-Small-Buffers/m-p/286673#M12002</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2013-09-10T13:38:11Z</dc:date>
    </item>
  </channel>
</rss>

