netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: ptesarik@suse.cz
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	ilpo.jarvinen@helsinki.fi, jsembera@suse.cz
Subject: Re: [PATCH] Do not use TSO/GSO when there is urgent data
Date: Fri, 21 Nov 2008 16:43:40 -0800 (PST)	[thread overview]
Message-ID: <20081121.164340.67054948.davem@davemloft.net> (raw)
In-Reply-To: <200811211319.45515.ptesarik@suse.cz>

From: Petr Tesarik <ptesarik@suse.cz>
Date: Fri, 21 Nov 2008 13:19:45 +0100

> This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=12014
> 
> Since most (if not all) implementations of TSO and even the in-kernel
> software GSO do not update the urgent pointer when splitting a large
> segment, it is necessary to turn off TSO/GSO for all outgoing traffic
> with the URG pointer set.
> 
> Looking at tcp_current_mss (and the preceding comment) I even think
> this was the original intention. However, this approach is insufficient,
> because TSO/GSO is turned off only for newly created frames, not for
> frames which were already pending at the arrival of a message with
> MSG_OOB set. These frames were created when TSO/GSO was enabled,
> so they may be large, and they will have the urgent pointer set
> in tcp_transmit_skb().
> 
> With this patch, such large packets will be fragmented again before
> going to the transmit routine.
> 
> As a side note, at least the following NICs are known to screw up
> the urgent pointer in the TCP header when doing TSO:
> 
> 	Intel 82566MM (PCI ID 8086:1049)
> 	Intel 82566DC (PCI ID 8086:104b)
> 	Intel 82541GI (PCI ID 8086:1076)
> 	Broadcom NetXtreme II BCM5708 (PCI ID 14e4:164c)
> 
> Signed-off-by: Petr Tesarik <ptesarik@suse.cz>

Applied, thanks Petr.

BTW, your email client screwed up the patch by breaking up long lines,
for example:

> @@ -722,7 +722,8 @@ static void tcp_queue_skb(struct sock *sk, struct sk_buff 
> *skb)

And:

> @@ -1163,7 +1164,9 @@ static int tcp_init_tso_segs(struct sock *sk, struct 
> sk_buff *skb,

I fixed it up this time, but I will not in the future.

      parent reply	other threads:[~2008-11-22  0:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-21 12:19 [PATCH] Do not use TSO/GSO when there is urgent data Petr Tesarik
2008-11-21 13:07 ` [PATCH] tcp: fix potential corner case issue in segmentation (Was: Re: [PATCH] Do not use TSO/GSO when there is urgent data) Ilpo Järvinen
2008-11-21 15:51   ` Petr Tesarik
2008-11-21 17:49     ` Ilpo Järvinen
2008-11-21 18:21       ` Ilpo Järvinen
2008-11-22  0:43 ` 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=20081121.164340.67054948.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ilpo.jarvinen@helsinki.fi \
    --cc=jsembera@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ptesarik@suse.cz \
    /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).