Skip to contentSkip to conversation

tcp: fix tcp_shifted_skb() adjustment of lost_cnt_hint for FACK

PATCH Applied Neal Cardwell 3 participants 10 messages Feb 14, 2012 – Feb 28, 2012

Subsystems (3)
lore
Share & tools
lore

Neal Cardwell

author maintainer
#0 lore raw

PATCH 1/1 tcp: fix tcp_shifted_skb() adjustment of lost_cnt_hint for FACK

This commit ensures that lost_cnt_hint is correctly updated in tcp_shifted_skb() for FACK TCP senders. The lost_cnt_hint adjustment in tcp_sacktag_one() only applies to non-FACK senders, so FACK senders need their own adjustment.

This applies the spirit of 1e5289e121372a3494402b1b131b41bfe1cf9b7f - except now that the sequence range passed into tcp_sacktag_one() is correct we need only have a special case adjustment for FACK.

---
 net/ipv4/tcp_input.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
net/ipv4/tcp_input.c +4 -0
index 8116d06..53c8ce4 100644
@@ -1403,6 +1403,10 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
 
 	BUG_ON(!pcount);
 
+	/* Adjust hint for FACK. Non-FACK is handled in tcp_sacktag_one(). */
+	if (tcp_is_fack(tp) && (skb == tp->lost_skb_hint))
+		tp->lost_cnt_hint += pcount;
+
 	TCP_SKB_CB(prev)->end_seq += shifted;
 	TCP_SKB_CB(skb)->seq += shifted;
 
Signature · 1 line
1.7.7.3
maintainer Applied
#1 lore raw

From: Neal Cardwell <[email protected]>
Date: Tue, 14 Feb 2012 01:22:08 -0500

Quoted 10 lines

This commit ensures that lost_cnt_hint is correctly updated in tcp_shifted_skb() for FACK TCP senders. The lost_cnt_hint adjustment in tcp_sacktag_one() only applies to non-FACK senders, so FACK senders need their own adjustment.

This applies the spirit of 1e5289e121372a3494402b1b131b41bfe1cf9b7f - except now that the sequence range passed into tcp_sacktag_one() is correct we need only have a special case adjustment for FACK.

Applied, and queued up for -stable, thanks Neil.

maintainer
#2 lore raw

From: David Miller <[email protected]>
Date: Tue, 14 Feb 2012 14:40:33 -0500 (EST)

Quoted 1 line

Applied, and queued up for -stable, thanks Neil.

Sorry for the typo, I truly meant to say "Neal" :-)

#3 lore raw
In reply to David Miller
Quoted 8 lines · David Miller

From: Neal Cardwell <[email protected]>
Date: Tue, 14 Feb 2012 01:22:08 -0500

Quoted 5 lines

This commit ensures that lost_cnt_hint is correctly updated in tcp_shifted_skb() for FACK TCP senders. The lost_cnt_hint adjustment in tcp_sacktag_one() only applies to non-FACK senders, so FACK senders need their own adjustment.

Quoted 7 lines
Quoted 5 lines

This applies the spirit of 1e5289e121372a3494402b1b131b41bfe1cf9b7f - except now that the sequence range passed into tcp_sacktag_one() is correct we need only have a special case adjustment for FACK.

Applied, and queued up for -stable, thanks Neil.

There has been lots of TCP related warnings posted recently to netdev. Finding out which of these three recent changes caused which warning and if they're all cured by the full series is bit challenging. ...IMHO we should wait a bit more until these recent fixes are put to stable in order to verify that the dust has really settled.

Signature · 1 line
 i.
#4 lore raw

...Grr, I picked up Greg's new address but ended still using his old one. The correct is one now added.

Quoted 23 lines · Ilpo Järvinen
Quoted 8 lines · David Miller

From: Neal Cardwell <[email protected]>
Date: Tue, 14 Feb 2012 01:22:08 -0500

Quoted 5 lines

This commit ensures that lost_cnt_hint is correctly updated in tcp_shifted_skb() for FACK TCP senders. The lost_cnt_hint adjustment in tcp_sacktag_one() only applies to non-FACK senders, so FACK senders need their own adjustment.

Quoted 7 lines
Quoted 5 lines

This applies the spirit of 1e5289e121372a3494402b1b131b41bfe1cf9b7f - except now that the sequence range passed into tcp_sacktag_one() is correct we need only have a special case adjustment for FACK.

Applied, and queued up for -stable, thanks Neil.

There has been lots of TCP related warnings posted recently to netdev. Finding out which of these three recent changes caused which warning and if they're all cured by the full series is bit challenging. ...IMHO we should wait a bit more until these recent fixes are put to stable in order to verify that the dust has really settled.

author maintainer
#5 lore raw

Yes, I agree that it would make sense to hold off on adding these three 3.3-rc4 commits to the stable tree:

cc9a672ee522d4805495b98680f4a3db5d0a0af9

daef52bab1fd26e24e8e9578f8fb33ba1d0cb412

0af2a0d0576205dda778d25c6c344fc6508fc81d

It would make sense to let the dust settle a bit more before adding those to the stable tree.

The same goes for the http://patchwork.ozlabs.org/patch/143114/ patch (under review) that is in the same area of the code.

neal

Quoted 28 lines · Ilpo Järvinen

...Grr, I picked up Greg's new address but ended still using his old one. The correct is one now added.

Quoted 23 lines · Ilpo Järvinen
Quoted 8 lines · David Miller

From: Neal Cardwell <[email protected]>
Date: Tue, 14 Feb 2012 01:22:08 -0500

Quoted 5 lines

This commit ensures that lost_cnt_hint is correctly updated in tcp_shifted_skb() for FACK TCP senders. The lost_cnt_hint adjustment in tcp_sacktag_one() only applies to non-FACK senders, so FACK senders need their own adjustment.

Quoted 7 lines
Quoted 5 lines

This applies the spirit of 1e5289e121372a3494402b1b131b41bfe1cf9b7f - except now that the sequence range passed into tcp_sacktag_one() is correct we need only have a special case adjustment for FACK.

Applied, and queued up for -stable, thanks Neil.

There has been lots of TCP related warnings posted recently to netdev. Finding out which of these three recent changes caused which warning and if they're all cured by the full series is bit challenging. ...IMHO we should wait a bit more until these recent fixes are put to stable in order to verify that the dust has really settled.

maintainer
#6 lore raw

From: Neal Cardwell <[email protected]>
Date: Mon, 27 Feb 2012 21:40:03 -0500

Quoted 7 lines

Yes, I agree that it would make sense to hold off on adding these three 3.3-rc4 commits to the stable tree:

cc9a672ee522d4805495b98680f4a3db5d0a0af9

daef52bab1fd26e24e8e9578f8fb33ba1d0cb412

Quoted 7 lines

0af2a0d0576205dda778d25c6c344fc6508fc81d

It would make sense to let the dust settle a bit more before adding those to the stable tree.

The same goes for the http://patchwork.ozlabs.org/patch/143114/ patch (under review) that is in the same area of the code.

I totally disagree and I have submitted those fixes to -stable already and do not plan to rescind those submissions at all.

author maintainer
#7 lore raw
Quoted 12 lines · David Miller

From: Neal Cardwell <[email protected]>
Date: Mon, 27 Feb 2012 21:40:03 -0500

Quoted 9 lines

Yes, I agree that it would make sense to hold off on adding these three 3.3-rc4 commits to the stable tree:

cc9a672ee522d4805495b98680f4a3db5d0a0af9

daef52bab1fd26e24e8e9578f8fb33ba1d0cb412

0af2a0d0576205dda778d25c6c344fc6508fc81d

Quoted 8 lines
Quoted 5 lines

It would make sense to let the dust settle a bit more before adding those to the stable tree.

The same goes for the http://patchwork.ozlabs.org/patch/143114/ patch (under review) that is in the same area of the code.

I totally disagree and I have submitted those fixes to -stable already and do not plan to rescind those submissions at all.

OK, sounds good to me. In that case I think it would be good to have the http://patchwork.ozlabs.org/patch/143114/ patch in -stable as well, since having just the three patches above would leave us with a known reordering issue.

neal

maintainer
#8 lore raw

From: Neal Cardwell <[email protected]>
Date: Mon, 27 Feb 2012 22:45:31 -0500

Quoted 19 lines · David Miller
Quoted 18 lines

From: Neal Cardwell <[email protected]>
Date: Mon, 27 Feb 2012 21:40:03 -0500

Quoted 14 lines

Yes, I agree that it would make sense to hold off on adding these three 3.3-rc4 commits to the stable tree:

cc9a672ee522d4805495b98680f4a3db5d0a0af9

daef52bab1fd26e24e8e9578f8fb33ba1d0cb412

0af2a0d0576205dda778d25c6c344fc6508fc81d

It would make sense to let the dust settle a bit more before adding those to the stable tree.

The same goes for the http://patchwork.ozlabs.org/patch/143114/ patch (under review) that is in the same area of the code.

Quoted 7 lines
Quoted 2 lines

I totally disagree and I have submitted those fixes to -stable already and do not plan to rescind those submissions at all.

OK, sounds good to me. In that case I think it would be good to have the http://patchwork.ozlabs.org/patch/143114/ patch in -stable as well, since having just the three patches above would leave us with a known reordering issue.

I'll make sure it hits the -stable release after the one Greg is trying to put out right now.

The change you reference rarely matters as most of the time it passes a degreee of reordering of one.

author maintainer
#9 lore raw
Quoted 7 lines · David Miller
Quoted 4 lines

OK, sounds good to me. In that case I think it would be good to have the http://patchwork.ozlabs.org/patch/143114/ patch in -stable as well, since having just the three patches above would leave us with a known reordering issue.

I'll make sure it hits the -stable release after the one Greg is trying to put out right now.

Great. Thanks!

Quoted 2 lines

The change you reference rarely matters as most of the time it passes a degreee of reordering of one.

Yep.

neal