From: David Miller <davem@davemloft.net>
To: soheil.kdev@gmail.com
Cc: netdev@vger.kernel.org, edumazet@google.com, willemb@google.com,
soheil@google.com, ycheng@google.com, ncardwell@google.com
Subject: Re: [PATCH net] tcp: purge write queue upon RST
Date: Wed, 28 Feb 2018 11:42:40 -0500 (EST) [thread overview]
Message-ID: <20180228.114240.1711766040670948234.davem@davemloft.net> (raw)
In-Reply-To: <20180227233218.158382-1-soheil.kdev@gmail.com>
From: Soheil Hassas Yeganeh <soheil.kdev@gmail.com>
Date: Tue, 27 Feb 2018 18:32:18 -0500
> From: Soheil Hassas Yeganeh <soheil@google.com>
>
> When the connection is reset, there is no point in
> keeping the packets on the write queue until the connection
> is closed.
>
> RFC 793 (page 70) and RFC 793-bis (page 64) both suggest
> purging the write queue upon RST:
> https://tools.ietf.org/html/draft-ietf-tcpm-rfc793bis-07
>
> Moreover, this is essential for a correct MSG_ZEROCOPY
> implementation, because userspace cannot call close(fd)
> before receiving zerocopy signals even when the connection
> is reset.
>
> Fixes: f214f915e7db ("tcp: enable MSG_ZEROCOPY")
> Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
> Reviewed-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
> Signed-off-by: Neal Cardwell <ncardwell@google.com>
This is one of those "yeah, why have we been doing this all of
this time?" kind of situation.
Let's hope there isn't some subtle side effect, but indeed this
current behavior is broken for MSG_ZEROCOPY.
Applied and queued up for -stable, thanks!
next prev parent reply other threads:[~2018-02-28 16:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 23:32 [PATCH net] tcp: purge write queue upon RST Soheil Hassas Yeganeh
2018-02-28 16:42 ` David Miller [this message]
2018-02-28 16:46 ` Eric Dumazet
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=20180228.114240.1711766040670948234.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=soheil.kdev@gmail.com \
--cc=soheil@google.com \
--cc=willemb@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).