Somnath kotur wrote:
Hi All,
I'm currently involved in writing driver for my 10G NIC H/W . My hardware seems to be facing a problem whenever i try with LSO enabled ( all it needs is the Tx MSS ) and the packet has more fragments than the no: of TX descriptors that my card can handle (32) at one time . My current strategy in such a scenario is to ddi_dma_mem_alloc a virtual buffer in my driver for the packet size ,do an ddi_dma_addr_bind for this VA and then copy the contents of the packet to this virtual buffer which is now DMA-ready as well before handing it off to the card. Now, for some reason this doesn't seem to work in the case of these large packets that come in LSO path.Now while i am not sure what the H/W problem is, my question really is ..

What do you mean by the packet has more fragments? Are you talking about DMA cookies? If so, then it certainly seems like you could use a preallocated DMA region for this (hmm... it might be worth allocating a few of these, I'm not sure how many because it depends on your hardware) and then bcopy'ing.

a) Is this a good/workable strategy?
b) Are there any better alternatives ?

I'd use prealloc'd buffers if you have a choice, when this situation arises... you may save yourself some DMA setup/teardown costs on these hot code paths. Plus dma memory allocation is not "cheap"... its also something you want to avoid. In fact, if you're seeing this problem a lot, then you might be better off without LSO altogether.


   -- Garrett
I am using Solaris 10x86 Update 6 05/08 Thanks
Som




_______________________________________________
driver-discuss mailing list
driver-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to