From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Waychison Date: Sat, 07 Feb 2004 02:04:29 +0000 Subject: Re: [PATCH] convert udevsend/udevd to DGRAM and single-threaded Message-Id: <402447AD.50805@sun.com> List-Id: References: <40232F58.3040404@sympatico.ca> In-Reply-To: <40232F58.3040404@sympatico.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Patrick Mansfield wrote: >On Fri, Feb 06, 2004 at 05:22:23PM -0500, Chris Friesen wrote: > > >>Patrick Mansfield wrote: >> >> >> >>>>On Fri, Feb 06, 2004 at 01:08:24AM -0500, Chris Friesen wrote: >>>> >>>> >>>>- ssock = socket(AF_LOCAL, SOCK_STREAM, 0); >>>>+ ssock = socket(AF_LOCAL, SOCK_DGRAM, 0); >>>> >>>> >>>How are dropped packets handled? >>> >>> > > > >>If udevd is not present, then the udevsend creates it. Otherwise, it blocks >>until the message is placed in udevd's buffer. No problem there. >> >>If udevd crashes after the message was placed in its rx buffer but before >>handling it, then you have a problem, but this problem exists for any protocol >>and to solve it you need to have an ack message sent back to udevsend *after* >>the udev has run and returned for that message. >> >> > >I mean, SOCK_DGRAM is an unreliable transport, so what happens if the >transport drops packets? It might be unlikely, especially for the AF_LOCAL, >but it is possible. > >I don't see any ack or retransmit code in udevsend. > > > SOCK_DGRAM is a reliable transport under AF_UNIX / AF_LOCAL. From unix(7): Valid types are SOCK_STREAM for a stream oriented socket and SOCK_DGRAM for a datagram oriented socket that preserves message boundaries. Unix sockets are always reliable and don't reorder datagrams. -- Mike Waychison Sun Microsystems, Inc. 1 (650) 352-5299 voice 1 (416) 202-8336 voice mailto: Michael.Waychison@Sun.COM http://www.sun.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NOTICE: The opinions expressed in this email are held by me, and may not represent the views of Sun Microsystems, Inc. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel