On Fri, Jun 7, 2024 at 8:47 AM Pavel Begunkov wrote:
>
> On 6/7/24 16:42, Pavel Begunkov wrote:
> > On 6/7/24 15:27, David Ahern wrote:
> >> On 6/7/24 7:42 AM, Pavel Begunkov wrote:
> >>> I haven't seen any arguments against from the (net) maintainers so
> >>> far. Nor I see any objection against
, ncdevmem has a validation mode,
where it sends a specific pattern and validates this pattern on the
receiver side to ensure data integrity.
Suggested-by: Stanislav Fomichev
Signed-off-by: Mina Almasry
---
v9:
https://lore.kernel.org/netdev/20240403002053.2376017-15-almasrym...@google.com/
- Remove
Add documentation outlining the usage and details of devmem TCP.
Signed-off-by: Mina Almasry
Reviewed-by: Bagas Sanjaya
---
v9:
https://lore.kernel.org/netdev/20240403002053.2376017-14-almasrym...@google.com/
- Bagas doc suggestions.
v8:
- Applied docs suggestions (Randy). Thanks!
v7
sed to userspace is get_page()'d.
This reference is dropped once the userspace indicates that it is
done reading this page. All pages are released when the socket is
destroyed.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v11:
- Refactor to common function
Add an interface for the user to notify the kernel that it is done
reading the devmem dmabuf frags returned as cmsg. The kernel will
drop the reference on the frags to make them available for reuse.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
frags of
devmem skbs and avoid coalescing devmem skbs with non devmem skbs.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v11:
- drop excessive checks for frag 0 pull (Paolo)
v9:
https://lore.kernel.org/netdev/20240403002053.2376017-11-al
DEV is omitted for simplicity & p.order !=
0.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v11:
- Rebase to not use the ops. (Christoph)
v8:
- Use skb_frag_size instead of frag->bv_len to fix patch-by-patch build
error
v6:
- refactor
Make skb_frag_page() fail in the case where the frag is not backed
by a page, and fix its relevant callers to handle this case.
Signed-off-by: Mina Almasry
---
v10:
- Fixed newly generated kdoc warnings found by patchwork. While we're
at it, fix the Return section of the functions I touched
is factored out on its own to limit the code
churn to this 1 patch, for ease of code review.
Signed-off-by: Mina Almasry
---
v11:
- Fix typing to remove sparse warning. (Paolo/Steven)
v9:
- Fix sparse error (Simon).
v8:
- Fix napi_pp_put_page() taking netmem instead of page to fix
patch
the underlying type is page or net_iov.
Implement checks for net_iov in netmem helpers which delegate to mm
APIs, to ensure net_iov are never passed to the mm stack.
Signed-off-by: Mina Almasry
---
v9:
https://lore.kernel.org/netdev/20240403002053.2376017-8-almasrym...@google.com/
- Remove CONFIG
-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v11:
- Fix extraneous inline directive (Paolo)
v8:
- Rename netdev_dmabuf_binding -> net_devmem_dmabuf_binding to avoid
patch-by-patch build error.
- Move niov->pp_magic/pp/pp_ref_counter usage to later
d re-initializes its page
pool.
The netdev_dmabuf_binding struct is refcounted, and releases its
resources only when all the refs are released.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v11:
- Fix build error with CONFIG_DMA_SHARED_BU
API takes the dma-buf fd as input, and binds it to the netdevice. The
user can specify the rx queues to bind the dma-buf to.
Suggested-by: Stanislav Fomichev
Signed-off-by: Mina Almasry
---
v7:
- Use flags: [ admin-perm ] instead of a CAP_NET_ADMIN check.
Changes in v1:
- Add rx-queue-type
Add netdev_rx_queue_restart() function to netdev_rx_queue.h
Signed-off-by: David Wei
Signed-off-by: Mina Almasry
---
v11:
- Fix not checking dev->queue_mgmt_ops (Pavel).
- Fix ndo_queue_mem_free call that passed the wrong pointer (David).
v9: https://lore.kernel.org/
Kernel: net-next with this series and memory provider API cherry-picked
locally.
Hardware: Google Cloud A3 VMs.
NIC: GVE with header split & RSS & flow steering support.
Cc: Pavel Begunkov
Cc: David Wei
Cc: Jason Gunthorpe
Cc: Yunsheng Lin
Cc: Shailend Chand
Cc: Harshitha Ramamurthy
Cc:
On Thu, Jun 6, 2024 at 9:49 AM Mina Almasry wrote:
>
> On Tue, Jun 4, 2024 at 3:46 AM Paolo Abeni wrote:
> >
> > On Thu, 2024-05-30 at 20:16 +, Mina Almasry wrote:
> > > diff --git a/net/core/gro.c b/net/core/gro.c
> > > index 26f09c3e830b7..7b9d018f552
On Tue, Jun 4, 2024 at 3:46 AM Paolo Abeni wrote:
>
> On Thu, 2024-05-30 at 20:16 +, Mina Almasry wrote:
> > diff --git a/net/core/gro.c b/net/core/gro.c
> > index 26f09c3e830b7..7b9d018f552bd 100644
> > --- a/net/core/gro.c
> > +++ b/net/core/gro.c
>
On Mon, Jun 3, 2024 at 7:52 AM Pavel Begunkov wrote:
>
> On 6/3/24 15:17, Mina Almasry wrote:
> > On Fri, May 31, 2024 at 10:35 PM Christoph Hellwig
> > wrote:
> >>
> >> On Thu, May 30, 2024 at 08:16:01PM +, Mina Almasry wrote:
> >>> I'
On Fri, May 31, 2024 at 10:35 PM Christoph Hellwig wrote:
>
> On Thu, May 30, 2024 at 08:16:01PM +, Mina Almasry wrote:
> > I'm unsure if the discussion has been resolved yet. Sending the series
> > anyway to get reviews/feedback on the (unrelated) rest of the series.
, ncdevmem has a validation mode,
where it sends a specific pattern and validates this pattern on the
receiver side to ensure data integrity.
Suggested-by: Stanislav Fomichev
Signed-off-by: Mina Almasry
---
v9:
https://lore.kernel.org/netdev/20240403002053.2376017-15-almasrym...@google.com/
- Remove
Add documentation outlining the usage and details of devmem TCP.
Signed-off-by: Mina Almasry
---
v9:
https://lore.kernel.org/netdev/20240403002053.2376017-14-almasrym...@google.com/
- Bagas doc suggestions.
v8:
- Applied docs suggestions (Randy). Thanks!
v7:
- Applied docs suggestions
Add an interface for the user to notify the kernel that it is done
reading the devmem dmabuf frags returned as cmsg. The kernel will
drop the reference on the frags to make them available for reuse.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
sed to userspace is get_page()'d.
This reference is dropped once the userspace indicates that it is
done reading this page. All pages are released when the socket is
destroyed.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v7:
- Updated the SO_DEVMEM_* u
frags of
devmem skbs and avoid coalescing devmem skbs with non devmem skbs.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v9:
https://lore.kernel.org/netdev/20240403002053.2376017-11-almasrym...@google.com/
- change skb->readable to skb->unrea
Make skb_frag_page() fail in the case where the frag is not backed
by a page, and fix its relevant callers to handle this case.
Signed-off-by: Mina Almasry
---
v10:
- Fixed newly generated kdoc warnings found by patchwork. While we're
at it, fix the Return section of the functions I touched
DEV is omitted for simplicity & p.order !=
0.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v8:
- Use skb_frag_size instead of frag->bv_len to fix patch-by-patch build
error
v6:
- refactor new memory provider functions into net/core/devme
the underlying type is page or net_iov.
Implement checks for net_iov in netmem helpers which delegate to mm
APIs, to ensure net_iov are never passed to the mm stack.
Signed-off-by: Mina Almasry
---
v9:
https://lore.kernel.org/netdev/20240403002053.2376017-8-almasrym...@google.com/
- Remove CONFIG
is factored out on its own to limit the code
churn to this 1 patch, for ease of code review.
Signed-off-by: Mina Almasry
---
v9:
- Fix sparse error (Simon).
v8:
- Fix napi_pp_put_page() taking netmem instead of page to fix
patch-by-patch build error.
- Add net/netmem.h include in this patch
d re-initializes its page
pool.
The netdev_dmabuf_binding struct is refcounted, and releases its
resources only when all the refs are released.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v10:
- Moved net_iov_dma_addr() to devmem.h and
-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v8:
- Rename netdev_dmabuf_binding -> net_devmem_dmabuf_binding to avoid
patch-by-patch build error.
- Move niov->pp_magic/pp/pp_ref_counter usage to later patch to avoid
patch-by-patch build erro
API takes the dma-buf fd as input, and binds it to the netdevice. The
user can specify the rx queues to bind the dma-buf to.
Suggested-by: Stanislav Fomichev
Signed-off-by: Mina Almasry
---
v7:
- Use flags: [ admin-perm ] instead of a CAP_NET_ADMIN check.
Changes in v1:
- Add rx-queue-type
references to be gone before feeding this
page back into the pool.
Signed-off-by: Jakub Kicinski
Signed-off-by: Mina Almasry
---
- This is implemented by Jakub in his RFC:
https://lore.kernel.org/netdev/f8270765-a27b-6ccf-33ea-cda097168...@redhat.com/T/
I take no credit for the idea or impleme
Add netdev_rx_queue_restart() function to netdev_rx_queue.h
Signed-off-by: David Wei
Signed-off-by: Mina Almasry
---
v9: https://lore.kernel.org/all/20240502045410.3524155-4...@davidwei.uk/
(submitted by David).
- fixed SPDX license identifier (Simon).
- Rebased on top of merged queue API
t
Cc: Jeroen de Borst
Cc: Praveen Kaligineedi
Jakub Kicinski (1):
net: page_pool: create hooks for custom page providers
Mina Almasry (13):
netdev: add netdev_rx_queue_restart()
net: netdev netlink api to bind dma-buf to a net device
netdev: support binding dma-buf to netdevice
On Sat, May 18, 2024 at 11:46 AM David Wei wrote:
>
> On 2024-05-10 16:21, Mina Almasry wrote:
> > +void net_devmem_unbind_dmabuf(struct net_devmem_dmabuf_binding *binding)
> > +{
> > + struct netdev_rx_queue *rxq;
> > + unsigned long xa_idx;
On Tue, May 28, 2024 at 7:42 PM Pavel Begunkov wrote:
>
> On 5/28/24 18:36, Mina Almasry wrote:
> > On Wed, May 22, 2024 at 11:02 PM David Wei wrote:
> ...
> >>> + */
> >>> +
On Wed, May 22, 2024 at 11:02 PM David Wei wrote:
>
> On 2024-05-10 16:21, Mina Almasry wrote:
> > +/* On error, returns the -errno. On success, returns number of bytes sent
> > to the
> > + * user. May not consume all of @remaining_len.
> > + */
> > +stati
On Mon, May 13, 2024 at 4:31 PM Jakub Kicinski wrote:
>
> On Fri, 10 May 2024 16:21:11 -0700 Mina Almasry wrote:
> > Device Memory TCP
>
> Sorry Mina, this is too big to apply during the merge window :(
No worries at all. I'll repost once it re-opens with any feedback I
g
, ncdevmem has a validation mode,
where it sends a specific pattern and validates this pattern on the
receiver side to ensure data integrity.
Suggested-by: Stanislav Fomichev
Signed-off-by: Mina Almasry
---
v9:
https://lore.kernel.org/netdev/20240403002053.2376017-15-almasrym...@google.com/
- Remove
Add documentation outlining the usage and details of devmem TCP.
Signed-off-by: Mina Almasry
---
v9:
https://lore.kernel.org/netdev/20240403002053.2376017-14-almasrym...@google.com/
- Bagas doc suggestions.
v8:
- Applied docs suggestions (Randy). Thanks!
v7:
- Applied docs suggestions
Add an interface for the user to notify the kernel that it is done
reading the devmem dmabuf frags returned as cmsg. The kernel will
drop the reference on the frags to make them available for reuse.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
sed to userspace is get_page()'d.
This reference is dropped once the userspace indicates that it is
done reading this page. All pages are released when the socket is
destroyed.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v7:
- Updated the SO_DEVMEM_* u
frags of
devmem skbs and avoid coalescing devmem skbs with non devmem skbs.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v9:
https://lore.kernel.org/netdev/20240403002053.2376017-11-almasrym...@google.com/
- change skb->readable to skb->unrea
Make skb_frag_page() fail in the case where the frag is not backed
by a page, and fix its relevant callers to handle this case.
Signed-off-by: Mina Almasry
---
v6:
- Rebased on top of the merged netmem changes.
Changes in v1:
- Fix illegal_highdma() (Yunsheng).
- Rework napi_pp_put_page
DEV is omitted for simplicity & p.order !=
0.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v8:
- Use skb_frag_size instead of frag->bv_len to fix patch-by-patch build
error
v6:
- refactor new memory provider functions into net/core/devme
the underlying type is page or net_iov.
Implement checks for net_iov in netmem helpers which delegate to mm
APIs, to ensure net_iov are never passed to the mm stack.
Signed-off-by: Mina Almasry
---
v9:
https://lore.kernel.org/netdev/20240403002053.2376017-8-almasrym...@google.com/
- Remove CONFIG
is factored out on its own to limit the code
churn to this 1 patch, for ease of code review.
Signed-off-by: Mina Almasry
---
v9:
- Fix sparse error (Simon).
v8:
- Fix napi_pp_put_page() taking netmem instead of page to fix
patch-by-patch build error.
- Add net/netmem.h include in this patch
-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v8:
- Rename netdev_dmabuf_binding -> net_devmem_dmabuf_binding to avoid
patch-by-patch build error.
- Move niov->pp_magic/pp/pp_ref_counter usage to later patch to avoid
patch-by-patch build erro
d re-initializes its page
pool.
The netdev_dmabuf_binding struct is refcounted, and releases its
resources only when all the refs are released.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v9: https://lore.kernel.org/all/20240403002053.23760
API takes the dma-buf fd as input, and binds it to the netdevice. The
user can specify the rx queues to bind the dma-buf to.
Suggested-by: Stanislav Fomichev
Signed-off-by: Mina Almasry
---
v7:
- Use flags: [ admin-perm ] instead of a CAP_NET_ADMIN check.
Changes in v1:
- Add rx-queue-type
references to be gone before feeding this
page back into the pool.
Signed-off-by: Jakub Kicinski
Signed-off-by: Mina Almasry
---
- This is implemented by Jakub in his RFC:
https://lore.kernel.org/netdev/f8270765-a27b-6ccf-33ea-cda097168...@redhat.com/T/
I take no credit for the idea or impleme
Add netdev_rx_queue_restart() function to netdev_rx_queue.h
Signed-off-by: David Wei
Signed-off-by: Mina Almasry
---
v9: https://lore.kernel.org/all/20240502045410.3524155-4...@davidwei.uk/
(submitted by David).
- fixed SPDX license identifier (Simon).
- Rebased on top of merged queue API
Cc: Jason Gunthorpe
Cc: Yunsheng Lin
Cc: Shailend Chand
Cc: Harshitha Ramamurthy
Cc: Shakeel Butt
Cc: Jeroen de Borst
Cc: Praveen Kaligineedi
Jakub Kicinski (1):
net: page_pool: create hooks for custom page providers
Mina Almasry (13):
netdev: add netdev_rx_queue_restart()
net: ne
On Tue, May 7, 2024 at 9:55 AM Pavel Begunkov wrote:
>
> On 5/7/24 17:23, Christoph Hellwig wrote:
> > On Tue, May 07, 2024 at 01:18:57PM -0300, Jason Gunthorpe wrote:
> >> On Tue, May 07, 2024 at 05:05:12PM +0100, Pavel Begunkov wrote:
> even in tree if you give them enough rope, and they
On Tue, May 7, 2024 at 9:24 AM Christoph Hellwig wrote:
>
> On Tue, May 07, 2024 at 01:18:57PM -0300, Jason Gunthorpe wrote:
> > On Tue, May 07, 2024 at 05:05:12PM +0100, Pavel Begunkov wrote:
> > > > even in tree if you give them enough rope, and they should not have
> > > > that rope when the
Sorry for the late reply.
On Wed, May 1, 2024 at 12:55 AM Christoph Hellwig wrote:
>
> Still NAK to creating aⅺbitrary hooks here.
Is the concern still that folks may be able to hook proprietary stuff
into this like you mentioned before[1]?
I don't see how that can be done as currently
On Tue, Apr 30, 2024 at 11:55 AM Jens Axboe wrote:
>
> On 4/30/24 12:29 PM, Mina Almasry wrote:
> > On Tue, Apr 30, 2024 at 6:46?AM Jens Axboe wrote:
> >>
> >> On 4/26/24 8:11 PM, Mina Almasry wrote:
> >>> On Fri, Apr 26, 2024 at 5:18?PM David Wei
On Tue, Apr 30, 2024 at 6:46 AM Jens Axboe wrote:
>
> On 4/26/24 8:11 PM, Mina Almasry wrote:
> > On Fri, Apr 26, 2024 at 5:18?PM David Wei wrote:
> >>
> >> On 2024-04-02 5:20 pm, Mina Almasry wrote:
> >>> @@ -69,20 +106,26 @@ net_iov_binding(const struc
On Fri, Apr 26, 2024 at 5:18 PM David Wei wrote:
>
> On 2024-04-02 5:20 pm, Mina Almasry wrote:
> > @@ -69,20 +106,26 @@ net_iov_binding(const struct net_iov *niov)
> > */
> > typedef unsigned long __bitwise netmem_ref;
> >
> > +static inline bool netme
On Wed, Apr 24, 2024 at 10:36 AM David Wei wrote:
>
> On 2024-04-02 5:20 pm, Mina Almasry wrote:
> > + /* We hold the rtnl_lock while binding/unbinding dma-buf, so we can't
> > + * race with another thread that is also modifying this value.
> > However,
> >
, ncdevmem has a validation mode,
where it sends a specific pattern and validates this pattern on the
receiver side to ensure data integrity.
Suggested-by: Stanislav Fomichev
Signed-off-by: Mina Almasry
---
v6:
- Updated to bind 8 queues.
- Added RSS configuration.
- Added some more tests
Add documentation outlining the usage and details of devmem TCP.
Signed-off-by: Mina Almasry
---
v8:
- Applied docs suggestions (Randy). Thanks!
v7:
- Applied docs suggestions (Jakub).
v2:
- Missing spdx (simon)
- add to index.rst (simon)
fix docs
---
Documentation/networking/devmem.rst
Add an interface for the user to notify the kernel that it is done
reading the devmem dmabuf frags returned as cmsg. The kernel will
drop the reference on the frags to make them available for reuse.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
sed to userspace is get_page()'d.
This reference is dropped once the userspace indicates that it is
done reading this page. All pages are released when the socket is
destroyed.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v7:
- Updated the SO_DEVMEM_* u
frags of
devmem skbs and avoid coalescing devmem skbs with non devmem skbs.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v6
- skb->dmabuf -> skb->readable (Pavel). Pavel's original suggestion was
to remove the skb->dmabuf flag en
Make skb_frag_page() fail in the case where the frag is not backed
by a page, and fix its relevant callers to handle this case.
Signed-off-by: Mina Almasry
---
v6:
- Rebased on top of the merged netmem changes.
Changes in v1:
- Fix illegal_highdma() (Yunsheng).
- Rework napi_pp_put_page
DEV is omitted for simplicity & p.order !=
0.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v8:
- Use skb_frag_size instead of frag->bv_len to fix patch-by-patch build
error
v6:
- refactor new memory provider functions into net/core/devme
the underlying type is page or net_iov.
Implement checks for net_iov in netmem helpers which delegate to mm
APIs, to ensure net_iov are never passed to the mm stack.
Signed-off-by: Mina Almasry
---
v7:
- Remove static_branch_unlikely from netmem_to_net_iov(). We're getting
better results from the fast
is factored out on its own to limit the code
churn to this 1 patch, for ease of code review.
Signed-off-by: Mina Almasry
---
v8:
- Fix napi_pp_put_page() taking netmem instead of page to fix
patch-by-patch build error.
- Add net/netmem.h include in this patch to fix patch-by-patch build
error
-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v8:
- Rename netdev_dmabuf_binding -> net_devmem_dmabuf_binding to avoid
patch-by-patch build error.
- Move niov->pp_magic/pp/pp_ref_counter usage to later patch to avoid
patch-by-patch build erro
d re-initializes its page
pool.
The netdev_dmabuf_binding struct is refcounted, and releases its
resources only when all the refs are released.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v8:
- move dmabuf_devmem_ops usage to later patch to a
API takes the dma-buf fd as input, and binds it to the netdevice. The
user can specify the rx queues to bind the dma-buf to.
Suggested-by: Stanislav Fomichev
Signed-off-by: Mina Almasry
---
v7:
- Use flags: [ admin-perm ] instead of a CAP_NET_ADMIN check.
Changes in v1:
- Add rx-queue-type
references to be gone before feeding this
page back into the pool.
Signed-off-by: Jakub Kicinski
Signed-off-by: Mina Almasry
---
This is implemented by Jakub in his RFC:
https://lore.kernel.org/netdev/f8270765-a27b-6ccf-33ea-cda097168...@redhat.com/T/
I take no credit for the idea or impleme
This API enables the net stack to reset the queues used for devmem TCP.
Signed-off-by: Mina Almasry
---
include/linux/netdevice.h | 3 +++
include/net/netdev_queues.h | 27 +++
2 files changed, 30 insertions(+)
diff --git a/include/linux/netdevice.h b/include/linux
amp; flow steering support.
Cc: Pavel Begunkov
Cc: David Wei
Cc: Jason Gunthorpe
Cc: Yunsheng Lin
Cc: Shailend Chand
Cc: Harshitha Ramamurthy
Cc: Shakeel Butt
Cc: Jeroen de Borst
Cc: Praveen Kaligineedi
Jakub Kicinski (1):
net: page_pool: create hooks for custom page providers
Mina Al
On Thu, Mar 28, 2024 at 12:31 AM Christoph Hellwig wrote:
>
> On Tue, Mar 26, 2024 at 01:19:20PM -0700, Mina Almasry wrote:
> >
> > Are you envisioning that dmabuf support would be added to the block
> > layer
>
> Yes.
>
> > (which I understand is
On Thu, Mar 28, 2024 at 11:28 AM Simon Horman wrote:
>
> On Tue, Mar 26, 2024 at 03:50:35PM -0700, Mina Almasry wrote:
> > Add a netdev_dmabuf_binding struct which represents the
> > dma-buf-to-netdevice binding. The netlink API will bind the dma-buf to
> > rx
On Tue, Mar 26, 2024 at 3:51 PM Mina Almasry wrote:
>
> Convert netmem to be a union of struct page and struct netmem. Overload
> the LSB of struct netmem* to indicate that it's a net_iov, otherwise
> it's a page.
>
> Currently these entries in struct page are rented by the pa
On Tue, Mar 26, 2024 at 3:51 PM Mina Almasry wrote:
>
> Abstrace the memory type from the page_pool so we can later add support
> for new memory types. Convert the page_pool to use the new netmem type
> abstraction, rather than use struct page directly.
>
> As of this pat
, ncdevmem has a validation mode,
where it sends a specific pattern and validates this pattern on the
receiver side to ensure data integrity.
Suggested-by: Stanislav Fomichev
Signed-off-by: Mina Almasry
---
v6:
- Updated to bind 8 queues.
- Added RSS configuration.
- Added some more tests
Add documentation outlining the usage and details of devmem TCP.
Signed-off-by: Mina Almasry
---
v7:
- Applied docs suggestions (Jakub).
v2:
- Missing spdx (simon)
- add to index.rst (simon)
---
Documentation/networking/devmem.rst | 256
Documentation
sed to userspace is get_page()'d.
This reference is dropped once the userspace indicates that it is
done reading this page. All pages are released when the socket is
destroyed.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v7:
- Updated the SO_DEVMEM_* u
Add an interface for the user to notify the kernel that it is done
reading the devmem dmabuf frags returned as cmsg. The kernel will
drop the reference on the frags to make them available for reuse.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
frags of
devmem skbs and avoid coalescing devmem skbs with non devmem skbs.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v6
- skb->dmabuf -> skb->readable (Pavel). Pavel's original suggestion was
to remove the skb->dmabuf flag en
Make skb_frag_page() fail in the case where the frag is not backed
by a page, and fix its relevant callers to handle this case.
Signed-off-by: Mina Almasry
---
v6:
- Rebased on top of the merged netmem changes.
Changes in v1:
- Fix illegal_highdma() (Yunsheng).
- Rework napi_pp_put_page
the underlying type is page or net_iov.
Implement checks for net_iov in netmem helpers which delegate to mm
APIs, to ensure net_iov are never passed to the mm stack.
Signed-off-by: Mina Almasry
---
v7:
- Remove static_branch_unlikely from netmem_to_net_iov(). We're getting
better results from the fast
DEV is omitted for simplicity & p.order !=
0.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v6:
- refactor new memory provider functions into net/core/devmem.c (Pavel)
v2:
- Disable devmem for p.order != 0
v1:
- static_branc
is factored out on its own to limit the code
churn to this 1 patch, for ease of code review.
Signed-off-by: Mina Almasry
---
v6:
- Rebased on top of the merged netmem_ref type.
To: linux...@kvack.org
Cc: Matthew Wilcox
---
include/linux/skbuff.h | 4 +-
include/net/netmem.h
-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v7:
- netdev_ -> net_devmem_* naming (Yunsheng).
v6:
- Add comment on net_iov_dma_addr to explain why we don't use
niov->dma_addr (Pavel)
- Refactor new functions into net/core/devmem.c (Pavel)
v1:
- Rename
d re-initializes its page
pool.
The netdev_dmabuf_binding struct is refcounted, and releases its
resources only when all the refs are released.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
---
v7:
- Use IS_ERR() instead of IS_ERR_OR_
API takes the dma-buf fd as input, and binds it to the netdevice. The
user can specify the rx queues to bind the dma-buf to.
Suggested-by: Stanislav Fomichev
Signed-off-by: Mina Almasry
---
v7:
- Use flags: [ admin-perm ] instead of a CAP_NET_ADMIN check.
Changes in v1:
- Add rx-queue-type
references to be gone before feeding this
page back into the pool.
Signed-off-by: Jakub Kicinski
Signed-off-by: Mina Almasry
---
This is implemented by Jakub in his RFC:
https://lore.kernel.org/netdev/f8270765-a27b-6ccf-33ea-cda097168...@redhat.com/T/
I take no credit for the idea or impleme
This API enables the net stack to reset the queues used for devmem TCP.
Signed-off-by: Mina Almasry
---
include/linux/netdevice.h | 3 +++
include/net/netdev_queues.h | 27 +++
2 files changed, 30 insertions(+)
diff --git a/include/linux/netdevice.h b/include/linux
rthy
Cc: Shakeel Butt
Cc: Jeroen de Borst
Cc: Praveen Kaligineedi
Jakub Kicinski (1):
net: page_pool: create hooks for custom page providers
Mina Almasry (13):
queue_api: define queue api
net: netdev netlink api to bind dma-buf to a net device
netdev: support binding dma-buf to
On Sun, Mar 24, 2024 at 4:37 PM Christoph Hellwig wrote:
>
> On Fri, Mar 22, 2024 at 10:54:54AM -0700, Mina Almasry wrote:
> > Sorry I don't mean to argue but as David mentioned, there are some
> > plans in the works and ones not in the works to extend this to other
>
On Tue, Mar 26, 2024 at 5:47 AM Yunsheng Lin wrote:
>
> On 2024/3/26 8:28, Mina Almasry wrote:
> > On Tue, Mar 5, 2024 at 11:38 AM Mina Almasry wrote:
> >>
> >> On Tue, Mar 5, 2024 at 4:54 AM Yunsheng Lin wrote:
> >>>
&
On Tue, Mar 5, 2024 at 11:38 AM Mina Almasry wrote:
>
> On Tue, Mar 5, 2024 at 4:54 AM Yunsheng Lin wrote:
> >
> > On 2024/3/5 10:01, Mina Almasry wrote:
> >
> > ...
> >
> > >
> > > Perf - page-pool benchmark:
> > >
On Sun, Mar 17, 2024 at 7:03 PM Christoph Hellwig wrote:
>
> On Mon, Mar 04, 2024 at 06:01:37PM -0800, Mina Almasry wrote:
> > From: Jakub Kicinski
> >
> > The page providers which try to reuse the same pages will
> > need to hold onto the ref, even if page g
Hi Christoph,
Sorry for the late reply, I've been out for a few days.
On Mon, Mar 18, 2024 at 4:22 PM Christoph Hellwig wrote:
>
> On Sun, Mar 17, 2024 at 07:49:43PM -0700, David Wei wrote:
> > I'm working on a similar proposal for zero copy Rx but to host memory
> > and depend on this memory
On Fri, Mar 8, 2024 at 3:48 PM David Wei wrote:
>
> On 2024-03-04 18:01, Mina Almasry wrote:
> > This API enables the net stack to reset the queues used for devmem.
> >
> > Signed-off-by: Mina Almasry
> >
> > ---
> > include/linux/netdevice.h | 24 ++
1 - 100 of 229 matches
Mail list logo