Garrett D'Amore wrote:
If i need to allocate a scatter/gather list of 8 pages with 4k each
will this structure do for me dma_attr.dma_attr_version = DMA_ATTR_V0;
dma_attr.dma_attr_addr_lo = 0x0000000000000000ull;
dma_attr.dma_attr_addr_hi = 0xFFFFFFFFFFFFFFFFull;
dma_attr.dma_attr_count_max = 0x00000000FFFFFFFFull;
dma_attr.dma_attr_align = 0x1000;
dma_attr.dma_attr_burstsizes = 0x00000FFF;
dma_attr.dma_attr_minxfer = 0x1000;
dma_attr.dma_attr_maxxfer = 0x00000000FFFFFFFFull;
dma_attr.dma_attr_seg = 0xFFFFFFFFFFFFFFFFull;
dma_attr.dma_attr_sgllen = 8;
dma_attr.dma_attr_granular = 1; // min
Kindly let me know if there are any cases in which this allocation
scheme would not work. Is it better to allocate big page of 32k and
split in
the driver.The card supports scatter/gather so i wanted to use of the
feature.Which one is expensive in terms of iommu tlb entries
etc.
If you can preallocate, using a single 32k chunk will be faster and
easier, since you'll only need a single cookie.
The reason to use separate scatter gather is if you are using a
zero-copy approach where the memory regions are associated with buf_t's
or mblk's which come from other locations.
True, but when there's an IOMMU you don't even need to use
scatter/gather then. In the presence of an IOMMU I'd say the only
reasons for using scatter/gather would be:
- if your h/w can break down transfers into semantically distinct
components e.g. TCP header split
- if you believe the IOMMU is a performance bottleneck and want to
bypass it (which I would not recommend)
Paul
--
===================================
Paul Durrant
http://www.linkedin.com/in/pdurrant
===================================
_______________________________________________
driver-discuss mailing list
driver-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/driver-discuss