Subject: Re: [PATCH] sendfile() and UDP socket

From: Evgeniy Polyakov <[email-masked]>
Date: Mon, 22 Sep 2008 08:19:29 +0400

On Sun, Sep 21, 2008 at 07:07:15PM -0700, David Miller ([email-masked]) wrote:
> > And to send exactly required number of bytes (or size of the cache)?
> > To send a single page (combined to several other pages) we have simple
> > ->sendpage() callback, which should not return error when it is asked to
> > send a data and it can do it by actually submitting two packets without
> > special tcp-like processing of the segments.
> 
> You're basically throwing away the difference between datagram and stream
> socket semantics.
> 
> I don't see what else I can explain if you cannot see that this is
> significant.

Hey David, that's getting the wrong direction :)
Do not make decision backed by what you read or decided to think before
that instead of making it clear.

Stream socket means that whatever data we put to it, it will become
completely boundary-free, in that regard, that receiving side will not
be able to get original sending packet sizes (without too much efforts).

Datagram just preservs the boundaries and that's what we have with this
patch. Previously we accumulated a single segment upto predefined size
and sent it when it is complete. Now we are able to sent it when it is
complete and start creating new segment without returning the error.

Like:
previosly: A + A + A + A + send + return
now: A + A + A + A + send + A + A and so on, so effectively nothing
changes except maybe time when segment is being sent: previously it was
on the full size and now it is when new packet does not fit that
predefined size.

-- 
	Evgeniy Polyakov