Subject: Re: sendfile() behavior while troubleshooting netdevice

From: Ian Jeffray <[email-masked]>
Date: Tue, 29 Jul 2008 01:27:09 +0100

Jay Cliburn wrote:
> I'm troubleshooting the problem reported here and I need some help:  
> http://lkml.org/lkml/2008/7/15/325.  

[snip]

> The last round came up short 8 bytes.  Any idea why?  Client and server
> source code attached.
> 
> It doesn't matter which host is the server or client; data is lost
> either way.

Because you send() a strlen() amount of data for the filesize,
but recv() a sizeof(cfsize) amount of data?   I supect 8 bytes
is being sucked up in your first recv().  Try sending a fixed
size block for the file size.

Ian.