[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080922041929.GA20165@2ka.mipt.ru>
Date: Mon, 22 Sep 2008 08:19:29 +0400
From: Evgeniy Polyakov <johnpol@....mipt.ru>
To: David Miller <davem@...emloft.net>
Cc: johaahn@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH] sendfile() and UDP socket
On Sun, Sep 21, 2008 at 07:07:15PM -0700, David Miller (davem@...emloft.net) 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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists