Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Mar 2001 08:32:44 -0800
From:      Lars Eggert <larse@ISI.EDU>
To:        Luigi Rizzo <luigi@info.iet.unipi.it>
Cc:        net@FreeBSD.ORG
Subject:   Re: Changing UDP select() behavior
Message-ID:  <3AAF9D2C.2A337CC8@isi.edu>
References:  <200103141622.RAA19510@info.iet.unipi.it>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a cryptographically signed message in MIME format.

--------------msE552710398391F6DD0E3E94C
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Luigi Rizzo wrote:
> > > All in all I think this approach would only help a bit if
> > > if you were allowed to queue in the socket buffer
> > > (on which you can think of having some control, because you either
> > > opened the fd yourself or you inherited it from some parent),
> > > in addition to the device queue.
> >
> > Could you explain this a little more? I think I know where you're going
> > with this, but I'm not sure :-)
> 
> i think i meant you want to buffer your overflowing packets in the
> socket buffer, and use them as an extension of the ipq. Basically
> once the interface queue is full, you create a list of socket buffers
> waiting for a transmit, then when a slot in the ifqueue becomes empty
> you fill it up with the next pkt from next the socket buffer
> without having to wakeup the process associated with it unless
> you pass the lowwater mark.

This is more elaborate that what I was proposing. I was only thinking about
queueing one UDP packet per socket when blocking, so there are no socket
buffer queueing issues. I think queueing more than one could be more
problematic for some applications, since it might decouple the write call
returning from the actual send time of the packet too much.

It'd be interesting to make the number of packets allowed to be queued in a
UDP socket buffer a parameter, though... 

> But again, it is quite a bit of work to put all this code together,
> and you end up with something that other systems do not have so
> when you want to write portable code you still have to handle
> the old behaviour as well in userland.

Yes. But we're talking research here :-) (E.g. once UDP blocking is there,
I can use it to do other neat things in the networking stack...)

Lars
-- 
Lars Eggert <larse@isi.edu>                 Information Sciences Institute
http://www.isi.edu/larse/                University of Southern California
--------------msE552710398391F6DD0E3E94C
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIII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nZ6CYynvkwl+Vd4xggH3MIIB8wIBATCBnDCBlDELMAkGA1UEBhMCWkExFTATBgNVBAgT
DFdlc3Rlcm4gQ2FwZTEUMBIGA1UEBxMLRHVyYmFudmlsbGUxDzANBgNVBAoTBlRoYXd0ZTEd
MBsGA1UECxMUQ2VydGlmaWNhdGUgU2VydmljZXMxKDAmBgNVBAMTH1BlcnNvbmFsIEZyZWVt
YWlsIFJTQSAxOTk5LjkuMTYCAwMjBTAJBgUrDgMCGgUAoIGxMBgGCSqGSIb3DQEJAzELBgkq
hkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTAxMDMxNDE2MzI0NFowIwYJKoZIhvcNAQkEMRYE
FP8agwnwJCLryWHitUYEBiE1ZucAMFIGCSqGSIb3DQEJDzFFMEMwCgYIKoZIhvcNAwcwDgYI
KoZIhvcNAwICAgCAMAcGBSsOAwIHMA0GCCqGSIb3DQMCAgFAMA0GCCqGSIb3DQMCAgEoMA0G
CSqGSIb3DQEBAQUABIGABDIEPHWVe6Lh8TP8l64IhNjjdrSB2AoW1t0+bHeLvhEJFzLQpWqC
tSbqkdYiRQTkoLQFjK2hueSnt9F9eI/AMVBUS2DupZdqOMoDOnWhCqfwO0PYAams3EYajOCq
jF/4gvdfO6aR2HF9u6kl/wDc5DGR53Mi0469voPLjgKDR8E=
--------------msE552710398391F6DD0E3E94C--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AAF9D2C.2A337CC8>