From: Shakeel Butt <shakeelb@google.com>
To: Mina Almasry <almasrymina@google.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
"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>,
"Yunsheng Lin" <linyunsheng@huawei.com>,
"Willem de Bruijn" <willemdebruijn.kernel@gmail.com>
Subject: Re: [RFC PATCH net-next v5 1/2] net: introduce abstraction for network memory
Date: Wed, 10 Jan 2024 10:45:00 -0800 [thread overview]
Message-ID: <CALvZod4Ngqn0scEM9JhRCav88ZFB=LLmTiLj9fd_04moCLTsyg@mail.gmail.com> (raw)
In-Reply-To: <20240109011455.1061529-2-almasrymina@google.com>
On Mon, Jan 8, 2024 at 5:15 PM Mina Almasry <almasrymina@google.com> wrote:
>
> Add the netmem_ref type, an abstraction for network memory.
>
> To add support for new memory types to the net stack, we must first
> abstract the current memory type. Currently parts of the net stack
> use struct page directly:
>
> - page_pool
> - drivers
> - skb_frag_t
>
> Originally the plan was to reuse struct page* for the new memory types,
> and to set the LSB on the page* to indicate it's not really a page.
> However, for compiler type checking we need to introduce a new type.
>
> netmem_ref is introduced to abstract the underlying memory type.
> Currently it's a no-op abstraction that is always a struct page
> underneath. In parallel there is an undergoing effort to add support
> for devmem to the net stack:
>
> https://lore.kernel.org/netdev/20231208005250.2910004-1-almasrymina@google.com/
>
> netmem_ref can be pointers to different underlying memory types, and the
> low bits are set to indicate the memory type. Helpers are provided
> to convert netmem pointers to the underlying memory type (currently only
> struct page). In the devmem series helpers are provided so that calling
> code can use netmem without worrying about the underlying memory type
> unless absolutely necessary.
>
> Signed-off-by: Mina Almasry <almasrymina@google.com>
>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
next prev parent reply other threads:[~2024-01-10 18:45 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 [this message]
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
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='CALvZod4Ngqn0scEM9JhRCav88ZFB=LLmTiLj9fd_04moCLTsyg@mail.gmail.com' \
--to=shakeelb@google.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=linyunsheng@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).