tom60 wrote:
Drew,

Thanks!

"always copying to pre-mapped buffers, rather than doing a zero-copy send", do you mean driver not to support LSO/TSO?

No.

Our NIC is 10Gb/s, should we use zero copy? The pre-allocated tx buffer has limited size, so, copying packet to pre-allocated tx buffer works only for smaller packets. Our tx buffer size is set to 512 bytes, any packet bigger than that will be transmitted using zero copy (DMA binding) mode. Is this good? What is the best tx strategy for our 10G driver? Is there any good 10g driver for us to refer?

One thing you can do is to just pullup fragmented mblk chains.   But
you're still going to need a larger scatter-gather list.  Does your
hardware allow more than 16 segments?

If not, you might be able to set your m_getcapab() callback to use
a smaller lso_max.  Eg:

        case MAC_CAPAB_LSO:
                cap_lso = cap_data;
                uint32_t max_lso;
                cap_lso->lso_flags = LSO_TX_BASIC_TCP_IPV4;
                max_lso = iommu_page_size * (16 - 1);
                if ((max_lso) >= (1 << 16))
                        max_lso = (uint32_t)-1;
                cap_lso->lso_basic_tcp_ipv4.lso_max = (uint16_t)max_lso;


Beware: it is code written in a mailer, and I have no idea how you'd
determine the iommu page size.  Worst case, you could probably just
ifdef it to 8192 for sparc, and 4096 for x86.

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

Reply via email to