Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/dev/pci
thorpej%shagadelic.org@localhost wrote:
> On Nov 1, 2006, at 10:10 PM, David Young wrote:
>
> > It is because a typical mbuf chain is about three segments long, so
> > you
> > need at least three descriptors unless you are willing to copy three
> > segments into one.
>
> What the code should do is simply dmamap_load the chain, check to see
> how many DMA segments are ACTUALLY used, and then compare to the
> number of available descriptors. This is what other network drivers
> in our tree do.
Well, what I asked (and dyoung guessed) is what FreeBSD does ;-p
BTW, what error code should bus_dmamap_load (and variants) return
if the xfer buffer doesn't fit in the number of created DMA segments?
Most FreeBSD drivers assume it returns EFBIG, but is there
any definition in the API?
(sparc64 used E2BIG and it caused trouble on re(4), and
most our native drivers don't check the return code :-/)
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index