public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Chris Friesen <chris.friesen@genband•com>
To: Steven Whitehouse <steve@chygwyn•com>
Cc: "Michael Kerrisk" <mtk.manpages@gmail•com>,
	"Arnaldo Carvalho de Melo" <acme@ghostprotocols•net>,
	"Caitlin Bestler" <caitlin.bestler@gmail•com>,
	"David Miller" <davem@davemloft•net>,
	netdev@vger•kernel.org, "Chris Van Hoof" <vanhoof@redhat•com>,
	"Clark Williams" <williams@redhat•com>,
	"Neil Horman" <nhorman@tuxdriver•com>,
	"Arnaldo Carvalho de Melo" <acme@redhat•com>,
	"Andrew Grover" <andy.grover@gmail•com>,
	"Elie De Brauwer" <eliedebrauwer@gmail•com>,
	linux-man@vger•kernel.org,
	"Rémi Denis-Courmont" <remi.denis-courmont@nokia•com>
Subject: Re: recvmmsg() timeout behavior strangeness
Date: Thu, 10 Jan 2013 09:24:47 -0600	[thread overview]
Message-ID: <50EEDD3F.9080203@genband.com> (raw)
In-Reply-To: <1357812249.2760.6.camel@menhir>

On 01/10/2013 04:04 AM, Steven Whitehouse wrote:

> Which timeout are we talking about? I've been copied into the thread
> without seeing the start of it.

The discussion is about the timeout parameter for the recvmmsg() call. 
Currently in the recvmmsg() code it only checks the timeout after 
__sys_recvmsg() returns, so if __sys_recvmsg() blocks forever we could 
end up essentially ignoring the timeout.

> If this is the rcvtimeo then afaik this is supposed to be the max time
> that the call waits for data, but is overridden by MSG_DONTWAIT, for
> example, on a per call basis. I'd assume that recvmmsg should work
> exactly like recvmsg in this case unless there is a good reason for it
> to differ,

recvmsg() doesn't have a timeout parameter, so it uses SO_RCVTIMEO.

recvmmsg() has an explicit timeout parameter but it doesn't look like it 
works properly and the documentation doesn't mention how it is supposed 
to interact with SO_RCVTIMEO.

Chris

      reply	other threads:[~2013-01-10 15:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-23 20:50 recvmmsg() timeout behavior strangeness Michael Kerrisk
     [not found] ` <CAHO5Pa2goUtiBU8ye2beTBExL4it2-aDCPBhDOGyO3NX_PV_pQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-09 22:33   ` Chris Friesen
     [not found]     ` <50EDF01E.10709-b7o/lNNmKxtBDgjK7y7TUQ@public.gmane.org>
2013-01-10 10:04       ` Steven Whitehouse
2013-01-10 15:24         ` Chris Friesen [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=50EEDD3F.9080203@genband.com \
    --to=chris.friesen@genband$(echo .)com \
    --cc=acme@ghostprotocols$(echo .)net \
    --cc=acme@redhat$(echo .)com \
    --cc=andy.grover@gmail$(echo .)com \
    --cc=caitlin.bestler@gmail$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=eliedebrauwer@gmail$(echo .)com \
    --cc=linux-man@vger$(echo .)kernel.org \
    --cc=mtk.manpages@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=nhorman@tuxdriver$(echo .)com \
    --cc=remi.denis-courmont@nokia$(echo .)com \
    --cc=steve@chygwyn$(echo .)com \
    --cc=vanhoof@redhat$(echo .)com \
    --cc=williams@redhat$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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