From: David Miller <davem@davemloft.net>
To: acme@kernel.org
Cc: netdev@vger.kernel.org, caitlin.bestler@gmail.com,
chris.friesen@windriver.com, David.Laight@ACULAB.COM,
eliedebrauwer@gmail.com, mtk.manpages@gmail.com,
nhorman@tuxdriver.com, neleai@seznam.cz, paul@paul-moore.com,
remi@remlab.net, steve@chygwyn.com
Subject: Re: [PATCH/RFC] net: Don't save mid batch datagram processing error for next recvmmsg call
Date: Mon, 21 Jul 2014 21:17:54 -0700 (PDT) [thread overview]
Message-ID: <20140721.211754.1556855471792264676.davem@davemloft.net> (raw)
In-Reply-To: <20140721193042.GA20303@kernel.org>
From: Arnaldo Carvalho de Melo <acme@kernel.org>
Date: Mon, 21 Jul 2014 16:30:42 -0300
> From 5cf1a5c682c8bb0add9adfb5167a63f269136523 Mon Sep 17 00:00:00 2001
> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> Date: Mon, 21 Jul 2014 12:39:56 -0300
> Subject: [PATCH 2/2] net: Don't save mid batch datagram processing error for
> next recvmmsg call
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> When the call to the underlying per protocol recvmsg fails for some
> reason and we already have successfully processed at least one datagram
> in the batch, we were saving the error for the next recvmmsg (or
> recvmsg) call, so the user would eventually get notified of what
> happened.
>
> This was found to be fraught with problems, as, for instance, errors
> could be notified for a different thread than a faulty one providing
> invalid buffers.
>
> So just return the number of datagrams successfully received.
>
> Reported-by: David Laight <David.Laight@ACULAB.COM>
...
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This is absolutely correct, any time we have a partial success we must
indicate success and the amount that was properly transferred, leaving
the error signalling for a subsequent retry (if any).
next prev parent reply other threads:[~2014-07-22 4:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-21 19:30 [PATCH/RFC] net: Don't save mid batch datagram processing error for next recvmmsg call Arnaldo Carvalho de Melo
2014-07-22 4:17 ` David Miller [this message]
2014-07-22 8:33 ` David Laight
2014-07-22 13:24 ` 'Arnaldo Carvalho de Melo'
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=20140721.211754.1556855471792264676.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=David.Laight@ACULAB.COM \
--cc=acme@kernel.org \
--cc=caitlin.bestler@gmail.com \
--cc=chris.friesen@windriver.com \
--cc=eliedebrauwer@gmail.com \
--cc=mtk.manpages@gmail.com \
--cc=neleai@seznam.cz \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=paul@paul-moore.com \
--cc=remi@remlab.net \
--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).