From: Ben Greear <greearb@candelatech.com>
To: kuznet@ms2.inr.ac.ru
Cc: Chris Friesen <cfriesen@nortelnetworks.com>,
hadi@cyberus.CA, netdev@oss.sgi.com
Subject: Re: PATCH Re: udp weirdness
Date: Tue, 01 Oct 2002 09:42:09 -0700 [thread overview]
Message-ID: <3D99D061.1090208@candelatech.com> (raw)
In-Reply-To: 200210011531.TAA19943@sex.inr.ac.ru
kuznet@ms2.inr.ac.ru wrote:
> Hello!
>
>
>>>Feel free to implement. :-)
>>
>>I may have to poke around...if nothing else I'll learn more about the
>>networking code...
>
>
> It is difficult task, if possible at all.
>
> The main obstacle is that we must not block after select() succeeded,
> otherwise applications will lockup. Taking into account nature of datagram
> services (and generally of networking services, where routes change et al.)
> you do not know at time of select(), where the datagram will go.
> So, blocking can be made only based on a criterium not depending on this.
>
> We use sndbuf (like all the OSes). Actually, the problem with silent
> losses is solved by tuning SO_SNDBUF. Though it is not a complete
> solution (failing whith lots of senders), it solves all those bullshit
> problems with silent losses. People just do not care about this, so
> they get the thing which they deserve.
Changing the size of the sending buffer will make you able to drop fewer
packets in bursty behaviour, but it does not guarantee you anything, does
it? For those of us wanting to write programs with very little slop in
their behaviour, 'most of the time' is not good enough.
I have not yet looked at the UDP code in detail, but it does appear we
can know if a NIC accepts the packet for transmit or not. If it does
not, then just don't dequeue off of the send list, retry it next time.
I cannot see any logical reason that we cannot ensure that a packet is
not at least given to the driver when accepted by sendto. As soon as I
get my pktgen and send-to-self code cleaned up, I am planning to start
working on making UDP reliably send packets, or return an error to
the calling code. I will, of course, keep you informed if I actually
get something working...
Enjoy,
Ben
>
>
>
>>dropped when there is congestion. If IP_RECVERR is turned on, would
>>sendto() then return -1 so I know to try and read the error messages?
>
>
> Yes.
>
>
>
>>I'm assuming I get ENOBUFS back in the ee_code field? Or can I get away
>>with reading errno and ignoring the error queue?
>
>
> No, error queue should be read. But not all the errors are queued,
> only those which are supported asynchronously. ENOBUFS is still not.
> F.e. when packet is dropped lately (some qdiscs do this, dropping already
> queued packets to give place for another ones) ENOBUFS is not sent back.
>
>
>
>> there doesn't seem to be a lot of
>>documentation about it.
>
>
> Damn! (I'm sorry) It is documented _very_ well, thanks to Andi.
> I really hate this mode when people do not worrying even to look to manpages
> before pronouncing such statements.
>
> man recvmsg
> man ip
>
> Alexey
>
--
Ben Greear <greearb@candelatech.com> <Ben_Greear AT excite.com>
President of Candela Technologies Inc http://www.candelatech.com
ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear
next prev parent reply other threads:[~2002-10-01 16:42 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-24 6:50 udp weirdness Eric Lemoine
2002-09-27 12:02 ` Eric Lemoine
2002-09-27 14:53 ` jamal
2002-09-27 15:04 ` Matti Aarnio
2002-09-29 14:47 ` jamal
2002-09-30 8:49 ` Eric Lemoine
2002-09-30 11:09 ` jamal
2002-09-30 12:10 ` jamal
2002-09-30 12:23 ` jamal
2002-10-01 0:22 ` PATCH " jamal
2002-10-01 6:35 ` Eric Lemoine
2002-10-01 9:51 ` jamal
2002-10-01 13:53 ` kuznet
2002-10-01 14:14 ` jamal
2002-10-01 14:26 ` Chris Friesen
2002-10-01 14:40 ` kuznet
2002-10-01 14:52 ` Chris Friesen
2002-10-01 15:31 ` kuznet
2002-10-01 16:16 ` Chris Friesen
2002-10-01 16:41 ` kuznet
2002-10-01 17:17 ` Chris Friesen
2002-10-01 16:42 ` Ben Greear [this message]
2002-10-01 16:58 ` Chris Friesen
2002-10-01 17:55 ` jamal
2002-10-01 18:36 ` Chris Friesen
2002-10-01 18:35 ` jamal
2002-10-01 18:54 ` Ben Greear
2002-10-01 19:03 ` Chris Friesen
2002-10-01 18:52 ` Ben Greear
2002-10-02 11:13 ` Eric Lemoine
2002-10-02 14:09 ` Chris Friesen
2002-10-02 15:25 ` Ben Greear
2002-10-03 15:58 ` Eric Lemoine
2002-10-03 16:29 ` kuznet
2002-09-27 15:19 ` Eric Lemoine
2002-09-27 15:57 ` Eric Lemoine
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=3D99D061.1090208@candelatech.com \
--to=greearb@candelatech.com \
--cc=cfriesen@nortelnetworks.com \
--cc=hadi@cyberus.CA \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@oss.sgi.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).