Re: [PATCH net-next v25 10/13] net: add SO_DEVMEM_DONTNEED setsockopt to release RX frags

2024-10-11 Thread Mina Almasry
On Fri, Oct 11, 2024 at 8:27 AM Jakub Kicinski wrote: > > On Thu, 10 Oct 2024 12:05:38 -0700 Mina Almasry wrote: > > diff --git a/net/core/sock.c b/net/core/sock.c > > index 083d438d8b6f..cb3d8b19de14 100644 > > --- a/net/core/sock.c > > +++ b/net/core/s

Re: [PATCH net-next v25 10/13] net: add SO_DEVMEM_DONTNEED setsockopt to release RX frags

2024-10-10 Thread Mina Almasry
On Thu, Oct 10, 2024 at 4:17 AM Lai, Yi wrote: > > Hi Mina Almasry, > > Greetings! > > I used Syzkaller and found that there is BUG: soft lockup inqt in linux-next > tree next-20241008 > > After bisection and the first bad commit is: > " > 678f6e28b5f6 net

[PATCH net-next v26 07/13] net: support non paged skb frags

2024-09-10 Thread Mina Almasry
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 Reviewed-by: Jakub Kicinski --- v10: - Fixed newly generated kdoc warnings found by patchwork. While we&#x

[PATCH net-next v26 11/13] net: add devmem TCP documentation

2024-09-10 Thread 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 --- v25: - Doc cleanups (Jakub) v16: - Add documentation on unbinding the NIC from dmabuf (Donald). - Add note that any dmabuf should work

[PATCH net-next v26 04/13] netdev: netdevice devmem allocator

2024-09-10 Thread Mina Almasry
ff-by: Willem de Bruijn Signed-off-by: Kaiyuan Zhang Signed-off-by: Mina Almasry Reviewed-by: Pavel Begunkov Reviewed-by: Jakub Kicinski --- v23: - WARN_ON when we don't see the dma_addr in the gen_pool (Jakub) v20: - Removed dma_addr field in dmabuf_genpool_chunk_owner not used in th

[PATCH net-next v26 13/13] netdev: add dmabuf introspection

2024-09-10 Thread Mina Almasry
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, &

[PATCH net-next v26 10/13] net: add SO_DEVMEM_DONTNEED setsockopt to release RX frags

2024-09-10 Thread 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

[PATCH net-next v26 12/13] selftests: add ncdevmem, netcat for devmem TCP

2024-09-10 Thread Mina Almasry
, 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 --- v24: - Add *.d to .gitignore, to stop tracking this file the build generates: ``` git status

[PATCH net-next v26 08/13] net: add support for skbs with unreadable frags

2024-09-10 Thread 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 Reviewed-by: Eric Dumazet Reviewed-by: Jakub Kicinski --- v25: - Remove readable check in tcp_skb_can_collapse_to(). - Add ch

[PATCH net-next v26 09/13] tcp: RX path for devmem TCP

2024-09-10 Thread Mina Almasry
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

[PATCH net-next v26 06/13] memory-provider: dmabuf devmem memory provider

2024-09-10 Thread Mina Almasry
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 Reviewed-by: Jakub Kicinski --- v25: - Change page_pool_param netdev_rx_queue struct to queue_idx (Jakub) - Address nits (Jakub)

[PATCH net-next v26 05/13] page_pool: devmem support

2024-09-10 Thread 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 Acked-by: Jakub Kicinski --- v23: - Fix comment on netmem_is_perf_

[PATCH net-next v26 03/13] netdev: support binding dma-buf to netdevice

2024-09-10 Thread Mina Almasry
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 Reviewed-by: Jakub Kicinski ---

[PATCH net-next v26 02/13] net: netdev netlink api to bind dma-buf to a net device

2024-09-10 Thread Mina Almasry
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

[PATCH net-next v26 01/13] netdev: add netdev_rx_queue_restart()

2024-09-10 Thread Mina Almasry
ff-by: Mina Almasry Reviewed-by: Pavel Begunkov Reviewed-by: Jakub Kicinski --- v18: - Add more color to commit message (Xuan Zhuo). v17: - Use ASSERT_RTNL() (Jakub). v13: - Add reviewed-by from Pavel (thanks!) - Fixed comment (Pavel) v11: - Fix not checking dev->queue_mgmt_ops (Pavel

[PATCH net-next v26 00/13] Device Memory TCP

2024-09-10 Thread Mina Almasry
er 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 Borst Cc: Pra

Re: [PATCH net-next v25 00/13] Device Memory TCP

2024-09-10 Thread Mina Almasry
On Tue, Sep 10, 2024 at 8:02 AM Jakub Kicinski wrote: > > On Mon, 9 Sep 2024 05:43:05 +0000 Mina Almasry wrote: > > Device memory TCP (devmem TCP) is a proposal for transferring data to and/or > > from device memory efficiently, without bouncing the data to a host memory > &

Re: [PATCH net-next v25 00/13] Device Memory TCP

2024-09-09 Thread Mina Almasry
On Mon, Sep 9, 2024 at 4:21 AM Yunsheng Lin wrote: > > On 2024/9/9 13:43, Mina Almasry wrote: > > > > > Perf - page-pool benchmark: > > --- > > > > bench_page_pool_simple.ko tests with and without these changes: > > https:

[PATCH net-next v25 12/13] selftests: add ncdevmem, netcat for devmem TCP

2024-09-08 Thread Mina Almasry
, 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 --- v24: - Add *.d to .gitignore, to stop tracking this file the build generates: ``` git status

[PATCH net-next v25 13/13] netdev: add dmabuf introspection

2024-09-08 Thread Mina Almasry
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, &

[PATCH net-next v25 09/13] tcp: RX path for devmem TCP

2024-09-08 Thread Mina Almasry
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

[PATCH net-next v25 11/13] net: add devmem TCP documentation

2024-09-08 Thread 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 --- v25: - Doc cleanups (Jakub) v16: - Add documentation on unbinding the NIC from dmabuf (Donald). - Add note that any dmabuf should work

[PATCH net-next v25 10/13] net: add SO_DEVMEM_DONTNEED setsockopt to release RX frags

2024-09-08 Thread 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

[PATCH net-next v25 08/13] net: add support for skbs with unreadable frags

2024-09-08 Thread 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 Reviewed-by: Eric Dumazet --- v25: - Remove readable check in tcp_skb_can_collapse_to(). - Add check in skb_checksum_help (Jakub).

[PATCH net-next v25 07/13] net: support non paged skb frags

2024-09-08 Thread Mina Almasry
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 Reviewed-by: Jakub Kicinski --- v10: - Fixed newly generated kdoc warnings found by patchwork. While we&#x

[PATCH net-next v25 06/13] memory-provider: dmabuf devmem memory provider

2024-09-08 Thread Mina Almasry
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 --- v25: - Change page_pool_param netdev_rx_queue struct to queue_idx (Jakub) - Address nits (Jakub) - Move mp_dmabuf_devmem.h

[PATCH net-next v25 05/13] page_pool: devmem support

2024-09-08 Thread 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 Acked-by: Jakub Kicinski --- v23: - Fix comment on netmem_is_perf_

[PATCH net-next v25 04/13] netdev: netdevice devmem allocator

2024-09-08 Thread Mina Almasry
ff-by: Willem de Bruijn Signed-off-by: Kaiyuan Zhang Signed-off-by: Mina Almasry Reviewed-by: Pavel Begunkov Reviewed-by: Jakub Kicinski --- v23: - WARN_ON when we don't see the dma_addr in the gen_pool (Jakub) v20: - Removed dma_addr field in dmabuf_genpool_chunk_owner not used in th

[PATCH net-next v25 03/13] netdev: support binding dma-buf to netdevice

2024-09-08 Thread Mina Almasry
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 Reviewed-by: Jakub Kicinski ---

[PATCH net-next v25 02/13] net: netdev netlink api to bind dma-buf to a net device

2024-09-08 Thread Mina Almasry
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

[PATCH net-next v25 01/13] netdev: add netdev_rx_queue_restart()

2024-09-08 Thread Mina Almasry
ff-by: Mina Almasry Reviewed-by: Pavel Begunkov Reviewed-by: Jakub Kicinski --- v18: - Add more color to commit message (Xuan Zhuo). v17: - Use ASSERT_RTNL() (Jakub). v13: - Add reviewed-by from Pavel (thanks!) - Fixed comment (Pavel) v11: - Fix not checking dev->queue_mgmt_ops (Pavel

[PATCH net-next v25 00/13] Device Memory TCP

2024-09-08 Thread Mina Almasry
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: Jason Gunth

Re: [PATCH net-next v24 06/13] memory-provider: dmabuf devmem memory provider

2024-09-08 Thread Mina Almasry
On Tue, Sep 3, 2024 at 2:19 PM Jakub Kicinski wrote: > > On Sat, 31 Aug 2024 00:43:06 +0000 Mina Almasry wrote: > > diff --git a/include/net/mp_dmabuf_devmem.h b/include/net/mp_dmabuf_devmem.h > > new file mode 100644 > > index ..6d1cf2a77f6b > > --- /

Re: [PATCH net-next v24 08/13] net: add support for skbs with unreadable frags

2024-09-04 Thread Mina Almasry
On Tue, Sep 3, 2024 at 2:40 PM Jakub Kicinski wrote: > > On Sat, 31 Aug 2024 00:43:08 +0000 Mina Almasry wrote: > > static inline bool tcp_skb_can_collapse_to(const struct sk_buff *skb) > > { > > - return likely(!TCP_SKB_CB(skb)->eor); > > + re

[PATCH net-next v24 10/13] net: add SO_DEVMEM_DONTNEED setsockopt to release RX frags

2024-08-30 Thread 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

[PATCH net-next v24 07/13] net: support non paged skb frags

2024-08-30 Thread Mina Almasry
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

[PATCH net-next v24 06/13] memory-provider: dmabuf devmem memory provider

2024-08-30 Thread Mina Almasry
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 --- v23: - Sort includes (Jakub) - Add missing linux/mm.h include found after sorting. v21: - Provide empty definitions of fu

[PATCH net-next v24 12/13] selftests: add ncdevmem, netcat for devmem TCP

2024-08-30 Thread Mina Almasry
, 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 --- v24: - Add *.d to .gitignore, to stop tracking this file the build generates: ``` git status

[PATCH net-next v24 11/13] net: add devmem TCP documentation

2024-08-30 Thread 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

[PATCH net-next v24 09/13] tcp: RX path for devmem TCP

2024-08-30 Thread Mina Almasry
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

[PATCH net-next v24 13/13] netdev: add dmabuf introspection

2024-08-30 Thread Mina Almasry
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, &

[PATCH net-next v24 08/13] net: add support for skbs with unreadable frags

2024-08-30 Thread 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 Reviewed-by: Eric Dumazet --- v16: - Fix unreadable handling in skb_split_no_header() (Eric). v11: - drop excessive checks for

[PATCH net-next v24 05/13] page_pool: devmem support

2024-08-30 Thread 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 Acked-by: Jakub Kicinski --- v23: - Fix comment on netmem_is_perf_

[PATCH net-next v24 01/13] netdev: add netdev_rx_queue_restart()

2024-08-30 Thread Mina Almasry
ff-by: Mina Almasry Reviewed-by: Pavel Begunkov Reviewed-by: Jakub Kicinski --- v18: - Add more color to commit message (Xuan Zhuo). v17: - Use ASSERT_RTNL() (Jakub). v13: - Add reviewed-by from Pavel (thanks!) - Fixed comment (Pavel) v11: - Fix not checking dev->queue_mgmt_ops (Pavel

[PATCH net-next v24 03/13] netdev: support binding dma-buf to netdevice

2024-08-30 Thread Mina Almasry
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 --- v24: - Fix a coupl

[PATCH net-next v24 04/13] netdev: netdevice devmem allocator

2024-08-30 Thread Mina Almasry
ff-by: Willem de Bruijn Signed-off-by: Kaiyuan Zhang Signed-off-by: Mina Almasry Reviewed-by: Pavel Begunkov Reviewed-by: Jakub Kicinski --- v23: - WARN_ON when we don't see the dma_addr in the gen_pool (Jakub) v20: - Removed dma_addr field in dmabuf_genpool_chunk_owner not used in th

[PATCH net-next v24 02/13] net: netdev netlink api to bind dma-buf to a net device

2024-08-30 Thread Mina Almasry
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

[PATCH net-next v24 00/13] Device Memory TCP

2024-08-30 Thread Mina Almasry
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: Jason Gunthorpe Cc: Y

Re: [PATCH net-next v23 03/13] netdev: support binding dma-buf to netdevice

2024-08-29 Thread Mina Almasry
On Thu, Aug 29, 2024 at 2:24 PM Vadim Fedorenko wrote: > > On 29/08/2024 22:08, Jakub Kicinski wrote: > > On Thu, 29 Aug 2024 06:01:16 + Mina Almasry wrote: > >> +err = genlmsg_reply(rsp, info); > >> +if (err) > >> +got

Re: [PATCH net-next v23 03/13] netdev: support binding dma-buf to netdevice

2024-08-29 Thread Mina Almasry
> +#include > #include > ... > > +#include > #include > Darn, I went too overboard with sorting of includes. ynl-regen.sh wants these in the reverse order, which is unsorted. I'll fix it in the next iteration, and I added this check as well to my presubmits. BTW I submitted 2 iterations al

[PATCH net-next v23 13/13] netdev: add dmabuf introspection

2024-08-28 Thread Mina Almasry
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,

[PATCH net-next v23 11/13] net: add devmem TCP documentation

2024-08-28 Thread 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

[PATCH net-next v23 12/13] selftests: add ncdevmem, netcat for devmem TCP

2024-08-28 Thread Mina Almasry
, 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 --- v22: - Add run_command helper. It reduces boiler plate and prints the commands it is running

[PATCH net-next v23 10/13] net: add SO_DEVMEM_DONTNEED setsockopt to release RX frags

2024-08-28 Thread 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

[PATCH net-next v23 08/13] net: add support for skbs with unreadable frags

2024-08-28 Thread 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 Reviewed-by: Eric Dumazet --- v16: - Fix unreadable handling in skb_split_no_header() (Eric). v11: - drop excessive checks for

[PATCH net-next v23 06/13] memory-provider: dmabuf devmem memory provider

2024-08-28 Thread Mina Almasry
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 --- v23: - Sort includes (Jakub) - Add missing linux/mm.h include found after sorting. v21: - Provide empty definitions of fu

[PATCH net-next v23 09/13] tcp: RX path for devmem TCP

2024-08-28 Thread Mina Almasry
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

[PATCH net-next v23 07/13] net: support non paged skb frags

2024-08-28 Thread Mina Almasry
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

[PATCH net-next v23 05/13] page_pool: devmem support

2024-08-28 Thread 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 Acked-by: Jakub Kicinski --- v23: - Fix comment on netmem_is_perf_

[PATCH net-next v23 04/13] netdev: netdevice devmem allocator

2024-08-28 Thread Mina Almasry
ff-by: Willem de Bruijn Signed-off-by: Kaiyuan Zhang Signed-off-by: Mina Almasry Reviewed-by: Pavel Begunkov Reviewed-by: Jakub Kicinski --- v23: - WARN_ON when we don't see the dma_addr in the gen_pool (Jakub) v20: - Removed dma_addr field in dmabuf_genpool_chunk_owner not used in th

[PATCH net-next v23 02/13] net: netdev netlink api to bind dma-buf to a net device

2024-08-28 Thread Mina Almasry
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

[PATCH net-next v23 03/13] netdev: support binding dma-buf to netdevice

2024-08-28 Thread Mina Almasry
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 --- v23: - Create CONFIG_NET_DE

[PATCH net-next v23 01/13] netdev: add netdev_rx_queue_restart()

2024-08-28 Thread Mina Almasry
ff-by: Mina Almasry Reviewed-by: Pavel Begunkov Reviewed-by: Jakub Kicinski --- v18: - Add more color to commit message (Xuan Zhuo). v17: - Use ASSERT_RTNL() (Jakub). v13: - Add reviewed-by from Pavel (thanks!) - Fixed comment (Pavel) v11: - Fix not checking dev->queue_mgmt_ops (Pavel

[PATCH net-next v23 00/13] Device Memory TCP

2024-08-28 Thread Mina Almasry
f 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: Jason Gunthorpe Cc: Yunsheng Lin Cc: Shailend Chan

Re: [PATCH net-next v22 04/13] netdev: netdevice devmem allocator

2024-08-28 Thread Mina Almasry
On Tue, Aug 27, 2024 at 7:15 PM Jakub Kicinski wrote: > > On Sun, 25 Aug 2024 04:15:02 +0000 Mina Almasry wrote: > > +void net_devmem_free_dmabuf(struct net_iov *niov) > > +{ > > + struct net_devmem_dmabuf_binding *binding = net_iov_binding(niov); > >

[PATCH net-next v22 10/13] net: add SO_DEVMEM_DONTNEED setsockopt to release RX frags

2024-08-24 Thread 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

[PATCH net-next v22 13/13] netdev: add dmabuf introspection

2024-08-24 Thread Mina Almasry
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,

[PATCH net-next v22 12/13] selftests: add ncdevmem, netcat for devmem TCP

2024-08-24 Thread Mina Almasry
, 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 --- v22: - Add run_command helper. It reduces boiler plate and prints the commands it is running

[PATCH net-next v22 08/13] net: add support for skbs with unreadable frags

2024-08-24 Thread 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 Reviewed-by: Eric Dumazet --- v16: - Fix unreadable handling in skb_split_no_header() (Eric). v11: - drop excessive checks for

[PATCH net-next v22 09/13] tcp: RX path for devmem TCP

2024-08-24 Thread Mina Almasry
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

[PATCH net-next v22 07/13] net: support non paged skb frags

2024-08-24 Thread Mina Almasry
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

[PATCH net-next v22 11/13] net: add devmem TCP documentation

2024-08-24 Thread 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

[PATCH net-next v22 04/13] netdev: netdevice devmem allocator

2024-08-24 Thread Mina Almasry
ff-by: Willem de Bruijn Signed-off-by: Kaiyuan Zhang Signed-off-by: Mina Almasry Reviewed-by: Pavel Begunkov --- v20: - Removed dma_addr field in dmabuf_genpool_chunk_owner not used in this patch (moved to later patch where it's used). v19: - Don't reset dma_addr on allocation/fr

[PATCH net-next v22 06/13] memory-provider: dmabuf devmem memory provider

2024-08-24 Thread Mina Almasry
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 --- v21: - Provide empty definitions of functions moved to page_pool_priv.h, so that the build still succeeds when CONFIG_PAGE_

[PATCH net-next v22 05/13] page_pool: devmem support

2024-08-24 Thread 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 --- v19: - Move page_pool_set_dma_addr(_netmem) to page_pool_priv.h - D

[PATCH net-next v22 02/13] net: netdev netlink api to bind dma-buf to a net device

2024-08-24 Thread Mina Almasry
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

[PATCH net-next v22 01/13] netdev: add netdev_rx_queue_restart()

2024-08-24 Thread Mina Almasry
ff-by: Mina Almasry Reviewed-by: Pavel Begunkov Reviewed-by: Jakub Kicinski --- v18: - Add more color to commit message (Xuan Zhuo). v17: - Use ASSERT_RTNL() (Jakub). v13: - Add reviewed-by from Pavel (thanks!) - Fixed comment (Pavel) v11: - Fix not checking dev->queue_mgmt_ops (Pavel

[PATCH net-next v22 03/13] netdev: support binding dma-buf to netdevice

2024-08-24 Thread Mina Almasry
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 --- v22: - Disable binding xdp t

[PATCH net-next v22 00/13] Device Memory TCP

2024-08-24 Thread Mina Almasry
IC: 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 Cc: Bagas Sanjaya Cc: Steven Rostedt Cc: Christoph Hel

Re: [PATCH net-next v19 03/13] netdev: support binding dma-buf to netdevice

2024-08-21 Thread Mina Almasry
On Wed, Aug 21, 2024 at 5:15 AM Taehee Yoo wrote: > > On Tue, Aug 20, 2024 at 1:01 PM Mina Almasry wrote: > > > > On Mon, Aug 19, 2024 at 6:53 PM Jakub Kicinski wrote: > > > > > > On Mon, 19 Aug 2024 00:44:27 +0900 Taehee Yoo wrote: > > > > &g

Re: [PATCH net-next v19 03/13] netdev: support binding dma-buf to netdevice

2024-08-20 Thread Mina Almasry
On Tue, Aug 20, 2024 at 11:19 AM Jakub Kicinski wrote: > > On Tue, 20 Aug 2024 00:01:02 -0400 Mina Almasry wrote: > > Took a bit of a look here. Forgive me, I'm not that familiar with XDP > > and virtual interfaces, so I'm a bit unsure what to do here. > >

[PATCH net-next v21 10/13] net: add SO_DEVMEM_DONTNEED setsockopt to release RX frags

2024-08-19 Thread 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

[PATCH net-next v21 13/13] netdev: add dmabuf introspection

2024-08-19 Thread Mina Almasry
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,

[PATCH net-next v21 12/13] selftests: add ncdevmem, netcat for devmem TCP

2024-08-19 Thread Mina Almasry
, 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 --- v20: - Remove unnecessary sleep(1) - Add test to ensure dmabuf binding fails if header split is

[PATCH net-next v21 04/13] netdev: netdevice devmem allocator

2024-08-19 Thread Mina Almasry
ff-by: Willem de Bruijn Signed-off-by: Kaiyuan Zhang Signed-off-by: Mina Almasry Reviewed-by: Pavel Begunkov --- v20: - Removed dma_addr field in dmabuf_genpool_chunk_owner not used in this patch (moved to later patch where it's used). v19: - Don't reset dma_addr on allocation/fr

[PATCH net-next v21 09/13] tcp: RX path for devmem TCP

2024-08-19 Thread Mina Almasry
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

[PATCH net-next v21 11/13] net: add devmem TCP documentation

2024-08-19 Thread 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

[PATCH net-next v21 07/13] net: support non paged skb frags

2024-08-19 Thread Mina Almasry
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

[PATCH net-next v21 08/13] net: add support for skbs with unreadable frags

2024-08-19 Thread 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 Reviewed-by: Eric Dumazet --- v16: - Fix unreadable handling in skb_split_no_header() (Eric). v11: - drop excessive checks for

[PATCH net-next v21 06/13] memory-provider: dmabuf devmem memory provider

2024-08-19 Thread Mina Almasry
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 --- v21: - Provide empty definitions of functions moved to page_pool_priv.h, so that the build still succeeds when CONFIG_PAGE_

[PATCH net-next v21 05/13] page_pool: devmem support

2024-08-19 Thread 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 --- v19: - Move page_pool_set_dma_addr(_netmem) to page_pool_priv.h - D

[PATCH net-next v21 03/13] netdev: support binding dma-buf to netdevice

2024-08-19 Thread Mina Almasry
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 --- v21: - Move definitio

[PATCH net-next v21 02/13] net: netdev netlink api to bind dma-buf to a net device

2024-08-19 Thread Mina Almasry
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

[PATCH net-next v21 01/13] netdev: add netdev_rx_queue_restart()

2024-08-19 Thread Mina Almasry
ff-by: Mina Almasry Reviewed-by: Pavel Begunkov Reviewed-by: Jakub Kicinski --- v18: - Add more color to commit message (Xuan Zhuo). v17: - Use ASSERT_RTNL() (Jakub). v13: - Add reviewed-by from Pavel (thanks!) - Fixed comment (Pavel) v11: - Fix not checking dev->queue_mgmt_ops (Pavel

[PATCH net-next v21 00/13] Device Memory TCP

2024-08-19 Thread Mina Almasry
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 Borst Cc: P

Re: [PATCH net-next v19 03/13] netdev: support binding dma-buf to netdevice

2024-08-19 Thread Mina Almasry
On Mon, Aug 19, 2024 at 6:53 PM Jakub Kicinski wrote: > > On Mon, 19 Aug 2024 00:44:27 +0900 Taehee Yoo wrote: > > > @@ -9537,6 +9540,10 @@ static int dev_xdp_attach(struct net_device *dev, > > > struct netlink_ext_ack *extack > > > NL_SET_ERR_MSG(extack, "Native and gener

Re: [PATCH net-next v20 00/13] Device Memory TCP

2024-08-19 Thread Mina Almasry
On Sun, Aug 18, 2024 at 11:54 PM Mina Almasry wrote: > > v20: > https://patchwork.kernel.org/project/netdevbpf/list/?series=879373&state=* > > > v20 aims to resolve a couple of bug reports against v19, and addresses > some review comments around the page_p

[PATCH net-next v20 13/13] netdev: add dmabuf introspection

2024-08-18 Thread Mina Almasry
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,

[PATCH net-next v20 12/13] selftests: add ncdevmem, netcat for devmem TCP

2024-08-18 Thread Mina Almasry
, 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 --- v20: - Remove unnecessary sleep(1) - Add test to ensure dmabuf binding fails if header split is

[PATCH net-next v20 11/13] net: add devmem TCP documentation

2024-08-18 Thread 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

  1   2   3   4   5   6   >