netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* TSO and MSS
@ 2004-09-29 22:38 John Heffner
  2004-09-29 22:46 ` David S. Miller
  0 siblings, 1 reply; 4+ messages in thread
From: John Heffner @ 2004-09-29 22:38 UTC (permalink / raw)
  To: davem; +Cc: netdev

While playing with TSO I noticed that two machines on the same ethernet
with dissimilar MTUs don't work with TSO enabled.  One could argue the
incorrecness of this situation, but I think it's still important.  Looks
like the segment size is only set from the path MTU, and the TCP MSS is
ignored.  Here's the offending code.

net/ipv4/ip_output.c:ip_queue_xmit():

        mtu = dst_pmtu(&rt->u.dst);
        if (skb->len > mtu && (sk->sk_route_caps & NETIF_F_TSO)) {
                unsigned int hlen;

                /* Hack zone: all this must be done by TCP. */
                hlen = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2));
                skb_shinfo(skb)->tso_size = mtu - hlen;
                skb_shinfo(skb)->tso_segs =
                        (skb->len - hlen + skb_shinfo(skb)->tso_size - 1)/
                                skb_shinfo(skb)->tso_size - 1;
        }

Does the "Hack zone" comment indicate this case has already been
considered?

Thanks,
  -John

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-10-01  4:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-29 22:38 TSO and MSS John Heffner
2004-09-29 22:46 ` David S. Miller
2004-09-29 22:51   ` John Heffner
2004-10-01  4:18     ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).