Re: [RFC] situation with csum_and_copy_... API

From
Al Viro <viro@ZenIV.linux.org.uk>
Date
2014-11-21 19:39:21
Also in
lkml
Reply to
David Laight, 2014-11-21
On Fri, Nov 21, 2014 at 05:42:55PM +0000, David Laight wrote:
Callers of kernel_send/recvmsg() could easily be using a wrapper
function that creates the 'msghdr'.
When the want to send the remaining part of a buffer the old iterator
will no longer be available - just the original iov and the required offset.
Er...  So why not copy a struct iov_iter to/from msg->msg_iter, then?
It's not as it had been particulary large - 5 words isn't much...

I'm not at all sure that _anything_ has valid reasons for draining iovecs.
Maintaining a struct iov_iter and modifying it is easy and actually faster...

Right now the main examples outside of net/* are due to unfortunate
limitations of ->sendmsg() - until now it had no way to be told that
desired data starts at offset.  With ->msg_iter it obviously becomes
possible...
Thread (133 messages) 133 messages, 9 authors, last reply 2015-02-03
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help