From: Yunsheng Lin <linyunsheng@huawei.com>
To: Mina Almasry <almasrymina@google.com>,
<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Jason Gunthorpe" <jgg@nvidia.com>,
"Christian König" <christian.koenig@amd.com>,
"Shakeel Butt" <shakeelb@google.com>,
"Willem de Bruijn" <willemdebruijn.kernel@gmail.com>
Subject: Re: [RFC PATCH net-next v5 2/2] net: add netmem to skb_frag_t
Date: Thu, 11 Jan 2024 20:44:51 +0800 [thread overview]
Message-ID: <5219f2cd-6854-0134-560d-8ae3f363b53f@huawei.com> (raw)
In-Reply-To: <20240109011455.1061529-3-almasrymina@google.com>
On 2024/1/9 9:14, Mina Almasry wrote:
...
>
> + if (WARN_ON_ONCE(!skb_frag_page(&skb_shinfo(skb)->frags[0]))) {
I am really hate to bring it up again.
If you are not willing to introduce a new helper, do you care to use some
existing API like skb_frag_address_safe()?
> + ret = -EINVAL;
> + goto out;
> + }
> +
> 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);
I think we need to use some built-time checking to ensure some consistency
between skb_frag_t and bio_vec.
> iov_iter_advance(&msg.msg_iter, txm->frag_offset);
>
> do {
>
next prev parent reply other threads:[~2024-01-11 12:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-09 1:14 [RFC PATCH net-next v5 0/2] Abstract page from net stack Mina Almasry
2024-01-09 1:14 ` [RFC PATCH net-next v5 1/2] net: introduce abstraction for network memory Mina Almasry
2024-01-10 18:45 ` Shakeel Butt
2024-01-09 1:14 ` [RFC PATCH net-next v5 2/2] net: add netmem to skb_frag_t Mina Almasry
2024-01-11 12:44 ` Yunsheng Lin [this message]
2024-01-12 0:34 ` Mina Almasry
2024-01-12 11:51 ` Yunsheng Lin
2024-01-12 15:35 ` Mina Almasry
2024-01-15 9:37 ` Yunsheng Lin
2024-01-15 23:23 ` Mina Almasry
2024-01-16 0:01 ` Jason Gunthorpe
2024-01-16 11:04 ` Yunsheng Lin
2024-01-16 12:16 ` Jason Gunthorpe
2024-01-17 9:28 ` Yunsheng Lin
2024-01-17 18:00 ` Mina Almasry
2024-01-17 18:34 ` Mina Almasry
2024-01-17 18:54 ` Willem de Bruijn
2024-01-18 8:52 ` Yunsheng Lin
2024-01-18 13:56 ` Mina Almasry
2024-01-10 2:03 ` [RFC PATCH net-next v5 0/2] Abstract page from net stack Jakub Kicinski
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=5219f2cd-6854-0134-560d-8ae3f363b53f@huawei.com \
--to=linyunsheng@huawei.com \
--cc=almasrymina@google.com \
--cc=christian.koenig@amd.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jgg@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shakeelb@google.com \
--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
all inboxes | Powered by JetHome®