Garrett D'Amore wrote:
If you don't care about implementation details of NIC drivers, skip
this message. :-)
I've been thinking about the idea of doing "loanup", which a lot of
NIC drivers seem to do now days, but I wonder if there are latent
problems waiting with this approach. I'd like to hear from folks who
believe these concerns are not valid. (Loanup is the notion of
"loaning" receive packets up to the stack, with their DMA handles
still bound, to avoid tearing down the DMA handles later... the idea
is that when the message is freed, it can be reused without having to
reestablish dma bindings... which means you don't have to reprogram
the addresses in the IOMMU...
* when binding DMA, one specifies a few attributes, including
whether the access is read-only, write-only, read-write, and what
kinds of cache consistency is required ... (DDI_DMA_STREAMING vs
DDI_DMA_CONSISTENT)
* sometimes the stack may turn a packet around and send it back
down to another interface, without actually freeing it it until after
it has been through the transmit.
In addition, there's no guarantee that something along the way,
be it a STREAMS module or pfhooks function or something else
won't park the mblk off to the side somewhere and come back
to it later. This may happen to one mblk or many, so the driver
may run out of preallocated buffers...
Darren
_______________________________________________
networking-discuss mailing list
[email protected]