From: Jakub Kicinski <kuba@kernel.org>
To: David Howells <dhowells@redhat.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
David Ahern <dsahern@kernel.org>,
Matthew Wilcox <willy@infradead.org>,
Jens Axboe <axboe@kernel.dk>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Tom Herbert <tom@herbertland.com>,
Tom Herbert <tom@quantonium.net>
Subject: Re: [PATCH net-next 3/4] kcm: Support MSG_SPLICE_PAGES
Date: Fri, 26 May 2023 20:12:02 -0700 [thread overview]
Message-ID: <20230526201202.1cd35fe9@kernel.org> (raw)
In-Reply-To: <20230524144923.3623536-4-dhowells@redhat.com>
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;
next prev parent reply other threads:[~2023-05-27 3:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-24 14:49 [PATCH net-next 0/4] splice, net: Replace sendpage with sendmsg(MSG_SPLICE_PAGES), part 2 David Howells
2023-05-24 14:49 ` [PATCH net-next 1/4] chelsio: Support MSG_SPLICE_PAGES David Howells
2023-05-24 14:49 ` [PATCH net-next 2/4] chelsio: Convert chtls_sendpage() to use MSG_SPLICE_PAGES David Howells
2023-05-25 7:50 ` Simon Horman
2023-05-25 8:41 ` David Howells
2023-05-25 8:50 ` Simon Horman
2023-05-24 14:49 ` [PATCH net-next 3/4] kcm: Support MSG_SPLICE_PAGES David Howells
2023-05-27 3:12 ` Jakub Kicinski [this message]
2023-05-31 8:51 ` David Howells
2023-05-24 14:49 ` [PATCH net-next 4/4] kcm: Convert kcm_sendpage() to use MSG_SPLICE_PAGES David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230526201202.1cd35fe9@kernel.org \
--to=kuba@kernel.org \
--cc=axboe@kernel.dk \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tom@herbertland.com \
--cc=tom@quantonium.net \
--cc=willemdebruijn.kernel@gmail.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).