er_frags, and each page passed 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
---
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
, 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
On Thu, Jun 13, 2024 at 1:36 AM Paul Barker
wrote:
>
> On 13/06/2024 02:35, Mina Almasry wrote:
> > Abstrace the memory type from the page_pool so we can later add support
>
> s/Abstrace/Abstract/
>
Thanks, will do.
> > for new memory types. Convert the page_pool
On Thu, Jun 13, 2024 at 6:35 PM Jakub Kicinski wrote:
>
> On Thu, 13 Jun 2024 01:35:37 +0000 Mina Almasry wrote:
> > v12:
> > https://patchwork.kernel.org/project/netdevbpf/list/?series=859747&state=*
>
> patches 5 and 6 transiently break the build
>
> ../incl
On Mon, Jun 17, 2024 at 7:17 AM Pavel Begunkov wrote:
>
> On 6/13/24 02:35, 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.
On Mon, Jun 17, 2024 at 9:36 AM Pavel Begunkov wrote:
>
> On 6/13/24 02:35, Mina Almasry wrote:
> >
> > The pages awaiting freeing are stored in the newly added
> > sk->sk_user_frags, and each page passed to userspace is get_page()'d.
> > This reference i
ovider.
** Test Setup
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:
Add netdev_rx_queue_restart() function to netdev_rx_queue.h
Signed-off-by: David Wei
Signed-off-by: Mina Almasry
Reviewed-by: Pavel Begunkov
---
v13:
- Add reviewed-by from Pavel (thanks!)
- Fixed comment (Pavel)
v11:
- Fix not checking dev->queue_mgmt_ops (Pavel).
- Fix ndo_queue_mem_f
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
s, and 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
Reviewed-by: Pavel Begunkov # excluding netlink
ff-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
Reviewed-by: Pavel Begunkov
---
v11:
- Fix extraneous inline directive (Paolo)
v8:
- Rename netdev_dmabuf_binding -> net_devmem_dmabuf_binding to avoid
patch-by-patch build error.
- Move niov->
hange 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
Reviewed-by: Pavel Begunkov
---
v13:
- Fix allmodconfig build error. NET_IOV was not defined as of this
patch.
- Removed unnecessary update of page_pool_alloc() API. I
hether 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
Reviewed-by: Pavel Begunkov
---
v13:
- Move NET_IOV dependent changes to this patch.
- Fixed comm
is omitted for simplicity & p.order !=
0.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
Reviewed-by: Pavel Begunkov
---
v13:
- Return on warning (Pavel).
- Fixed pool->recycle_stats not being freed on error (Pavel).
- Applied reviewed-by
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 to
ags 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
er_frags, and each page passed 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
---
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
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
, 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
On Mon, Jun 24, 2024 at 7:47 PM Mina Almasry wrote:
>
> v13:
> https://patchwork.kernel.org/project/netdevbpf/list/?series=861406&archive=both&state=*
>
>
> Major changes:
> --
>
> This iteration addresses Pavel's review comments, appli
entire data path end to end without
a dependency on a specific dmabuf provider.
** Test Setup
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:
Add netdev_rx_queue_restart() function to netdev_rx_queue.h
Signed-off-by: David Wei
Signed-off-by: Mina Almasry
Reviewed-by: Pavel Begunkov
---
v13:
- Add reviewed-by from Pavel (thanks!)
- Fixed comment (Pavel)
v11:
- Fix not checking dev->queue_mgmt_ops (Pavel).
- Fix ndo_queue_mem_f
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
s, and 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
Reviewed-by: Pavel Begunkov # excluding netlink
ff-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
Reviewed-by: Pavel Begunkov
---
v11:
- Fix extraneous inline directive (Paolo)
v8:
- Rename netdev_dmabuf_binding -> net_devmem_dmabuf_binding to avoid
patch-by-patch build error.
- Move niov->
hange 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
Reviewed-by: Pavel Begunkov
---
v13:
- Fix allmodconfig build error. NET_IOV was not defined as of this
patch.
- Removed unnecessary update of page_pool_alloc() API. I
hether 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
Reviewed-by: Pavel Begunkov
---
v13:
- Move NET_IOV dependent changes to this patch.
- Fixed comm
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 to
is omitted for simplicity & p.order !=
0.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
Reviewed-by: Pavel Begunkov
---
v13:
- Return on warning (Pavel).
- Fixed pool->recycle_stats not being freed on error (Pavel).
- Applied reviewed-by
er_frags, and each page passed 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
---
ags 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
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
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
, 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
On Wed, Jun 26, 2024 at 5:46 PM Jakub Kicinski wrote:
>
> On Wed, 26 Jun 2024 15:08:22 -0700 Jakub Kicinski wrote:
> > On Tue, 25 Jun 2024 19:54:01 + Mina Almasry wrote:
> > > +CFLAGS += -I../../../net/ynl/generated/
> > > +CFLAGS += -I../../../net/
On Thu, Jun 27, 2024 at 12:55 PM Mina Almasry wrote:
>
> On Wed, Jun 26, 2024 at 5:46 PM Jakub Kicinski wrote:
> >
> > On Wed, 26 Jun 2024 15:08:22 -0700 Jakub Kicinski wrote:
> > > On Tue, 25 Jun 2024 19:54:01 + Mina Almasry wrote:
> > > >
d 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: Shakeel Butt
Cc: Jeroen de
Add netdev_rx_queue_restart() function to netdev_rx_queue.h
Signed-off-by: David Wei
Signed-off-by: Mina Almasry
Reviewed-by: Pavel Begunkov
---
v13:
- Add reviewed-by from Pavel (thanks!)
- Fixed comment (Pavel)
v11:
- Fix not checking dev->queue_mgmt_ops (Pavel).
- Fix ndo_queue_mem_f
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
s, and 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
Reviewed-by: Pavel Begunkov # excluding netlink
ff-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
Reviewed-by: Pavel Begunkov
---
v11:
- Fix extraneous inline directive (Paolo)
v8:
- Rename netdev_dmabuf_binding -> net_devmem_dmabuf_binding to avoid
patch-by-patch build error.
- Move niov->
hether 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
Reviewed-by: Pavel Begunkov
---
v13:
- Move NET_IOV dependent changes to this patch.
- Fixed comm
hange 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
Reviewed-by: Pavel Begunkov
---
v13:
- Fix allmodconfig build error. NET_IOV was not defined as of this
patch.
- Removed unnecessary update of page_pool_alloc() API. I
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 to
is omitted for simplicity & p.order !=
0.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
Reviewed-by: Pavel Begunkov
---
v13:
- Return on warning (Pavel).
- Fixed pool->recycle_stats not being freed on error (Pavel).
- Applied reviewed-by
er_frags, and each page passed 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
---
ags 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
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
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
From: Jakub Kicinski
Support building the C YNL userspace library into one big static file.
We can then link selftests against it for easy to use C netlink
interface.
Signed-off-by: Jakub Kicinski
Signed-off-by: Mina Almasry
---
v15:
- Added this patch from Jakub to fix linking against ynl
, 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
---
v15:
- Fix linking against libynl. (Jakub)
v9:
https://lore.kernel.org/netdev
On Thu, Jun 27, 2024 at 5:32 PM Mina Almasry wrote:
>
> v15:
> https://patchwork.kernel.org/project/netdevbpf/list/?series=865481&state=*
>
>
> No material changes in this version, only a fix to linking against
> libynl.a from the last version. Per Jakub's ins
On Fri, Jun 28, 2024 at 3:10 AM Donald Hunter wrote:
>
> Mina Almasry writes:
> > +
> > +The user must bind a dmabuf to any number of RX queues on a given NIC using
> > +the netlink API::
> > +
> > + /* Bind dmabuf to NIC RX queue 15 */
> > + str
On Fri, Jun 28, 2024 at 3:10 AM Donald Hunter wrote:
>
> Mina Almasry writes:
> > + -
> > +name: bind-dmabuf
> > +attributes:
> > + -
> > +name: ifindex
> > +doc: netdev ifindex to bind the dma-buf to.
>
> Minor nit:
On Tue, Jul 2, 2024 at 8:25 AM Arnd Bergmann wrote:
>
> On Fri, Jun 28, 2024, at 02:32, Mina Almasry wrote:
> > --- a/arch/alpha/include/uapi/asm/socket.h
> > +++ b/arch/alpha/include/uapi/asm/socket.h
> > @@ -140,6 +140,11 @@
> > #define SO_PASSPIDFD
On Tue, Jul 2, 2024 at 6:09 PM Jakub Kicinski wrote:
>
> On Fri, 28 Jun 2024 00:32:40 +0000 Mina Almasry wrote:
> > + if (binding->list.next)
> > + list_del(&binding->list);
> > +
> > + xa_for_each(&binding->bound_rxq_list, xa_i
On Thu, Jul 4, 2024 at 10:57 AM Taehee Yoo wrote:
>
> I found several locking warnings while testing.
>
Thanks for Testing Taehee! And sorry for the late reply. I was off for
a couple of days. With some minor tweaks to my test setup I was able
to reproduce and fix all 3 warnings.
> [ 1135.125874
On Tue, Jul 9, 2024 at 8:37 AM Taehee Yoo wrote:
>
...
> And I found another bug.
>
> [ 236.625141] BUG: KASAN: slab-use-after-free in
> net_devmem_unbind_dmabuf+0x364/0x440
...
> Reproducer:
> ./ncdevmem -f -l -p 5201 -v 7 -t 0 -q 2 &
> sleep 10
> modprobe -rv bnxt_en
> killall ncdevmem
>
> I th
end to end without
a dependency on a specific dmabuf provider.
** Test Setup
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: Jas
Add netdev_rx_queue_restart() function to netdev_rx_queue.h
Signed-off-by: David Wei
Signed-off-by: Mina Almasry
Reviewed-by: Pavel Begunkov
Reviewed-by: Jakub Kicinski
---
v13:
- Add reviewed-by from Pavel (thanks!)
- Fixed comment (Pavel)
v11:
- Fix not checking dev->queue_mgmt_
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
---
v16:
- Use subset-of: queue queue-id instead of queue-dmabuf (Jakub).
- Rename attribute 'bind-d
s, and 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
Reviewed-by: Pavel Begunkov # excluding netlink
Acked-b
ff-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
Reviewed-by: Pavel Begunkov
---
v11:
- Fix extraneous inline directive (Paolo)
v8:
- Rename netdev_dmabuf_binding -> net_devmem_dmabuf_binding to avoid
patch-by-patch build error.
- Move niov->
hether 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
Reviewed-by: Pavel Begunkov
---
v13:
- Move NET_IOV dependent changes to this patch.
- Fixed comm
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
Reviewed-by: Eric Dumazet
---
v10:
- Fixed newly generated kdoc warnings found by patchwork. While we're
at it, fix the Return se
is omitted for simplicity & p.order !=
0.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
Reviewed-by: Pavel Begunkov
---
v16:
- Add DEBUG_NET_WARN_ON_ONCE(!rtnl_is_locked()), to catch cases if
page_pool_init without rtnl_locking when the q
ags 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
Reviewed-by: Eric Dumazet
---
v16:
- Fix unreadable handling in skb_split_no_header() (Eric).
v11:
- drop excessive checks for
er_frags, and each page passed 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
Re
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
Add documentation outlining the usage and details of devmem TCP.
Signed-off-by: Mina Almasry
Reviewed-by: Bagas Sanjaya
---
v16:
- Add documentation on unbinding the NIC from dmabuf (Donald).
- Add note that any dmabuf should work (Donald).
v9:
https://lore.kernel.org/netdev
, 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
---
v16:
- Remove outdated -n option (Taehee).
- Use 'ifname' instead of accidentally hardc
7;inflight': 1023,
'inflight-mem': 4190208},
And queue stats:
$ ./cli.py --spec ../netlink/specs/netdev.yaml --dump queue-get
...
{'dmabuf': 10, 'id': 8, 'ifindex': 3, 'type': 'rx'},
{'dmabuf': 10, 'id
On Wed, Jul 10, 2024 at 9:37 AM Jakub Kicinski wrote:
>
> On Wed, 10 Jul 2024 00:17:37 +0000 Mina Almasry wrote:
> > + net_devmem_dmabuf_binding_get(binding);
>
> Why does every iov need to hold a ref? pp holds a ref and does its own
> accounting, so it won't disa
On Wed, Jul 10, 2024 at 9:49 AM Jakub Kicinski wrote:
>
> On Wed, 10 Jul 2024 00:17:38 +0000 Mina Almasry wrote:
> > @@ -68,17 +107,103 @@ static inline netmem_ref page_to_netmem(struct page
> > *page)
> >
> > static inline int netmem_ref_count(netmem_ref netmem)
On Wed, Jul 10, 2024 at 12:55 PM Jakub Kicinski wrote:
>
> On Wed, 10 Jul 2024 12:29:58 -0700 Mina Almasry wrote:
> > On Wed, Jul 10, 2024 at 9:37 AM Jakub Kicinski wrote:
> > > On Wed, 10 Jul 2024 00:17:37 + Mina Almasry wrote:
> > > > + net_
On Wed, Jul 10, 2024 at 9:49 AM Jakub Kicinski wrote:
>
> On Wed, 10 Jul 2024 00:17:38 +0000 Mina Almasry wrote:
> > +static inline struct net_iov *__netmem_clear_lsb(netmem_ref netmem)
> > +{
> > + return (struct net_iov *)((__force unsigned long)netmem & ~NET_IO
On Wed, Jul 10, 2024 at 5:44 PM John Hubbard wrote:
>
> On 7/9/24 5:17 PM, Mina Almasry wrote:
> ...
> > diff --git a/tools/testing/selftests/net/Makefile
> > b/tools/testing/selftests/net/Makefile
> > index bc3925200637c..39420a6e86b7f 100644
> > --- a/too
On Wed, Jul 10, 2024 at 6:23 PM Jakub Kicinski wrote:
>
> On Wed, 10 Jul 2024 16:42:04 -0700 Mina Almasry wrote:
> > > > +static inline void netmem_set_pp(netmem_ref netmem, struct page_pool
> > > > *pool)
> > > > +{
> > > > + __netmem_cl
for you. It should apply on top of v16:
commit 795b8ff01906d ("fix for release issue")
Author: Mina Almasry
Date: Tue Jul 23 00:18:23 2024 +
fix for release issue
Change-Id: Ib45a0aa6cba2918db5f7ba535414ffa860911fa4
diff --git a/include/net/devmem.h b/include/net/devmem.h
i
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: Shakeel Butt
Cc: Jeroen de Borst
Cc: Praveen Kaligineedi
Mina Almasry (14):
netdev: ad
Add netdev_rx_queue_restart() function to netdev_rx_queue.h
Signed-off-by: David Wei
Signed-off-by: Mina Almasry
Reviewed-by: Pavel Begunkov
Reviewed-by: Jakub Kicinski
---
v17:
- Use ASSERT_RTNL() (Jakub).
v13:
- Add reviewed-by from Pavel (thanks!)
- Fixed comment (Pavel)
v11:
- Fix not
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
Reviewed-by: Donald Hunter
Reviewed-by: Jakub Kicinski
---
v16:
- Use subset-of: queue queue-id instead
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
Reviewed-by: Pavel Begunkov # excluding netlink
Acked-by: Daniel Vetter
---
v17:
- Add missing kfree(o
ff-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
Reviewed-by: Pavel Begunkov
---
v17:
- Don't acquire a binding ref for every allocation (Jakub).
v11:
- Fix extraneous inline directive (Paolo)
v8:
- Rename netdev_dmabuf_binding -> net_devmem_dmabuf_bin
These helpers are used for setup and init of buffers, and their
implementation need not be static inline in the header file.
Moving the implementation to the .c file allows us to hide netmem
implementation details in internal header files rather than the public
file.
Signed-off-by: Mina Almasry
hether 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
Reviewed-by: Pavel Begunkov
---
v17:
- Rename netmem_to_pfn to netmem_pfn_trace (Jakub)
- Move some
is omitted for simplicity & p.order !=
0.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
Reviewed-by: Pavel Begunkov
---
v17:
- Use ASSERT_RTNL (Jakub)
v16:
- Add DEBUG_NET_WARN_ON_ONCE(!rtnl_is_locked()), to catch cases if
page_pool_init
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
Reviewed-by: Eric Dumazet
---
v10:
- Fixed newly generated kdoc warnings found by patchwork. While we're
at it, fix the Return se
ags 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
Reviewed-by: Eric Dumazet
---
v16:
- Fix unreadable handling in skb_split_no_header() (Eric).
v11:
- drop excessive checks for
er_frags, and each page passed 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
Re
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
Add documentation outlining the usage and details of devmem TCP.
Signed-off-by: Mina Almasry
Reviewed-by: Bagas Sanjaya
Reviewed-by: Donald Hunter
---
v16:
- Add documentation on unbinding the NIC from dmabuf (Donald).
- Add note that any dmabuf should work (Donald).
v9:
https
, 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
---
v16:
- Remove outdated -n option (Taehee).
- Use 'ifname' instead of accidentally hardc
7;inflight': 1023,
'inflight-mem': 4190208},
And queue stats:
$ ./cli.py --spec ../netlink/specs/netdev.yaml --dump queue-get
...
{'dmabuf': 10, 'id': 8, 'ifindex': 3, 'type': 'rx'},
{'dmabuf': 10, 'id': 9,
On Tue, Jul 30, 2024 at 4:17 AM Xuan Zhuo wrote:
>
> On Tue, 30 Jul 2024 02:26:05 +, Mina Almasry
> wrote:
> > Add netdev_rx_queue_restart() function to netdev_rx_queue.h
>
>
> Can you say more? As far as I understand, we just release the buffer
> submitted to the
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,
>
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 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
201 - 300 of 462 matches
Mail list logo