On Tue, Sep 06, 2005 at 08:57:57PM -0700, David S. Miller ([EMAIL PROTECTED]) wrote: > From: Evgeniy Polyakov <[EMAIL PROTECTED]> > Date: Fri, 2 Sep 2005 18:00:55 +0400 > > > sock_sendfile() and generic_file_sendpage() were implemented > > and presented in the attached patch. > > Such methods allows to use sendfile() for any file descriptor <-> file > > descriptor usage, especially usefull it is in the case socket -> file, > > when there are no copy_from_user() cases when writing the data. > > I do not understand the socket sendfile() implementation, you > seem to just be looping back the data to recvmsg(). How does > this work?
It does recvmsg(), but main purpose was to not copy this into userspace, when destination is file descriptor/socket. It does memcpy() unfortunately, but eliminating such a copy will require completely new system call, like recvfile(), which will first prepare a page, and then doing network receiving into it. -- Evgeniy Polyakov - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html