netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: soheil.kdev@gmail.com
Cc: netdev@vger.kernel.org, edumazet@google.com, ycheng@google.com,
	ncardwell@google.com, soheil@google.com
Subject: Re: [PATCH net] tcp: do not report TCP_CM_INQ of 0 for closed connections
Date: Wed, 06 Mar 2019 11:03:07 -0800 (PST)	[thread overview]
Message-ID: <20190306.110307.755956027902807950.davem@davemloft.net> (raw)
In-Reply-To: <20190306180136.68112-1-soheil.kdev@gmail.com>

From: Soheil Hassas Yeganeh <soheil.kdev@gmail.com>
Date: Wed,  6 Mar 2019 13:01:36 -0500

> From: Soheil Hassas Yeganeh <soheil@google.com>
> 
> Returning 0 as inq to userspace indicates there is no more data to
> read, and the application needs to wait for EPOLLIN. For a connection
> that has received FIN from the remote peer, however, the application
> must continue reading until getting EOF (return value of 0
> from tcp_recvmsg) or an error, if edge-triggered epoll (EPOLLET) is
> being used. Otherwise, the application will never receive a new
> EPOLLIN, since there is no epoll edge after the FIN.
> 
> Return 1 when there is no data left on the queue but the
> connection has received FIN, so that the applications continue
> reading.
> 
> Fixes: b75eba76d3d72 (tcp: send in-queue bytes in cmsg upon read)
> Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
> Acked-by: Neal Cardwell <ncardwell@google.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Acked-by: Yuchung Cheng <ycheng@google.com>

Applied and queued up for -stable, thank you.

      reply	other threads:[~2019-03-06 19:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-06 18:01 [PATCH net] tcp: do not report TCP_CM_INQ of 0 for closed connections Soheil Hassas Yeganeh
2019-03-06 19:03 ` 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=20190306.110307.755956027902807950.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=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).