From: Shakeel Butt <shakeelb@google.com>
To: Mina Almasry <almasrymina@google.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
kvm@vger.kernel.org, virtualization@lists.linux.dev,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Stefano Garzarella" <sgarzare@redhat.com>,
"David Howells" <dhowells@redhat.com>,
"Jason Gunthorpe" <jgg@nvidia.com>,
"Christian König" <christian.koenig@amd.com>,
"Yunsheng Lin" <linyunsheng@huawei.com>,
"Willem de Bruijn" <willemdebruijn.kernel@gmail.com>
Subject: Re: [PATCH net-next v3 3/3] net: add netmem_ref to skb_frag_t
Date: Thu, 21 Dec 2023 23:27:16 +0000 [thread overview]
Message-ID: <20231221232716.4fspnvngfuqhaycu@google.com> (raw)
In-Reply-To: <20231220214505.2303297-4-almasrymina@google.com>
On Wed, Dec 20, 2023 at 01:45:02PM -0800, Mina Almasry wrote:
> diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c
> index 65d1f6755f98..3180a54b2c68 100644
> --- a/net/kcm/kcmsock.c
> +++ b/net/kcm/kcmsock.c
> @@ -636,9 +636,15 @@ static int kcm_write_msgs(struct kcm_sock *kcm)
> for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
> msize += skb_shinfo(skb)->frags[i].bv_len;
Don't you need the above to cast to bio_vec to get bv_len? skb_frag_t
does not have bv_len anymore.
>
> + /* The cast to struct bio_vec* here assumes the frags are
> + * struct page based. WARN if there is no page in this skb.
> + */
> + DEBUG_NET_WARN_ON_ONCE(
> + !skb_frag_page(&skb_shinfo(skb)->frags[0]));
> +
> iov_iter_bvec(&msg.msg_iter, ITER_SOURCE,
> - skb_shinfo(skb)->frags, skb_shinfo(skb)->nr_frags,
> - msize);
> + (const struct bio_vec *)skb_shinfo(skb)->frags,
> + skb_shinfo(skb)->nr_frags, msize);
> iov_iter_advance(&msg.msg_iter, txm->frag_offset);
>
> do {
> --
> 2.43.0.472.g3155946c3a-goog
>
next prev parent reply other threads:[~2023-12-21 23:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-20 21:44 [PATCH net-next v3 0/3] Abstract page from net stack Mina Almasry
2023-12-20 21:45 ` [PATCH net-next v3 1/3] vsock/virtio: use skb_frag_*() helpers Mina Almasry
2023-12-21 17:17 ` Willem de Bruijn
2023-12-21 21:39 ` Shakeel Butt
2024-01-02 10:00 ` Stefano Garzarella
2023-12-20 21:45 ` [PATCH net-next v3 2/3] net: introduce abstraction for network memory Mina Almasry
2023-12-21 23:23 ` Shakeel Butt
2023-12-21 23:44 ` Mina Almasry
2024-01-04 21:44 ` Jakub Kicinski
2024-01-04 22:15 ` Mina Almasry
2024-01-10 17:50 ` Shakeel Butt
2024-01-11 1:35 ` Jakub Kicinski
2023-12-20 21:45 ` [PATCH net-next v3 3/3] net: add netmem_ref to skb_frag_t Mina Almasry
2023-12-21 17:16 ` Simon Horman
2023-12-21 17:18 ` Willem de Bruijn
2023-12-21 23:27 ` Shakeel Butt [this message]
2023-12-22 20:10 ` kernel test robot
2023-12-22 23:39 ` kernel test robot
2023-12-23 11:16 ` kernel test robot
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=20231221232716.4fspnvngfuqhaycu@google.com \
--to=shakeelb@google.com \
--cc=almasrymina@google.com \
--cc=christian.koenig@amd.com \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=edumazet@google.com \
--cc=jgg@nvidia.com \
--cc=kuba@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linyunsheng@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux.dev \
--cc=willemdebruijn.kernel@gmail.com \
/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).