Thread (10 messages) 10 messages, 3 authors, 2023-05-31

Re: [PATCH net-next 3/4] kcm: Support MSG_SPLICE_PAGES

From: David Howells <dhowells@redhat.com>
Date: 2023-05-31 08:53:51
Also in: linux-mm, lkml

Jakub Kicinski [off-list ref] wrote:
On Wed, 24 May 2023 15:49:22 +0100 David Howells wrote:
quoted
+			err = skb_splice_from_iter(skb, &msg->msg_iter, copy,
+						   sk->sk_allocation);
+			if (err < 0) {
+				if (err == -EMSGSIZE)
+					goto wait_for_memory;
+				goto out_error;
+			}
 
should there be a:

		copy = err;
or:
		copy -= msg_data_left(msg);

or some such here? Can we safely assume that skb_splice_from_iter() will
copy all or nothing? 
Yeah.  Good point.  I didn't add one because the normal operation code doesn't
do that - but I guess that's all-or-nothing.

David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help