From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Niels Möller" <nisse@lysator.liu.se>
Cc: linux-kernel@vger.kernel.org, netdev <netdev@vger.kernel.org>
Subject: Re: TCP_MAXSEG vs TCP/generic segmentation offload (tso/gso)
Date: Thu, 25 Nov 2010 17:44:45 +0100 [thread overview]
Message-ID: <1290703485.2858.360.camel@edumazet-laptop> (raw)
In-Reply-To: <nn1v69qsjd.fsf@stalhein.lysator.liu.se>
Le jeudi 25 novembre 2010 à 17:25 +0100, Niels Möller a écrit :
>
> I was under the impression that TSO (and maybe GSO) implied more
> cleverness in the network card; that the network card more or less gets
> to decide by itself how to divide a tcp stream into segments. And for
> example in the atl1c driver which I looked a bit into, this was what the
> REG_MTU register was for. Seems I have gotten this totally wrong.
>
You were not totally wrong, but device does not use its own MTU to
perform the split : We give it the MSS of the flow.
You can have multiple flows in parallel, each with its own MSS, while
device has a single MTU.
> Maybe Documentation/networking/netdevices.txt could clarify how it
> works. Currently, it says
>
> : Segmentation Offload (GSO, TSO) is an exception to this rule. The
> : upper layer protocol may pass a large socket buffer to the device
> : transmit routine, and the device will break that up into separate
> : packets based on the current MTU.
MTU means : maximum transmission unit. But each layer has its own :)
In this context, TCP protocol, so MSS should be taken into account.
By default, MSS derives from device MTU (ipv4 without options case :
MSS = MTU - 40), but user can change it with TCP_MAXSEG.
prev parent reply other threads:[~2010-11-25 16:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <nny68hqzzn.fsf@stalhein.lysator.liu.se>
2010-11-25 14:27 ` TCP_MAXSEG vs TCP/generic segmentation offload (tso/gso) Eric Dumazet
2010-11-25 15:09 ` Niels Möller
2010-11-25 15:18 ` Eric Dumazet
2010-11-25 16:25 ` Niels Möller
2010-11-25 16:44 ` Eric Dumazet [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1290703485.2858.360.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nisse@lysator.liu.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox