Network Device Driver development question

Hello, I am new to embedded network device driver development. We are developing a device driver for a network chipset and the microcontroller is M16C based from Renesas. I have seen that most of the device drivers use ring buffers. What are the benefits of using a ring buffer. The chipset that we are working on has 14kb TXFIFO and

14kb RXFIFO. Would I have to use ring buffer in addition to these FIFO's?. I am also keen on achieving the best performance with the chipset. The chipset supports both DMA and PIO I/O modes. which mode would be best?. The M16C microcontroller runs microItron based OS and also has a TCP/IP stack. I would like to know from the guru's here what standard guidelines I would have to follow for developing a network device driver for embedded systems?

Thank you very much for your help!

Reply to
instantvoodoo
Loading thread data ...

Get the data sheets of your network chips and follow the guidelines on the sheets.

The 14 kbyte buffers are more than enough for normal TCP/IP use. IMHO, no ring buffers are needed as long as you're not building a network device (e.g. firewall or router).

I'm running SMSC LAN91C96's and LAN91C111's with embedded processors (Atmel AT91 ARM7TDMI) and TCP/IP stacks. The chips have 6 kilobytes of combined transmit and receive buffers, and no software ring buffering is used.

A different story is if the TCP/IP protocol stack relies on the existence of some ring buffering outside of the stack itself.

--

Tauno Voipio
tauno voipio (at) iki fi
Reply to
Tauno Voipio
14k is a good deal of FIFO, and it would depend on other factors whether you need any additional (ring or not) buffers. If you have several connections receiving simultaneously and one or more must defragment the IP datagram(s), more buffering might well be necessary. As to whether ring or no ring, I personally prefer bitmap allocation of memory resources because of better efficiency, but this may be more difficult to implement and may pose more overhead (on my PPC based tcp/ip implementation it does not, but not all the world is PPC).

Dimiter

------------------------------------------------------ Dimiter Popoff Transgalactic Instruments

formatting link

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

Reply to
Didi

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.