From: Andi Kleen <andi@firstfloor.org>
To: jamal <hadi@cyberus.ca>
Cc: Andi Kleen <andi@firstfloor.org>,
netdev@vger.kernel.org, David Miller <davem@davemloft.net>
Subject: Re: [RFC] IP_RECVERRC
Date: Fri, 10 Aug 2007 18:26:43 +0200 [thread overview]
Message-ID: <20070810162643.GA11892@one.firstfloor.org> (raw)
In-Reply-To: <1186756212.5163.4.camel@localhost>
On Fri, Aug 10, 2007 at 10:30:12AM -0400, jamal wrote:
> On Fri, 2007-10-08 at 16:02 +0200, Andi Kleen wrote:
> > On Fri, Aug 10, 2007 at 09:35:12AM -0400, jamal wrote:
>
> >
> > Affected in what way?
> >
>
> They dont get errors back and they just keep sending even in the
> presence of errors - take a look at ip_push_pending_frames. I have been
> struggling initially to unconditionally mod that part, but it may break
> certain apps expectations.
Are we talking about TCP or UDP/RAW?
The reason why IP_RECVERR was invented was that for non connected
DGRAM sockets there was no way to figure out for which target host
the error was. So they were dropped. With IP_RECVERR you can get them
together with the original target address.
If you connect the DGRAM socket and don't set IP_RECVERR you will just get
errnos -- that might be what you want.
If you're talking about TCP: IP_RECVERR never made too much sense here.
Normally TCP only reports errors after a major timeout.
At some point Alexey added an extension that if IP_RECVERR is set
you won't need to wait on the timeout, but get the error immediately
delivered using MSG_ERRQUEUE. That actually breaks TCP because it
is not resistent to shifting routes etc. anymore so it's a pretty bad idea.
If for TCP you just want the error delivery without MSG_ERRQUEUE
you could just decrease the max timeouts. Then major timeouts
will happen sooner and you'll get the errnos sooner too.
Of course TCP will be far more unreliable than it is. But it might
be ok for some few applications who really know what they're doing
(but more likely it is just programmer hybris who think
they know all about the networks the app will ever be deployed on)
Anyways, it might make sense to set these timeouts per socket (right now
it is only global sysctl), but on the other hand that would bloat
the already bloated tcp_sock even more.
-Andi
next prev parent reply other threads:[~2007-08-10 16:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-10 13:35 [RFC] IP_RECVERRC jamal
2007-08-10 14:02 ` Andi Kleen
2007-08-10 14:30 ` jamal
2007-08-10 16:26 ` Andi Kleen [this message]
2007-08-11 19:27 ` jamal
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=20070810162643.GA11892@one.firstfloor.org \
--to=andi@firstfloor.org \
--cc=davem@davemloft.net \
--cc=hadi@cyberus.ca \
--cc=netdev@vger.kernel.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).