netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: "Michael Kerrisk (man-pages)"
	<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "David Laight"
	<David.Laight-JxhZ9S5GRejQT0dZR+AlfA@public.gmane.org>,
	lkml <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	netdev <netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Ondrej Bílka" <neleai-9Vj9tDbzfuSlVyrhU4qvOw@public.gmane.org>,
	"Caitlin Bestler"
	<caitlin.bestler-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Neil Horman" <nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>,
	"Elie De Brauwer"
	<eliedebrauwer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"David Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	"Steven Whitehouse"
	<steve-TMeXKDtMCpxBDgjK7y7TUQ@public.gmane.org>,
	"Rémi Denis-Courmont"
	<remi.denis-courmont-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
	"Paul Moore" <paul-r2n+y4ga6xFZroRs9YW3xA@public.gmane.org>,
	"Chris Friesen"
	<chris.friesen-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
Subject: Re: [PATCH/RFC] Re: recvmmsg() timeout behavior strangeness [RESEND]
Date: Tue, 24 Jun 2014 17:25:41 -0300	[thread overview]
Message-ID: <20140624202541.GD3456@kernel.org> (raw)
In-Reply-To: <CAKgNAkj-MVfeqEeffWKMNok0yO-Rm1kyY+zhXEy-U9NkB+aLow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Em Mon, Jun 16, 2014 at 11:58:51AM +0200, Michael Kerrisk (man-pages) escreveu:
> Hi Arnaldo,
> 
> Things have gone quiet ;-). What's the current state of this patch?

Yeah, I kept meaning to prod the other people on this thread about what
they thought about my last messages, patches, etc. :-)

Can I have acked-by or even tested-by on those? Is it ok?

- Arnaldo

> Thanks,
> 
> Michael
> 
> 
> On Thu, May 29, 2014 at 4:17 PM, Arnaldo Carvalho de Melo
> <acme-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org> wrote:
> > Em Thu, May 29, 2014 at 02:06:04PM +0000, David Laight escreveu:
> >> From: 'Arnaldo Carvalho de Melo'
> >> ...
> >> > > I remember some discussions from an XNET standards meeting (I've forgotten
> >> > > exactly which errors on which calls were being discussed).
> >> > > My recollection is that you return success with a partial transfer
> >> > > count for ANY error that happens after some data has been transferred.
> >> > > The actual error will be returned when it happens again on the next
> >> > > system call - Note the AGAIN, not a saved error.
> >
> >> > A saved error, for the right entity, in the recvmmsg case, that
> >> > basically is batching multiple recvmsg syscalls, doesn't sound like a
> >> > problem, i.e. the idea is to, as much as possible, mimic what multiple
> >> > recvmsg calls would do, but reduce its in/out kernel (and inside kernel
> >> > subsystems) overhead.
> >
> >> > Perhaps we can have something in between, i.e. for things like EFAULT,
> >> > we should report straight away, effectively dropping whatever datagrams
> >> > successfully received in the current batch, do you agree?
> >
> >> Not unreasonable - EFAULT shouldn't happen unless the application
> >> is buggy.
> >
> > Ok.
> >
> >> > For transient errors the existing mechanism, fixed so that only per
> >> > socket errors are saved for later, as today, could be kept?
> >
> >> I don't think it is ever necessary to save an errno value for the
> >> next system call at all.
> >> Just process the next system call and see what happens.
> >
> >> If the call returns with less than the maximum number of datagrams
> >> and with a non-zero timeout left - then the application can infer
> >> that it was terminated by an abnormal event of some kind.
> >> This might be a signal.
> >
> > Then it could use getsockopt(SO_ERROR) perhaps? I.e. we don't return the
> > error on the next call, but we provide a way for the app to retrieve the
> > reason for the smaller than expected batch?
> >
> >> I'm not sure if an icmp error on a connected datagram socket could
> >> generate a 'disconnect'. It might happen if the interface is being
> >> used for something like SCTP.
> >> In either case the next call will detect the error.
> >
> > - Arnaldo
> 
> 
> 
> -- 
> Michael Kerrisk
> Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
> Linux/UNIX System Programming Training: http://man7.org/training/
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-06-24 20:25 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)
     [not found] ` <536101C9.9090601-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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
     [not found]     ` <20140512143451.GB13801-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-05-21 21:05       ` [PATCH/RFC] " Arnaldo Carvalho de Melo
     [not found]         ` <20140521210535.GA5414-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
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
     [not found]               ` <20140526134647.GB8176-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-05-26 21:17                 ` Arnaldo Carvalho de Melo
2014-05-27 16:35                   ` Michael Kerrisk (man-pages)
     [not found]                     ` <5384BEC5.2080607-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-27 19:21                       ` Arnaldo Carvalho de Melo
     [not found]                         ` <20140527192115.GD25474-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-05-27 19:22                           ` Arnaldo Carvalho de Melo
2014-05-27 19:28                           ` Michael Kerrisk (man-pages)
     [not found]                             ` <CAKgNAkht1vubHueYPpkRu_W5B8OYW3rPUkHeLEq5WMVbCvO47w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-27 20:30                               ` Arnaldo Carvalho de Melo
2014-05-28  5:00                                 ` Michael Kerrisk (man-pages)
     [not found]                                 ` <20140527203010.GA2764-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-05-28 12:20                                   ` Michael Kerrisk (man-pages)
2014-05-28 15:07                                     ` Arnaldo Carvalho de Melo
     [not found]                                       ` <20140528150720.GB2764-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-05-28 15:17                                         ` David Laight
2014-05-28 19:50                                           ` 'Arnaldo Carvalho de Melo'
     [not found]                                             ` <20140528195004.GD2764-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
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'
     [not found]                                                     ` <20140529141705.GI2764-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
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)
     [not found]                                                       ` <CAKgNAkj-MVfeqEeffWKMNok0yO-Rm1kyY+zhXEy-U9NkB+aLow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-24 20:25                                                         ` Arnaldo Carvalho de Melo [this message]
     [not found]                                                           ` <20140624202541.GD3456-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-06-27 11:29                                                             ` Michael Kerrisk (man-pages)
2014-05-29 14:07                                               ` Michael Kerrisk (man-pages)
     [not found]                                     ` <5385D47A.3070401-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-06-27 11:37                                       ` Michael Kerrisk (man-pages)
2014-05-23 19:00           ` David Miller
     [not found]             ` <20140523.150055.2214666905697701415.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2014-05-23 19:55               ` Arnaldo Carvalho de Melo
     [not found]                 ` <20140523195522.GH2741-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-05-24  6:13                   ` Michael Kerrisk (man-pages)

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=20140624202541.GD3456@kernel.org \
    --to=acme-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=David.Laight-JxhZ9S5GRejQT0dZR+AlfA@public.gmane.org \
    --cc=caitlin.bestler-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=chris.friesen-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=eliedebrauwer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=neleai-9Vj9tDbzfuSlVyrhU4qvOw@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
    --cc=paul-r2n+y4ga6xFZroRs9YW3xA@public.gmane.org \
    --cc=remi.denis-courmont-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=steve-TMeXKDtMCpxBDgjK7y7TUQ@public.gmane.org \
    /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).