Re: [PATCH] sendfile() and UDP socket
From: Johann Baudy <hidden>
Date: 2008-10-14 07:10:11
Hi All, I'm sorry for this late reply but I was out of Internet access during one month. So if my understanding is correct, sendfile() over UDP can't be used to send a file > 64 ko in one system call, as each request must fit in one UDP packet. However is it expected that sendfile() returns 64Ko but sends nothing over the network when we are performing this particular case (file>64ko)? should it return 0? Thanks in advance, Johann
On Wed, Sep 24, 2008 at 6:53 AM, Bill Fink [off-list ref] wrote:quoted
On Tue, 23 Sep 2008, Herbert Xu wrote:quoted
On Tue, Sep 23, 2008 at 10:27:10AM +0400, Evgeniy Polyakov wrote:quoted
On Tue, Sep 23, 2008 at 12:54:27PM +0800, Herbert Xu (herbert@gondor.apana.org.au) wrote:quoted
I think this dicussion is moot since the only time you want to use sendfile is for bulk transfers and these days anybody designing new applications that does bulk transfers over UDP should be taken out and shot.One can protect himself pointing how slow may be memory bus in some hardware setup, which completely does not allow to perform any copy.Yes but bulk transfers over UDP is a bad idea regardless of how slow your bus is :) So what application needs this?It seems it might be useful for a video server. The one thing that seems to be missing from the sendfile() semantics is a message size to be used for splitting the file into UDP datagrams, but this could be provided by a separate ioctl(), and could default to the largest message size that would fit in the MTU. -Bill-- Johann Baudy johaahn@gmail.com
-- Johann Baudy johaahn@gmail.com