Date: Wed, 14 Mar 2001 07:54:59 -0800 From: Lars Eggert <larse@ISI.EDU> To: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> Cc: net@FreeBSD.ORG Subject: Re: Changing UDP select() behavior Message-ID: <3AAF9453.C4E07BE4@isi.edu> References: <3AAEBEAE.F823CB8E@isi.edu> <200103140156.UAA42646@khavrinen.lcs.mit.edu>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] Garrett Wollman wrote: > > <<On Tue, 13 Mar 2001 16:43:26 -0800, Lars Eggert <larse@ISI.EDU> said: > > > I'm considering changing this, so that a select-to-write on a UDP socket > > will block until queue space becomes available. > > Impossible. The only way to find out whether a packet (or set of > packets, or a fragment of a packet) would be successfully enqueued is > to try it. Even then there's no guarantee that it will get sent. > > (Actually, ``impossible'' is too strong -- we could restructure the > entire network stack to make it possible to speculatively send packets > just to support this change in select() semantics. It's merely > impractical.) You try to queue a packet, if fails, then you do things (e.g. use the UDP soscket buffer to keep it around until later). The trick is that you need to block with your network interface as a wait channel, and the dequeue loop needs to wakeup the sleepers when the queue is draining. I agree that it's not a trivial change, but I don't think it's impossible or impractical. Lars -- Lars Eggert <larse@isi.edu> Information Sciences Institute http://www.isi.edu/larse/ University of Southern California [-- Attachment #2 --] 0# *H 010 + 0 *H 00A#0 *H 010 UZA10UWestern Cape10UDurbanville10 U Thawte10UCertificate Services1(0&UPersonal Freemail RSA 1999.9.160 000824203008Z 010824203008Z0T10 UEggert1 0U*Lars10ULars Eggert10 *H larse@isi.edu00 *H 0 \p9 H;vr∩6"C?mxfJf7I[3CF́L I - zHRVA怤2]0-bL)%X>nӅ w0u0*+e!0 00L2uMyffBNUbNJJcdZ2s0U0 larse@isi.edu0U0 0U#0`fUXFa#Ì0 *H _3 F=%nWY-HXD9UOc6ܰwf@uܶNԄR?Pr}E1֮23mFhySwM_h|d yR=$P 00}0 *H 010 UZA10UWestern Cape10U Cape Town10U Thawte Consulting1(0&UCertification Services Division1$0"UThawte Personal Freemail CA1+0) *H personal-freemail@thawte.com0 990916140140Z 010915140140Z010 UZA10UWestern Cape10UDurbanville10 U Thawte10UCertificate Services1(0&UPersonal Freemail RSA 1999.9.1600 *H 0 iZz]!#rLK~r$BRW{azr98e^eyvL>hput ,O 1ArƦ]D.Mօ>lx~@эWs0FO 7050U0 0U#0rIs4Uvr~wƲ0 *H kY1rr`HU{gapm¥7؝(V\uoƑlfq|ko!6- -mƃRt\~ orzg,ks nΝc) ~U100010 UZA10UWestern Cape10UDurbanville10 U Thawte10UCertificate Services1(0&UPersonal Freemail RSA 1999.9.16#0 + 0 *H 1 *H 0 *H 1 010314155459Z0# *H 1c^V#8Jo m0R *H 1E0C0 *H 0*H 0+0 *H @0 *H (0 *H zk$År>Yp "{$L K"pxhpNpj[yP:d趒zU]݁Ԅ4 <<(ʰǑ]]}<nuH`T%# nmjshelp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AAF9453.C4E07BE4>
