On Sun, Jul 31, 2005 at 09:46:53PM -0700, David S. Miller wrote: > > I've tried to avoid doing that, but I may need to capitulate for now. > My concern was that the divide that thing does has non-trivial cost.
You're right, this could be expensive. > Wait... that's not true, multiple SKBs can have it set already > if we tso_fragment() or tcp_fragment() and then the tcp_transmit_skb() > fails (clone allocation failure, for example). Agreed. > Another idea is to make tcp_init_tso_segs() reset the values if > the MSS doesn't match up. This should work and points out another That's a much better idea! > Anyways, the following compile-tested-only patch shows my idea. > What do you think about this Herbert? The patch looks good. However, I spotted something that might be broken due to an earlier change. > @@ -569,7 +567,7 @@ int tcp_trim_head(struct sock *sk, struc > * factor and mss. > */ > if (tcp_skb_pcount(skb) > 1) > - tcp_set_skb_tso_segs(sk, skb); > + tcp_set_skb_tso_segs(sk, skb, tcp_current_mss(sk, 1)); We've got to be careful here because this is a packet that's already been transmitted and the caller (tcp_tso_acked) wasn't designed to handle a decrease in MSS. Actually it seems that most of the code in tcp_tso_acked will work with a negative packets_acked. The only questionable bit is the change made to fackets_out. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
