netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: nanditad@google.com
Cc: ncardwell@google.com, netdev@vger.kernel.org,
	ilpo.jarvinen@helsinki.fi, ycheng@google.com,
	therbert@google.com
Subject: Re: [PATCH] tcp: don't fragment SACKed skbs in tcp_mark_head_lost()
Date: Sat, 03 Mar 2012 14:58:46 -0500 (EST)	[thread overview]
Message-ID: <20120303.145846.1285582356848239241.davem@davemloft.net> (raw)
In-Reply-To: <CAB_+Fg6x=0jFVysUK8stU1YEL4NGqid7h_XKfRW7BVVeYp3bcg@mail.gmail.com>

From: Nandita Dukkipati <nanditad@google.com>
Date: Sat, 3 Mar 2012 10:03:56 -0800

> On Fri, Mar 2, 2012 at 11:36 PM, Neal Cardwell <ncardwell@google.com> wrote:
>>
>> In tcp_mark_head_lost() we should not attempt to fragment a SACKed skb
>> to mark the first portion as lost. This is for two primary reasons:
>>
>> (1) tcp_shifted_skb() coalesces adjacent regions of SACKed skbs. When
>> doing this, it preserves the sum of their packet counts in order to
>> reflect the real-world dynamics on the wire. But given that skbs can
>> have remainders that do not align to MSS boundaries, this packet count
>> preservation means that for SACKed skbs there is not necessarily a
>> direct linear relationship between tcp_skb_pcount(skb) and
>> skb->len. Thus tcp_mark_head_lost()'s previous attempts to fragment
>> off and mark as lost a prefix of length (packets - oldcnt)*mss from
>> SACKed skbs were leading to occasional failures of the WARN_ON(len >
>> skb->len) in tcp_fragment() (which used to be a BUG_ON(); see the
>> recent "crash in tcp_fragment" thread on netdev).
>>
>> (2) there is no real point in fragmenting off part of a SACKed skb and
>> calling tcp_skb_mark_lost() on it, since tcp_skb_mark_lost() is a NOP
>> for SACKed skbs.
>>
>> Signed-off-by: Neal Cardwell <ncardwell@google.com>
> 
> Acked-by: Nandita Dukkipati <nanditad@google.com>

Applied and queued up for -stable, thanks everyone.

      reply	other threads:[~2012-03-03 19:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-03  7:36 [PATCH] tcp: don't fragment SACKed skbs in tcp_mark_head_lost() Neal Cardwell
2012-03-03 14:22 ` Ilpo Järvinen
2012-03-03 15:19 ` Yuchung Cheng
2012-03-03 18:03 ` Nandita Dukkipati
2012-03-03 19:58   ` David Miller [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=20120303.145846.1285582356848239241.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ilpo.jarvinen@helsinki.fi \
    --cc=nanditad@google.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=therbert@google.com \
    --cc=ycheng@google.com \
    /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;
as well as URLs for NNTP newsgroup(s).