Subject: Re: CVS commit: src/sys/netinet
To: NetBSD-network <tech-net@NetBSD.org>
From: Matt Thomas <matt@3am-software.com>
List: tech-net
Date: 03/11/2005 09:37:54
On Mar 11, 2005, at 9:19 AM, YAMAMOTO Takashi wrote:

>> OK.  that's reasonable.  I've modified if_wm.c to set ip_len to 0 and
>> now ip_output.c leaves ip_len unchanged.
>
> thanks.
>
>> So when is the support for TSO in re(4) going to be committed? :)
>
> maybe tomorrow.
>
> 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.

We could add a member to ifnet which contain the maximum multiplier of 
MSS that could be offloaded.

   len = (min(len, IP_MAXPACKET) / txsegsize) * txsegsize;

would become:

   len = min(len, IP_MAXPACKET) / txsegsize;
   len = min(len, tp->t_inpcb->inp_route.ro_rt->rt_ifp->if_tsomaxseg);
   len *= txsegsize;

Does that make sense?
-- 
Matt Thomas                     email: matt@3am-software.com
3am Software Foundry              www: http://3am-software.com/bio/matt/
Cupertino, CA              disclaimer: I avow all knowledge of this 
message.