[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Fix wrong size of outgoing packets in the FEC driver



Am 04.09.2014 um 23:25 schrieb Thomas Jürges <thomas@senmut.net>:
> 
> Now you made me curious.  What is the amount of data that needs to be
> processed in what time interval?
> 

In this case, the processing is already (at least kind of) bottom/top half. The Coldfire’s FEC ethernet controller is FIFO-coupled (2 kB buffers) to the Coldfire multichannel DMA unit, which copies the data through the DMA ring buffer. Interrupts are triggered on send/receive of a complete ethernet frame only on the „memory end“ of DMA, everything else is done transparently in hardware. The XIF driver code itself does a final copy from/to this ring buffer to/from the data's final destination (MiNT packet buffers). Bandwidth is pretty close to 100 MBit (have seen 95 Mbit in reality).

Delegating this last task from the DMA interrupt to a timer interrupt routine (this is what addroottimeout() does) just adds to the latency of the whole thing and won’t gain anything, IMHO.