netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/3] Abstract page from net stack
@ 2023-12-20 21:44 Mina Almasry
  2023-12-20 21:45 ` [PATCH net-next v3 1/3] vsock/virtio: use skb_frag_*() helpers Mina Almasry
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Mina Almasry @ 2023-12-20 21:44 UTC (permalink / raw)
  To: linux-kernel, netdev, kvm, virtualization
  Cc: Mina Almasry, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Stefan Hajnoczi, Stefano Garzarella, David Howells,
	Jason Gunthorpe, Christian König, Shakeel Butt, Yunsheng Lin,
	Willem de Bruijn

Changes in v3:

- Replaced the struct netmem union with an opaque netmem_ref type.
- Added func docs to the netmem helpers and type.
- Renamed the skb_frag_t fields since it's no longer a bio_vec

-----------

Changes in v2:
- Reverted changes to the page_pool. The page pool now retains the same
  API, so that we don't have to touch many existing drivers. The devmem
  TCP series will include the changes to the page pool.

- Addressed comments.

This series is a prerequisite to the devmem TCP series. For a full
snapshot of the code which includes these changes, feel free to check:

https://github.com/mina/linux/commits/tcpdevmem-rfcv5/

-----------

Currently these components in the net stack use the struct page
directly:

1. Drivers.
2. Page pool.
3. skb_frag_t.

To add support for new (non struct page) memory types to the net stack, we
must first abstract the current memory type.

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 safe compiler type checking we need to introduce a new type.

struct netmem 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/

Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Yunsheng Lin <linyunsheng@huawei.com>
Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>

Mina Almasry (3):
  vsock/virtio: use skb_frag_*() helpers
  net: introduce abstraction for network memory
  net: add netmem_ref to skb_frag_t

 include/linux/skbuff.h           | 92 ++++++++++++++++++++++----------
 include/net/netmem.h             | 41 ++++++++++++++
 net/core/skbuff.c                | 22 +++++---
 net/kcm/kcmsock.c                | 10 +++-
 net/vmw_vsock/virtio_transport.c |  6 +--
 5 files changed, 133 insertions(+), 38 deletions(-)
 create mode 100644 include/net/netmem.h

-- 
2.43.0.472.g3155946c3a-goog


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-01-11  1:35 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-12-22 20:10   ` kernel test robot
2023-12-22 23:39   ` kernel test robot
2023-12-23 11:16   ` kernel test robot

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).