[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADVnQykmmnjDeNpt5v_X0oPMWdFGd5t3OSg6t9Qw7sfqY=5S3A@mail.gmail.com>
Date: Mon, 02 Apr 2018 17:10:03 +0000
From: Neal Cardwell <ncardwell@...gle.com>
To: narutonguyen2018@...il.com
Cc: Netdev <netdev@...r.kernel.org>
Subject: Re: SO_TCP_NODELAY implementation in TCP stack
On Sun, Apr 1, 2018 at 4:06 AM Naruto Nguyen <narutonguyen2018@...il.com>
wrote:
> Hello everyone,
> As I know we have a socket option SO_TCP_NODELAY to disable Nagle
> Algorithm, and I found it is implemented in TCP/IP stack at
> https://elixir.bootlin.com/linux/v4.4.90/source/net/ipv4/tcp.c#L2401 .
> However, I do not know where the source code the Nagle Algorithm is
> implemented in kernel. If you know, could you please help me?
The Linux TCP code for Nagle's algorithm is largely in tcp_output.c
in the following functions:
tcp_nagle_check(), tcp_minshall_check(), tcp_minshall_update()
The variant of the Nagle algorithm that Linux implements is described here:
https://tools.ietf.org/html/draft-minshall-nagle-00
Basically, the algorithm avoids having more than one outstanding
unacknowledged packet that is less than one MSS in size.
The Nagle algorithm is disabled using the TCP_NODELAY socket option.
neal
Powered by blists - more mailing lists