netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jeffray <ian@jeffray.co.uk>
To: Jay Cliburn <jacliburn@bellsouth.net>
Cc: netdev@vger.kernel.org
Subject: Re: sendfile() behavior while troubleshooting netdevice
Date: Tue, 29 Jul 2008 01:27:09 +0100	[thread overview]
Message-ID: <488E63DD.4020406@jeffray.co.uk> (raw)
In-Reply-To: <20080728190707.329d247b@osprey.hogchain.net>

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.


  reply	other threads:[~2008-07-29  0:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-29  0:07 sendfile() behavior while troubleshooting netdevice Jay Cliburn
2008-07-29  0:27 ` Ian Jeffray [this message]
2008-07-29  0:52   ` Jay Cliburn
2008-07-29  6:28 ` Evgeniy Polyakov
2008-07-29 13:32   ` J. K. Cliburn
2008-07-29  9:32 ` Jarek Poplawski
2008-07-29 13:16   ` J. K. Cliburn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=488E63DD.4020406@jeffray.co.uk \
    --to=ian@jeffray.co.uk \
    --cc=jacliburn@bellsouth.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).