All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tcp: remove useless update for flag parameter in tcp_enter_frto_loss()
@ 2012-03-28  4:23 Li Yu
  2012-03-28  5:27 ` Yuchung Cheng
  2012-03-28  5:29 ` Neal Cardwell
  0 siblings, 2 replies; 7+ messages in thread
From: Li Yu @ 2012-03-28  4:23 UTC (permalink / raw)
  To: netdev


It seem that we forget remove below two lines after copying code :)

This update never impacts others.

Sorry for last mail with legal notices improperly, I used wrong
mail.

Signed-off-by Li Yu <bingtian.ly@taobao.com>

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index e886e2f..b2f8ada 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2169,8 +2169,6 @@ static void tcp_enter_frto_loss(struct sock *sk,
int allowed_segments, int flag)
 			/* For some reason this R-bit might get cleared? */
 			if (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_RETRANS)
 				tp->retrans_out += tcp_skb_pcount(skb);
-			/* ...enter this if branch just for the first segment */
-			flag |= FLAG_DATA_ACKED;
 		} else {
 			if (TCP_SKB_CB(skb)->sacked & TCPCB_RETRANS)
 				tp->undo_marker = 0;

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

* Re: [PATCH] tcp: remove useless update for flag parameter in tcp_enter_frto_loss()
  2012-03-28  4:23 [PATCH] tcp: remove useless update for flag parameter in tcp_enter_frto_loss() Li Yu
@ 2012-03-28  5:27 ` Yuchung Cheng
  2012-03-28  5:29 ` Neal Cardwell
  1 sibling, 0 replies; 7+ messages in thread
From: Yuchung Cheng @ 2012-03-28  5:27 UTC (permalink / raw)
  To: Li Yu; +Cc: netdev

On Tue, Mar 27, 2012 at 9:23 PM, Li Yu <raise.sail@gmail.com> wrote:
>
> It seem that we forget remove below two lines after copying code :)
>
> This update never impacts others.
>
> Sorry for last mail with legal notices improperly, I used wrong
> mail.
>
> Signed-off-by Li Yu <bingtian.ly@taobao.com>
>
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index e886e2f..b2f8ada 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -2169,8 +2169,6 @@ static void tcp_enter_frto_loss(struct sock *sk,
> int allowed_segments, int flag)
>                        /* For some reason this R-bit might get cleared? */
>                        if (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_RETRANS)
>                                tp->retrans_out += tcp_skb_pcount(skb);
> -                       /* ...enter this if branch just for the first segment */
> -                       flag |= FLAG_DATA_ACKED;

The comment explicitly explains why the flag is marked for.


>                } else {
>                        if (TCP_SKB_CB(skb)->sacked & TCPCB_RETRANS)
>                                tp->undo_marker = 0;
> --
> 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

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

* Re: [PATCH] tcp: remove useless update for flag parameter in tcp_enter_frto_loss()
  2012-03-28  4:23 [PATCH] tcp: remove useless update for flag parameter in tcp_enter_frto_loss() Li Yu
  2012-03-28  5:27 ` Yuchung Cheng
@ 2012-03-28  5:29 ` Neal Cardwell
  2012-03-28  6:54   ` Li Yu
  1 sibling, 1 reply; 7+ messages in thread
From: Neal Cardwell @ 2012-03-28  5:29 UTC (permalink / raw)
  To: Li Yu; +Cc: netdev

On Wed, Mar 28, 2012 at 12:23 AM, Li Yu <raise.sail@gmail.com> wrote:
>
> It seem that we forget remove below two lines after copying code :)
>
> This update never impacts others.

The 'flag' variable will be used in later iterations of the
tcp_for_write_queue() loop. The comment seems to quite sensibly
indicate that the FLAG_DATA_ACKED bit is being set to avoid entering
that branch of the if statement in later segments in the loop:

2168                 if ((tp->frto_counter == 1) && !(flag & FLAG_DATA_ACKED)) {
2169                         /* For some reason this R-bit might get cleared? */
2170                         if (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_RETRANS)
2171                                 tp->retrans_out += tcp_skb_pcount(skb);
2172                         /* ...enter this if branch just for the
first segment */
2173                         flag |= FLAG_DATA_ACKED;
2174                 } else {

The structure of the logic seems intact from the original commit that
added this:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=d1a54c6a0a3f9c2c4ef71982d89b8571bd9eaa51

neal

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

* Re: [PATCH] tcp: remove useless update for flag parameter in tcp_enter_frto_loss()
  2012-03-28  5:29 ` Neal Cardwell
@ 2012-03-28  6:54   ` Li Yu
  2012-03-28  7:34     ` Eric Dumazet
  0 siblings, 1 reply; 7+ messages in thread
From: Li Yu @ 2012-03-28  6:54 UTC (permalink / raw)
  To: Neal Cardwell; +Cc: netdev

于 2012年03月28日 13:29, Neal Cardwell 写道:
> On Wed, Mar 28, 2012 at 12:23 AM, Li Yu<raise.sail@gmail.com>  wrote:
>>
>> It seem that we forget remove below two lines after copying code :)
>>
>> This update never impacts others.
>
> The 'flag' variable will be used in later iterations of the
> tcp_for_write_queue() loop. The comment seems to quite sensibly
> indicate that the FLAG_DATA_ACKED bit is being set to avoid entering
> that branch of the if statement in later segments in the loop:
>
> 2168                 if ((tp->frto_counter == 1)&&  !(flag&  FLAG_DATA_ACKED)) {
> 2169                         /* For some reason this R-bit might get cleared? */
> 2170                         if (TCP_SKB_CB(skb)->sacked&  TCPCB_SACKED_RETRANS)
> 2171                                 tp->retrans_out += tcp_skb_pcount(skb);
> 2172                         /* ...enter this if branch just for the
> first segment */
> 2173                         flag |= FLAG_DATA_ACKED;
> 2174                 } else {
>
> The structure of the logic seems intact from the original commit that
> added this:
>
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=d1a54c6a0a3f9c2c4ef71982d89b8571bd9eaa51
>

Sorry for spent time on this, it it account for F-RTO retransmitted
segment here.

Yu

> neal
>

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

* Re: [PATCH] tcp: remove useless update for flag parameter in tcp_enter_frto_loss()
  2012-03-28  6:54   ` Li Yu
@ 2012-03-28  7:34     ` Eric Dumazet
  0 siblings, 0 replies; 7+ messages in thread
From: Eric Dumazet @ 2012-03-28  7:34 UTC (permalink / raw)
  To: Li Yu; +Cc: Neal Cardwell, netdev

On Wed, 2012-03-28 at 14:54 +0800, Li Yu wrote:

> Sorry for spent time on this, it it account for F-RTO retransmitted
> segment here.

I dont believe its waste of time having several eyes on this code.

Thanks

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

* Re: [PATCH] tcp: remove useless update for flag parameter in tcp_enter_frto_loss()
  2012-03-28  4:00 Li Yu
@ 2012-03-28  4:17 ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2012-03-28  4:17 UTC (permalink / raw)
  To: bingtian.ly; +Cc: netdev

From: Li Yu <bingtian.ly@taobao.com>
Date: Wed, 28 Mar 2012 12:00:35 +0800

> This email (including any attachments) is confidential and may be legally privileged.

Do not post to the mailing list with legal notices such as this, not
only are they annoying, they are completely pointless when used on
a public mailing list.

I am completely ignoring your patches until you post them properly,
without these annoying notices attached.

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

* [PATCH] tcp: remove useless update for flag parameter in tcp_enter_frto_loss()
@ 2012-03-28  4:00 Li Yu
  2012-03-28  4:17 ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Li Yu @ 2012-03-28  4:00 UTC (permalink / raw)
  To: netdev


It seem that we forget remove below two lines after copying code :)

This update never impacts others.

Signed-off-by Li Yu <bingtian.ly@taobao.com>

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index e886e2f..b2f8ada 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2169,8 +2169,6 @@ static void tcp_enter_frto_loss(struct sock *sk,
int allowed_segments, int flag)
                        /* For some reason this R-bit might get cleared? */
                        if (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_RETRANS)
                                tp->retrans_out += tcp_skb_pcount(skb);
-                       /* ...enter this if branch just for the first segment */
-                       flag |= FLAG_DATA_ACKED;
                } else {
                        if (TCP_SKB_CB(skb)->sacked & TCPCB_RETRANS)
                                tp->undo_marker = 0;

________________________________

This email (including any attachments) is confidential and may be legally privileged. If you received this email in error, please delete it immediately and do not copy it or use it for any purpose or disclose its contents to any other person. Thank you.

本电邮(包括任何附件)可能含有机密资料并受法律保护。如您不是正确的收件人,请您立即删除本邮件。请不要将本电邮进行复制并用作任何其他用途、或透露本邮件之内容。谢谢。

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

end of thread, other threads:[~2012-03-28  7:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-28  4:23 [PATCH] tcp: remove useless update for flag parameter in tcp_enter_frto_loss() Li Yu
2012-03-28  5:27 ` Yuchung Cheng
2012-03-28  5:29 ` Neal Cardwell
2012-03-28  6:54   ` Li Yu
2012-03-28  7:34     ` Eric Dumazet
  -- strict thread matches above, loose matches on Subject: below --
2012-03-28  4:00 Li Yu
2012-03-28  4:17 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.