[Cbe-oss-dev] [RFC 4/9] AXON - Ethernet over PCI-E driver

Arnd Bergmann arnd at arndb.de
Thu Dec 28 13:20:01 EST 2006

On Thursday 28 December 2006 00:42, Benjamin Herrenschmidt wrote:
> > So for each SKB the receiver gets 2 interrupts (+ payload) and the emitter get 
> > one. It might not sound like the most efficient protocol but we do need some 
> > messagery to synchronize resource usage and SKB management.
> It's in fact extremely inefficient :-)
> You should really implement that differently, with 2 rings of
> descriptors, like normal hardware does, and proper interrupt mitigation
> so you can set a threshold on interrupt emission on each side.

It depends of course on whether it is a bottleneck or not. If this is used
only for slow data like the occasional DNS query or a heartbeat, it's
probably not worth doing something more efficient.

Also, for virtual devices like this, the optimal solution is somewhat
different than for hardware driven devices. E.g. you can't easily set
up a timer in the range of a few microseconds to delay your interrupt.

On the other hand, you have the advantage that you can tell exactly
what state the other side is in, so you can implement a much better
flow control than you could over an ethernet wire. Since you can tell
whether the receiver is waiting for packets or not, the sender can
block in user space when the receiver is too busy to accept more

Also, you can have a huge virtual transfer buffer when you DMA directly
between the sender and the receiver SKB queue.

	Arnd <><

More information about the cbe-oss-dev mailing list