Garrett D'Amore writes:
 > There's also the whole problem of reference counting and DR.... a loaned 
 > up packet has to be freed using a special function as part of 
 > esballoc/desballoc, but that means you might have to reject a DDI detach 
 > in the face of outstanding loaned up packets still held elsewhere in the 
 > stack.  (You need the dip to be valid to do ddi_dma_unbind...  you also 
 > need your driver to be kept from unloading from kernel memory so that 
 > the function pointer associated with the free routine is still valid.)

Maintaining a free pool is not rocket science.   This is more
of a documentation issue than anything else.  FWIW, this is
an issue that driver writers coming from Windows will be familiar
with, at least.

 > All this is being done to reduce/eliminate the cost of 
 > ddi_dma_addr_bind_handle/ddi_dma_unbind_handle().  I'm starting to think 
 > that the cost of those two routines is sufficiently low on modern 
 > systems to not be worth the risk and complication that loan up offers.  
 > The "new" DDI DMA routines -- ddi_dma_addr_bind_handle and friends -- 

I think you'd need to benchmark a 1G or 10G driver on a modern
system with an IOMMU and see how much difference there really
is..

Drew


_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to