Re: [PATCH net-next v3 5/6] net: devmem: Implement TX path

2025-02-12 Thread Mina Almasry
On Wed, Feb 12, 2025 at 7:52 AM Pavel Begunkov wrote: > > On 2/10/25 21:09, Mina Almasry wrote: > > On Wed, Feb 5, 2025 at 4:20 AM Pavel Begunkov > > wrote: > >> > >> On 2/3/25 22:39, Mina Almasry wrote: > >> ... > >>> diff --git a/in

Re: [PATCH RFC net-next v1 5/5] net: devmem: Implement TX path

2025-02-10 Thread Mina Almasry
On Wed, Feb 5, 2025 at 2:22 PM Pavel Begunkov wrote: > > On 2/5/25 22:16, Pavel Begunkov wrote: > > On 2/5/25 20:22, Mina Almasry wrote: > >> On Wed, Feb 5, 2025 at 4:41 AM Pavel Begunkov > >> wrote: > >>> > >>> On 1/

Re: [PATCH net-next v3 5/6] net: devmem: Implement TX path

2025-02-10 Thread Mina Almasry
On Wed, Feb 5, 2025 at 4:20 AM Pavel Begunkov wrote: > > On 2/3/25 22:39, Mina Almasry wrote: > ... > > diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h > > index bb2b751d274a..3ff8f568c382 100644 > > --- a/include/linux/skbuff.h > > +++ b/incl

Re: [PATCH RFC net-next v1 5/5] net: devmem: Implement TX path

2025-02-05 Thread Mina Almasry
On Wed, Feb 5, 2025 at 4:41 AM Pavel Begunkov wrote: > > On 1/28/25 14:49, Willem de Bruijn wrote: > +struct net_devmem_dmabuf_binding * > +net_devmem_get_sockc_binding(struct sock *sk, struct sockcm_cookie > *sockc) > +{ > + struct net_devmem_dmabuf_binding *binding;

Re: [PATCH net-next v3 0/6] Device memory TCP TX

2025-02-05 Thread Mina Almasry
On Tue, Feb 4, 2025 at 6:06 PM Jakub Kicinski wrote: > > On Tue, 4 Feb 2025 11:41:09 -0800 Stanislav Fomichev wrote: > > > > Don't we need some way for the device to opt-in (or opt-out) and avoid > > > > such issues? > > > > > > > > > > Yeah, I think likely the driver needs to declare support (i.e

Re: [PATCH net-next v3 0/6] Device memory TCP TX

2025-02-05 Thread Mina Almasry
On Tue, Feb 4, 2025 at 6:08 PM Jakub Kicinski wrote: > > On Mon, 3 Feb 2025 22:39:10 +0000 Mina Almasry wrote: > > v3: > > https://patchwork.kernel.org/project/netdevbpf/list/?series=929401&state=* > > === > > > > RFC v2: > > https://patchwork.ke

Re: [PATCH net-next v3 0/6] Device memory TCP TX

2025-02-04 Thread Mina Almasry
On Tue, Feb 4, 2025 at 10:32 AM Paolo Abeni wrote: > > On 2/4/25 7:06 PM, Stanislav Fomichev wrote: > > On 02/04, Mina Almasry wrote: > >> On Tue, Feb 4, 2025 at 4:32 AM Paolo Abeni wrote: > >>> > >>> On 2/3/25 11:39 PM, Mina Almasry wrote: > &

Re: [PATCH net-next v3 0/6] Device memory TCP TX

2025-02-04 Thread Mina Almasry
On Tue, Feb 4, 2025 at 10:06 AM Stanislav Fomichev wrote: > > On 02/04, Mina Almasry wrote: > > On Tue, Feb 4, 2025 at 4:32 AM Paolo Abeni wrote: > > > > > > On 2/3/25 11:39 PM, Mina Almasry wrote: > > > > The TX path had been dropped from the Device Mem

Re: [PATCH net-next v3 2/6] selftests: ncdevmem: Implement devmem TCP TX

2025-02-04 Thread Mina Almasry
On Tue, Feb 4, 2025 at 9:56 AM Paolo Abeni wrote: > > On 2/4/25 6:35 PM, Mina Almasry wrote: > > On Tue, Feb 4, 2025 at 4:29 AM Paolo Abeni wrote: > >>> .../selftests/drivers/net/hw/ncdevmem.c | 300 +- > >>> 1 file changed, 289 insertio

Re: [PATCH net-next v3 2/6] selftests: ncdevmem: Implement devmem TCP TX

2025-02-04 Thread Mina Almasry
On Tue, Feb 4, 2025 at 4:29 AM Paolo Abeni wrote: > > On 2/3/25 11:39 PM, Mina Almasry wrote: > > Add support for devmem TX in ncdevmem. > > > > This is a combination of the ncdevmem from the devmem TCP series RFCv1 > > which included the TX path, and work by S

Re: [PATCH net-next v3 0/6] Device memory TCP TX

2025-02-04 Thread Mina Almasry
On Tue, Feb 4, 2025 at 4:32 AM Paolo Abeni wrote: > > On 2/3/25 11:39 PM, Mina Almasry wrote: > > The TX path had been dropped from the Device Memory TCP patch series > > post RFCv1 [1], to make that series slightly easier to review. This > > series rebases the implemen

[PATCH net-next v3 5/6] net: devmem: Implement TX path

2025-02-03 Thread Mina Almasry
], which included the TX path, but Stan did all the rebasing on top of netmem/net_iov. Cc: Stanislav Fomichev Signed-off-by: Kaiyuan Zhang Signed-off-by: Mina Almasry --- v3: - Use kvmalloc_array instead of kcalloc (Stan). - Fix unreachable code warning (Simon). v2: - Remove dmabuf_offset from

[PATCH net-next v3 6/6] net: devmem: make dmabuf unbinding scheduled work

2025-02-03 Thread Mina Almasry
solve this by making __net_devmem_dmabuf_binding_free schedule_work'd. Suggested-by: Stanislav Fomichev Signed-off-by: Mina Almasry --- net/core/devmem.c | 4 +++- net/core/devmem.h | 10 ++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/net/core/devmem.c b/net/core/devmem.c index 5de88754

[PATCH net-next v3 4/6] net: devmem: TCP tx netlink api

2025-02-03 Thread Mina Almasry
From: Stanislav Fomichev Add bind-tx netlink call to attach dmabuf for TX; queue is not required, only ifindex and dmabuf fd for attachment. Signed-off-by: Stanislav Fomichev Signed-off-by: Mina Almasry --- v3: - Fix ynl-regen.sh error (Simon). --- Documentation/netlink/specs/netdev.yaml

[PATCH net-next v3 3/6] net: add get_netmem/put_netmem support

2025-02-03 Thread Mina Almasry
will check the type of the netmem and route it to the correct helper: pages -> [get|put]_page() dmabuf net_iovs -> net_devmem_[get|put]_net_iov() new net_iovs -> new helpers Signed-off-by: Mina Almasry --- v2: - Add comment on top of refcount_t ref explaining the usage in the

[PATCH net-next v3 2/6] selftests: ncdevmem: Implement devmem TCP TX

2025-02-03 Thread Mina Almasry
Add support for devmem TX in ncdevmem. This is a combination of the ncdevmem from the devmem TCP series RFCv1 which included the TX path, and work by Stan to include the netlink API and refactored on top of his generic memory_provider support. Signed-off-by: Mina Almasry Signed-off-by

[PATCH net-next v3 1/6] net: add devmem TCP TX documentation

2025-02-03 Thread Mina Almasry
Add documentation outlining the usage and details of the devmem TCP TX API. Signed-off-by: Mina Almasry --- v2: - Update documentation for iov_base is the dmabuf offset (Stan) --- Documentation/networking/devmem.rst | 144 +++- 1 file changed, 140 insertions(+), 4

[PATCH net-next v3 0/6] Device memory TCP TX

2025-02-03 Thread Mina Almasry
g/netdev/20240909054318.1809580-1-almasrym...@google.com/ [2] https://lore.kernel.org/netdev/20240913150913.1280238-2-...@fomichev.me/T/#m066dd407fbed108828e2c40ae50e3f4376ef57fd Cc: s...@fomichev.me Cc: asml.sile...@gmail.com Cc: d...@davidwei.uk Cc: Jamal Hadi Salim Cc: Victor Nogueira Cc: Pedro Tammela

Re: [PATCH RFC net-next v2 2/6] selftests: ncdevmem: Implement devmem TCP TX

2025-01-30 Thread Mina Almasry
On Thu, Jan 30, 2025 at 3:05 PM Stanislav Fomichev wrote: > > On 01/30, Mina Almasry wrote: > > Add support for devmem TX in ncdevmem. > > > > This is a combination of the ncdevmem from the devmem TCP series RFCv1 > > which included the TX path, and work by Stan to i

Re: [PATCH RFC net-next v2 1/6] net: add devmem TCP TX documentation

2025-01-30 Thread Mina Almasry
On Thu, Jan 30, 2025 at 2:59 PM Stanislav Fomichev wrote: > > On 01/30, Mina Almasry wrote: > > Add documentation outlining the usage and details of the devmem TCP TX > > API. > > > > Signed-off-by: Mina Almasry > > > > --- > > > > v2: > &

[PATCH RFC net-next v2 6/6] net: devmem: make dmabuf unbinding scheduled work

2025-01-30 Thread Mina Almasry
solve this by making __net_devmem_dmabuf_binding_free schedule_work'd. Suggested-by: Stanislav Fomichev Signed-off-by: Mina Almasry --- net/core/devmem.c | 4 +++- net/core/devmem.h | 10 ++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/net/core/devmem.c b/net/core/devmem.c index 796338b1

[PATCH RFC net-next v2 5/6] net: devmem: Implement TX path

2025-01-30 Thread Mina Almasry
], which included the TX path, but Stan did all the rebasing on top of netmem/net_iov. Cc: Stanislav Fomichev Signed-off-by: Kaiyuan Zhang Signed-off-by: Mina Almasry --- v2: - Remove dmabuf_offset from the dmabuf cmsg. - Update zerocopy_fill_skb_from_devmem to interpret the iov_base

[PATCH RFC net-next v2 4/6] net: devmem: TCP tx netlink api

2025-01-30 Thread Mina Almasry
From: Stanislav Fomichev Add bind-tx netlink call to attach dmabuf for TX; queue is not required, only ifindex and dmabuf fd for attachment. Signed-off-by: Stanislav Fomichev Signed-off-by: Mina Almasry --- Documentation/netlink/specs/netdev.yaml | 12 include/uapi/linux

[PATCH RFC net-next v2 3/6] net: add get_netmem/put_netmem support

2025-01-30 Thread Mina Almasry
will check the type of the netmem and route it to the correct helper: pages -> [get|put]_page() dmabuf net_iovs -> net_devmem_[get|put]_net_iov() new net_iovs -> new helpers Signed-off-by: Mina Almasry --- v2: - Add comment on top of refcount_t ref explaining the usage in the

[PATCH RFC net-next v2 1/6] net: add devmem TCP TX documentation

2025-01-30 Thread Mina Almasry
Add documentation outlining the usage and details of the devmem TCP TX API. Signed-off-by: Mina Almasry --- v2: - Update documentation for iov_base is the dmabuf offset (Stan) --- Documentation/networking/devmem.rst | 144 +++- 1 file changed, 140 insertions(+), 4

[PATCH RFC net-next v2 2/6] selftests: ncdevmem: Implement devmem TCP TX

2025-01-30 Thread Mina Almasry
Add support for devmem TX in ncdevmem. This is a combination of the ncdevmem from the devmem TCP series RFCv1 which included the TX path, and work by Stan to include the netlink API and refactored on top of his generic memory_provider support. Signed-off-by: Mina Almasry Signed-off-by

[PATCH RFC net-next v2 0/6] Device memory TCP TX

2025-01-30 Thread Mina Almasry
ev.me Cc: asml.sile...@gmail.com Cc: d...@davidwei.uk Cc: Jamal Hadi Salim Cc: Victor Nogueira Cc: Pedro Tammela Mina Almasry (5): net: add devmem TCP TX documentation selftests: ncdevmem: Implement devmem TCP TX net: add get_netmem/put_netmem support net: devmem: Implement TX path net: d

Re: [PATCH RFC net-next v1 5/5] net: devmem: Implement TX path

2025-01-27 Thread Mina Almasry
Hi Willem, sorry for the late reply, some holiday vacations and other priorities pulled me away from this a bit. I'm getting ready to post RFC V2, so answering some questions ahead of when I do that. On Thu, Dec 26, 2024 at 1:52 PM Willem de Bruijn wrote: ... > > +static int zerocopy_fill_skb_fro

Re: [PATCH RFC net-next v1 5/5] net: devmem: Implement TX path

2025-01-27 Thread Mina Almasry
On Thu, Dec 26, 2024 at 11:10 AM Stanislav Fomichev wrote: > > On 12/20, Stanislav Fomichev wrote: > > On 12/21, Mina Almasry wrote: > > > void netdev_nl_sock_priv_init(struct list_head *priv) > > > diff --git a/net/core/skbuff.c b/net/core/skbuff.c > > >

Re: [PATCH RFC net-next v1 3/5] net: add get_netmem/put_netmem support

2025-01-27 Thread Mina Almasry
On Thu, Dec 26, 2024 at 11:07 AM Stanislav Fomichev wrote: > > On 12/21, Mina Almasry wrote: > > Currently net_iovs support only pp ref counts, and do not support a > > page ref equivalent. > > > > This is fine for the RX path as net_iovs are used exclusive

Re: [PATCH RFC net-next v1 1/5] net: add devmem TCP TX documentation

2025-01-27 Thread Mina Almasry
On Fri, Dec 20, 2024 at 8:56 PM Stanislav Fomichev wrote: > > On 12/21, Mina Almasry wrote: > > Add documentation outlining the usage and details of the devmem TCP TX > > API. > > > > Signed-off-by: Mina Almasry > > --- > >

[PATCH RFC net-next v1 5/5] net: devmem: Implement TX path

2024-12-20 Thread Mina Almasry
work by Stanislav Fomichev . A lot of the meat of the implementation came from devmem TCP RFC v1[1], which included the TX path, but Stan did all the rebasing on top of netmem/net_iov. Cc: Stanislav Fomichev Signed-off-by: Kaiyuan Zhang Signed-off-by: Mina Almasry --- include/linux/skbuff.h

[PATCH RFC net-next v1 4/5] net: devmem TCP tx netlink api

2024-12-20 Thread Mina Almasry
From: Stanislav Fomichev Add bind-tx netlink call to attach dmabuf for TX; queue is not required, only ifindex and dmabuf fd for attachment. Signed-off-by: Stanislav Fomichev Signed-off-by: Mina Almasry --- Documentation/netlink/specs/netdev.yaml | 12 include/uapi/linux

[PATCH RFC net-next v1 3/5] net: add get_netmem/put_netmem support

2024-12-20 Thread Mina Almasry
will check the type of the netmem and route it to the correct helper: pages -> [get|put]_page() dmabuf net_iovs -> net_devmem_[get|put]_net_iov() new net_iovs -> new helpers Signed-off-by: Mina Almasry --- include/linux/skbuff_ref.h | 4 ++-- include/net/netmem.h |

[PATCH RFC net-next v1 2/5] selftests: ncdevmem: Implement devmem TCP TX

2024-12-20 Thread Mina Almasry
Add support for devmem TX in ncdevmem. This is a combination of the ncdevmem from the devmem TCP series RFCv1 which included the TX path, and work by Stan to include the netlink API and refactored on top of his generic memory_provider support. Signed-off-by: Mina Almasry Signed-off-by

[PATCH RFC net-next v1 1/5] net: add devmem TCP TX documentation

2024-12-20 Thread Mina Almasry
Add documentation outlining the usage and details of the devmem TCP TX API. Signed-off-by: Mina Almasry --- Documentation/networking/devmem.rst | 140 +++- 1 file changed, 136 insertions(+), 4 deletions(-) diff --git a/Documentation/networking/devmem.rst b

[PATCH RFC net-next v1 0/5] Device memory TCP TX

2024-12-20 Thread Mina Almasry
atches to give full credit. [1] https://lore.kernel.org/netdev/20240909054318.1809580-1-almasrym...@google.com/ [2] https://lore.kernel.org/netdev/20240913150913.1280238-2-...@fomichev.me/T/#m066dd407fbed108828e2c40ae50e3f4376ef57fd Cc: s...@fomichev.me Cc: asml.sile...@gmail.com Cc: d...@davidwei.uk