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

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu Jan 4 07:47:47 EST 2007


On Wed, 2007-01-03 at 11:35 +0100, Jean-Christophe Dubois wrote:
> Hello,
> 
> So, correct me if I am wrong but it sounds to me you are proposing to 
> implement a software ring buffer for the pseudo ethernet device while the 
> actual implementation is already using the hardware ring buffer (aka MBX) 
> built inside the Axon.
> 
> I guess we could try to make the actual driver NAPI compliant by giving more 
> control on the MBX to the Ethernet driver.
> 
> However several things have to be considered.
> 
> 1) the Ethernet driver has no dedicated interrupt to service it. The driver is 
> using shared services (DMA, MBX, ...) and therefore is has no exclusive 
> control over any of them.
> 2) If I shutdown the MBX interrupt during the NAPI poll (very doable), the 
> poll() routine will have to also service MBX (or DMA) events targeted at 
> other drivers. This is not really a problem, but I just want to make you 
> aware of the issue/overhead.
> 3) obviously, I will have to be very carefull about the "rotting packet" issue 
> because I can't allow a MBX to stay stuck in the hardware ring buffer (this 
> MBX is not necessarily targeted at the Ethernet driver) waiting for the next 
> MBX to be processed. The MBX interrupt is not level triggered and therefore 
> and I will have to double check the MBX buffer after the interrupts are 
> re-enabled.
> 
> So, as a first approach, I will try to add MBX interupt control 
> (disable/poll/enable) to the Ethernet driver and check how it improves 
> things.
> 
> Does it sound reasonable to you?

Can't you be more sneaky here ? That is, have a separate pair of shared
areas with processed packet indices and put in the DMA command buffer
commands that will update that along with commands that will eventually
write to the register that generates an MSI ? :-)

Ben.





More information about the cbe-oss-dev mailing list