Subject: Re: CVS commit: src/sys/netinet
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-net
Date: 03/11/2005 09:53:31
On Mar 11, 2005, at 9:19 AM, YAMAMOTO Takashi wrote:

> although it has another problem; IP_MAXPACKET, which is used to limit
> largesend size, seems too large for rtl8169, which has only 64 tx 
> descriptor.
> i guess we need something like NDIS_TASK_TCP_LARGE_SEND.

How about -- add a if_tsomax member to ifnet, use that instead of 
IP_MAXPACKET (but KASSERT() that it is never > IP_MAXPACKET -- 
otherwise, you can't set ip_len).  If the driver gets a packet that 
wouldn't fit, it can decrease its if_tsomax and return EAGAIN or 
something else that would cause tcp_output() to try again.

It would be interesting to see just how many DMA segments tend to pop 
up with TSO.

-- thorpej