Hi,

I am writing a 10G Link Layer driver for a network adapter capable of
receiving
Jumbo frames. Unfortunately this device has a limitation that there is a 1
to 1 mapping
of the received packets to the host Rx buffers, so that only a single
buffer  can be
used for 1 packet and multiple packets cannot fit into a single buffer.

So I need to be able to allocate physically contiguous buffers of 9K or more
on x86
platforms.

My question is :

1) Does allocb() guarantee a physically contiguous data block of the size
that I
    request ? My understanding is, currently it does not.
    When the memory returned by allocb() is DMA mapped using
ddi_dma_addr_bind_handle()
    this returns the number of cookies to indicate the number of actual
physical chunks
    that the memory is broken up into.

2) Other alternative is to use ddi_dma_mem_alloc() and link it to the
message block by
    using esballoc() / desballoc(). Even with that, is it guaranteed that
the number
    of dma_cookies is always 1 ?
    However I do not want to go this route because in that case I need to
provide a free
    function to free up the buffers when the upper layers are done.

Can anybody suggest a better way of doing this ?

Thanks
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to