lkml.org 
[lkml]   [2023]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next 3/4] kcm: Support MSG_SPLICE_PAGES
On Wed, 24 May 2023 15:49:22 +0100 David Howells wrote:
> + 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?

> - err = skb_copy_to_page_nocache(sk, &msg->msg_iter, skb,
> - pfrag->page,
> - pfrag->offset,
> - copy);
> - if (err)
> - goto out_error;
> + skb_shinfo(skb)->flags |= SKBFL_SHARED_FRAG;

\
 
 \ /
  Last update: 2023-05-27 05:12    [W:0.136 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site