Patchwork tcp: Fix comments for Nagle algorithm

login
register
mail settings
Submitter Feng King
Date Nov. 5, 2011, 2:23 p.m.
Message ID <1320503003-5169-1-git-send-email-kinwin2008@gmail.com>
Download mbox | patch
Permalink /patch/123850/
State Accepted
Delegated to: David Miller
Headers show

Comments

Feng King - Nov. 5, 2011, 2:23 p.m.
TCP_NODELAY is weaker than TCP_CORK, when TCP_CORK was set, small
segments will always pass Nagle test regardless of TCP_NODELAY option.

Signed-off-by: Feng King <kinwin2008@gmail.com>
Srivatsa S. Bhat - Nov. 7, 2011, 2:24 p.m.
On 11/05/2011 07:53 PM, Feng King wrote:
> TCP_NODELAY is weaker than TCP_CORK, when TCP_CORK was set, small
> segments will always pass Nagle test regardless of TCP_NODELAY option.
> 
> Signed-off-by: Feng King <kinwin2008@gmail.com>
> 

You have missed adding "---" after the Signed-off-by line.
The tools that are used to extract the patch from the email will look
for that symbol to distinguish things.

[FYI, tools like git or stgit can generate your patches in the right
format automatically for you.]

Thanks,
Srivatsa S. Bhat

> diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
> index 882e0b0..a908f95 100644
> --- a/net/ipv4/tcp_output.c
> +++ b/net/ipv4/tcp_output.c
> @@ -1377,7 +1377,7 @@ static inline int tcp_minshall_check(const struct tcp_sock *tp)
>  /* Return 0, if packet can be sent now without violation Nagle's rules:
>   * 1. It is full sized.
>   * 2. Or it contains FIN. (already checked by caller)
> - * 3. Or TCP_NODELAY was set.
> + * 3. Or TCP_CORK is not set, and TCP_NODELAY is set.
>   * 4. Or TCP_CORK is not set, and all sent packets are ACKed.
>   *    With Minshall's modification: all sent small packets are ACKed.
>   */
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Nov. 8, 2011, 7:03 p.m.
From: Feng King <kinwin2008@gmail.com>
Date: Sat,  5 Nov 2011 22:23:23 +0800

> TCP_NODELAY is weaker than TCP_CORK, when TCP_CORK was set, small
> segments will always pass Nagle test regardless of TCP_NODELAY option.
> 
> Signed-off-by: Feng King <kinwin2008@gmail.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 882e0b0..a908f95 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1377,7 +1377,7 @@  static inline int tcp_minshall_check(const struct tcp_sock *tp)
 /* Return 0, if packet can be sent now without violation Nagle's rules:
  * 1. It is full sized.
  * 2. Or it contains FIN. (already checked by caller)
- * 3. Or TCP_NODELAY was set.
+ * 3. Or TCP_CORK is not set, and TCP_NODELAY is set.
  * 4. Or TCP_CORK is not set, and all sent packets are ACKed.
  *    With Minshall's modification: all sent small packets are ACKed.
  */