linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	David Miller <davem@davemloft.net>
Cc: mtk.manpages@gmail.com, linux-kernel@vger.kernel.org,
	linux-man@vger.kernel.org, netdev@vger.kernel.org,
	neleai@seznam.cz, caitlin.bestler@gmail.com,
	nhorman@tuxdriver.com, eliedebrauwer@gmail.com,
	steve@chygwyn.com, remi.denis-courmont@nokia.com,
	paul@paul-moore.com, chris.friesen@windriver.com
Subject: Re: [PATCH/RFC] Re: recvmmsg() timeout behavior strangeness [RESEND]
Date: Sat, 24 May 2014 08:13:18 +0200	[thread overview]
Message-ID: <5380387E.50308@gmail.com> (raw)
In-Reply-To: <20140523195522.GH2741@kernel.org>

On 05/23/2014 09:55 PM, Arnaldo Carvalho de Melo wrote:
> Em Fri, May 23, 2014 at 03:00:55PM -0400, David Miller escreveu:
>> From: Arnaldo Carvalho de Melo <acme@kernel.org>
>> Date: Wed, 21 May 2014 18:05:35 -0300
> 
>>> But after thinking a bit more, looks like we need to do that, please
>>> take a look at the attached patch to see if it addresses the problem.
> 
>>> Mostly it adds a new timeop to the per protocol recvmsg()
>>> implementations, that, if not NULL, should be used instead of
>>> SO_RCVTIMEO.
> 
>>> since the underlying recvmsg implementations already check that timeout,
>>> return what is remaining, that will then be used in subsequent recvmsg
>>> calls, at the end we just convert it back to timespec format.
> 
>>> In most cases it is just passed to skb_recv_datagram, that will check
>>> the pointer, use it and update if not NULL.
> 
>>> Should have no problems, but I only did a boot with a system with this
>>> patch applied, no problems noticed on a normal desktop session, ssh,
>>> etc.
>  
>> This looks fine to me, but I have a small request:
>  
>> +	return noblock ? 0 : timeop ? *timeop : sk->sk_rcvtimeo;
>  
>> I keep forgetting which way these expressions associate, so if you could
>> parenthesize the innermost ?: I'd appreciate it. :)
> 
> Ok, I actually wrote a sample program to verify that these ternaries did
> what I meant 8)
> 
> I'll finish the cset log and do this clarification change.
> 
> Would be great to get Acked-by tags from the original reporter, Michael
> and whoever had a look at this change, if possible. Michael, Elie?

Arnaldo, I already sent you a reply (will reping on that one),
but got no response. My light testing got the expected results,
but I still had one question about the semantics.

Cheers,

Michael



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

      reply	other threads:[~2014-05-24 12:24 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-30 13:59 recvmmsg() timeout behavior strangeness [RESEND] Michael Kerrisk (man-pages)
2014-05-03 10:28 ` Michael Kerrisk (man-pages)
2014-05-03 11:29   ` Florian Westphal
2014-05-03 11:39     ` Michael Kerrisk (man-pages)
2014-05-12 10:15 ` Michael Kerrisk (man-pages)
2014-05-12 14:34   ` Arnaldo Carvalho de Melo
2014-05-21 21:05     ` [PATCH/RFC] " Arnaldo Carvalho de Melo
2014-05-22 14:27       ` Michael Kerrisk (man-pages)
2014-05-24  6:13         ` Michael Kerrisk (man-pages)
2014-05-26 13:46         ` Arnaldo Carvalho de Melo
2014-05-26 21:17           ` Arnaldo Carvalho de Melo
2014-05-27 16:35             ` Michael Kerrisk (man-pages)
2014-05-27 19:21               ` Arnaldo Carvalho de Melo
2014-05-27 19:22                 ` Arnaldo Carvalho de Melo
2014-05-27 19:28                 ` Michael Kerrisk (man-pages)
2014-05-27 20:30                   ` Arnaldo Carvalho de Melo
2014-05-28  5:00                     ` Michael Kerrisk (man-pages)
2014-05-28 12:20                     ` Michael Kerrisk (man-pages)
2014-05-28 15:07                       ` Arnaldo Carvalho de Melo
2014-05-28 15:17                         ` David Laight
2014-05-28 19:50                           ` 'Arnaldo Carvalho de Melo'
2014-05-28 21:33                             ` Chris Friesen
2014-05-28 21:49                               ` 'Arnaldo Carvalho de Melo'
2014-05-29 10:53                             ` David Laight
2014-05-29 13:55                               ` 'Arnaldo Carvalho de Melo'
2014-05-29 14:06                                 ` David Laight
2014-05-29 14:17                                   ` 'Arnaldo Carvalho de Melo'
2014-05-29 14:40                                     ` David Laight
2014-05-29 15:33                                     ` [PATCH/RFC] Handle EFAULT in partial recvmmsg was " 'Arnaldo Carvalho de Melo'
2014-06-16  9:58                                     ` Michael Kerrisk (man-pages)
2014-06-24 20:25                                       ` Arnaldo Carvalho de Melo
2014-06-27 11:29                                         ` Michael Kerrisk (man-pages)
2014-05-29 14:07                               ` Michael Kerrisk (man-pages)
2014-06-27 11:37                       ` Michael Kerrisk (man-pages)
2014-05-23 19:00       ` David Miller
2014-05-23 19:55         ` Arnaldo Carvalho de Melo
2014-05-24  6:13           ` Michael Kerrisk (man-pages) [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=5380387E.50308@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=acme@ghostprotocols.net \
    --cc=caitlin.bestler@gmail.com \
    --cc=chris.friesen@windriver.com \
    --cc=davem@davemloft.net \
    --cc=eliedebrauwer@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=neleai@seznam.cz \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=paul@paul-moore.com \
    --cc=remi.denis-courmont@nokia.com \
    --cc=steve@chygwyn.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).