From: Lei Yang <leiyang@redhat.com>
To: Mina Almasry <almasrymina@google.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, kvm@vger.kernel.org,
virtualization@lists.linux.dev, linux-kselftest@vger.kernel.org,
"Donald Hunter" <donald.hunter@gmail.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Paolo Abeni" <pabeni@redhat.com>,
"Simon Horman" <horms@kernel.org>,
"Jonathan Corbet" <corbet@lwn.net>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"Jeroen de Borst" <jeroendb@google.com>,
"Harshitha Ramamurthy" <hramamurthy@google.com>,
"Kuniyuki Iwashima" <kuniyu@amazon.com>,
"Willem de Bruijn" <willemb@google.com>,
"David Ahern" <dsahern@kernel.org>,
"Neal Cardwell" <ncardwell@google.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Stefano Garzarella" <sgarzare@redhat.com>,
"Shuah Khan" <shuah@kernel.org>,
sdf@fomichev.me, asml.silence@gmail.com, dw@davidwei.uk,
"Jamal Hadi Salim" <jhs@mojatatu.com>,
"Victor Nogueira" <victor@mojatatu.com>,
"Pedro Tammela" <pctammela@mojatatu.com>,
"Samiullah Khawaja" <skhawaja@google.com>
Subject: Re: [PATCH net-next v6 0/8] Device memory TCP TX
Date: Fri, 28 Feb 2025 22:25:30 +0800 [thread overview]
Message-ID: <CAPpAL=wzN2L_OOLG6b_D+pVvVnTu4N9X4knfgePtrtLMX7vQww@mail.gmail.com> (raw)
In-Reply-To: <20250227041209.2031104-1-almasrymina@google.com>
I re-tested this series of patches v6 with virtio-net regression
tests, everything works fine.
Tested-by: Lei Yang <leiyang@redhat.com>
On Thu, Feb 27, 2025 at 12:13 PM Mina Almasry <almasrymina@google.com> wrote:
>
> v6: https://lore.kernel.org/netdev/20250222191517.743530-1-almasrymina@google.com/
> ===
>
> v6 has no major changes. Addressed a few issues from Paolo and David,
> and collected Acks from Stan. Thank you everyone for the review!
>
> Changes:
> - retain behavior to process MSG_FASTOPEN even if the provided cmsg is
> invalid (Paolo).
> - Rework the freeing of tx_vec slightly (it now has its own err label).
> (Paolo).
> - Squash the commit that makes dmabuf unbinding scheduled work into the
> same one which implements the TX path so we don't run into future
> errors on bisecting (Paolo).
> - Fix/add comments to explain how dmabuf binding refcounting works
> (David).
>
> v5: https://lore.kernel.org/netdev/20250220020914.895431-1-almasrymina@google.com/
> ===
>
> v5 has no major changes; it clears up the relatively minor issues
> pointed out to in v4, and rebases the series on top of net-next to
> resolve the conflict with a patch that raced to the tree. It also
> collects the review tags from v4.
>
> Changes:
> - Rebase to net-next
> - Fix issues in selftest (Stan).
> - Address comments in the devmem and netmem driver docs (Stan and Bagas)
> - Fix zerocopy_fill_skb_from_devmem return error code (Stan).
>
> v4: https://lore.kernel.org/netdev/20250203223916.1064540-1-almasrymina@google.com/
> ===
>
> v4 mainly addresses the critical driver support issue surfaced in v3 by
> Paolo and Stan. Drivers aiming to support netmem_tx should make sure not
> to pass the netmem dma-addrs to the dma-mapping APIs, as these dma-addrs
> may come from dma-bufs.
>
> Additionally other feedback from v3 is addressed.
>
> Major changes:
> - Add helpers to handle netmem dma-addrs. Add GVE support for
> netmem_tx.
> - Fix binding->tx_vec not being freed on error paths during the
> tx binding.
> - Add a minimal devmem_tx test to devmem.py.
> - Clean up everything obsolete from the cover letter (Paolo).
>
> v3: https://patchwork.kernel.org/project/netdevbpf/list/?series=929401&state=*
> ===
>
> Address minor comments from RFCv2 and fix a few build warnings and
> ynl-regen issues. No major changes.
>
> RFC v2: https://patchwork.kernel.org/project/netdevbpf/list/?series=920056&state=*
> =======
>
> RFC v2 addresses much of the feedback from RFC v1. I plan on sending
> something close to this as net-next reopens, sending it slightly early
> to get feedback if any.
>
> Major changes:
> --------------
>
> - much improved UAPI as suggested by Stan. We now interpret the iov_base
> of the passed in iov from userspace as the offset into the dmabuf to
> send from. This removes the need to set iov.iov_base = NULL which may
> be confusing to users, and enables us to send multiple iovs in the
> same sendmsg() call. ncdevmem and the docs show a sample use of that.
>
> - Removed the duplicate dmabuf iov_iter in binding->iov_iter. I think
> this is good improvment as it was confusing to keep track of
> 2 iterators for the same sendmsg, and mistracking both iterators
> caused a couple of bugs reported in the last iteration that are now
> resolved with this streamlining.
>
> - Improved test coverage in ncdevmem. Now multiple sendmsg() are tested,
> and sending multiple iovs in the same sendmsg() is tested.
>
> - Fixed issue where dmabuf unmapping was happening in invalid context
> (Stan).
>
> ====================================================================
>
> 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 implementation of the TX path on top of the
> net_iov/netmem framework agreed upon and merged. The motivation for
> the feature is thoroughly described in the docs & cover letter of the
> original proposal, so I don't repeat the lengthy descriptions here, but
> they are available in [1].
>
> Full outline on usage of the TX path is detailed in the documentation
> included with this series.
>
> Test example is available via the kselftest included in the series as well.
>
> The series is relatively small, as the TX path for this feature largely
> piggybacks on the existing MSG_ZEROCOPY implementation.
>
> Patch Overview:
> ---------------
>
> 1. Documentation & tests to give high level overview of the feature
> being added.
>
> 1. Add netmem refcounting needed for the TX path.
>
> 2. Devmem TX netlink API.
>
> 3. Devmem TX net stack implementation.
>
> 4. Make dma-buf unbinding scheduled work to handle TX cases where it gets
> freed from contexts where we can't sleep.
>
> 5. Add devmem TX documentation.
>
> 6. Add scaffolding enabling driver support for netmem_tx. Add helpers, driver
> feature flag, and docs to enable drivers to declare netmem_tx support.
>
> 7. Guard netmem_tx against being enabled against drivers that don't
> support it.
>
> 8. Add devmem_tx selftests. Add TX path to ncdevmem and add a test to
> devmem.py.
>
> Testing:
> --------
>
> Testing is very similar to devmem TCP RX path. The ncdevmem test used
> for the RX path is now augemented with client functionality to test TX
> path.
>
> * Test Setup:
>
> Kernel: net-next with this RFC and memory provider API cherry-picked
> locally.
>
> Hardware: Google Cloud A3 VMs.
>
> NIC: GVE with header split & RSS & flow steering support.
>
> Performance results are not included with this version, unfortunately.
> I'm having issues running the dma-buf exporter driver against the
> upstream kernel on my test setup. The issues are specific to that
> dma-buf exporter and do not affect this patch series. I plan to follow
> up this series with perf fixes if the tests point to issues once they're
> up and running.
>
> Special thanks to Stan who took a stab at rebasing the TX implementation
> on top of the netmem/net_iov framework merged. Parts of his proposal [2]
> that are reused as-is are forked off into their own patches to give full
> credit.
>
> [1] https://lore.kernel.org/netdev/20240909054318.1809580-1-almasrymina@google.com/
> [2] https://lore.kernel.org/netdev/20240913150913.1280238-2-sdf@fomichev.me/T/#m066dd407fbed108828e2c40ae50e3f4376ef57fd
>
> Cc: sdf@fomichev.me
> Cc: asml.silence@gmail.com
> Cc: dw@davidwei.uk
> Cc: Jamal Hadi Salim <jhs@mojatatu.com>
> Cc: Victor Nogueira <victor@mojatatu.com>
> Cc: Pedro Tammela <pctammela@mojatatu.com>
> Cc: Samiullah Khawaja <skhawaja@google.com>
>
>
> Mina Almasry (7):
> net: add get_netmem/put_netmem support
> net: devmem: Implement TX path
> net: add devmem TCP TX documentation
> net: enable driver support for netmem TX
> gve: add netmem TX support to GVE DQO-RDA mode
> net: check for driver support in netmem TX
> selftests: ncdevmem: Implement devmem TCP TX
>
> Stanislav Fomichev (1):
> net: devmem: TCP tx netlink api
>
> Documentation/netlink/specs/netdev.yaml | 12 +
> Documentation/networking/devmem.rst | 150 ++++++++-
> .../networking/net_cachelines/net_device.rst | 1 +
> Documentation/networking/netdev-features.rst | 5 +
> Documentation/networking/netmem.rst | 23 +-
> drivers/net/ethernet/google/gve/gve_main.c | 4 +
> drivers/net/ethernet/google/gve/gve_tx_dqo.c | 8 +-
> include/linux/netdevice.h | 2 +
> include/linux/skbuff.h | 17 +-
> include/linux/skbuff_ref.h | 4 +-
> include/net/netmem.h | 23 ++
> include/net/sock.h | 1 +
> include/uapi/linux/netdev.h | 1 +
> net/core/datagram.c | 48 ++-
> net/core/dev.c | 3 +
> net/core/devmem.c | 115 ++++++-
> net/core/devmem.h | 77 ++++-
> net/core/netdev-genl-gen.c | 13 +
> net/core/netdev-genl-gen.h | 1 +
> net/core/netdev-genl.c | 73 ++++-
> net/core/skbuff.c | 48 ++-
> net/core/sock.c | 6 +
> net/ipv4/ip_output.c | 3 +-
> net/ipv4/tcp.c | 50 ++-
> net/ipv6/ip6_output.c | 3 +-
> net/vmw_vsock/virtio_transport_common.c | 5 +-
> tools/include/uapi/linux/netdev.h | 1 +
> .../selftests/drivers/net/hw/devmem.py | 26 +-
> .../selftests/drivers/net/hw/ncdevmem.c | 300 +++++++++++++++++-
> 29 files changed, 950 insertions(+), 73 deletions(-)
>
>
> base-commit: 80c4a0015ce249cf0917a04dbb3cc652a6811079
> --
> 2.48.1.658.g4767266eb4-goog
>
>
prev parent reply other threads:[~2025-02-28 14:26 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-27 4:12 [PATCH net-next v6 0/8] Device memory TCP TX Mina Almasry
2025-02-27 4:12 ` [PATCH net-next v6 1/8] net: add get_netmem/put_netmem support Mina Almasry
2025-03-01 0:38 ` Jakub Kicinski
2025-03-01 1:29 ` Mina Almasry
2025-03-04 0:20 ` Jakub Kicinski
2025-03-05 1:39 ` Mina Almasry
2025-03-06 21:40 ` Jakub Kicinski
2025-03-06 22:44 ` Mina Almasry
2025-03-06 23:02 ` Jakub Kicinski
2025-03-06 23:22 ` Willem de Bruijn
2025-02-27 4:12 ` [PATCH net-next v6 2/8] net: devmem: TCP tx netlink api Mina Almasry
2025-02-27 4:12 ` [PATCH net-next v6 3/8] net: devmem: Implement TX path Mina Almasry
2025-03-04 20:44 ` Pranjal Shrivastava
2025-02-27 4:12 ` [PATCH net-next v6 4/8] net: add devmem TCP TX documentation Mina Almasry
2025-02-27 7:59 ` Bagas Sanjaya
2025-02-27 4:12 ` [PATCH net-next v6 5/8] net: enable driver support for netmem TX Mina Almasry
2025-02-27 4:12 ` [PATCH net-next v6 6/8] gve: add netmem TX support to GVE DQO-RDA mode Mina Almasry
2025-02-27 4:12 ` [PATCH net-next v6 7/8] net: check for driver support in netmem TX Mina Almasry
2025-03-01 0:43 ` Jakub Kicinski
2025-03-01 1:53 ` Mina Almasry
2025-03-04 0:29 ` Jakub Kicinski
2025-03-04 3:53 ` Mina Almasry
2025-03-05 0:17 ` Jakub Kicinski
2025-02-27 4:12 ` [PATCH net-next v6 8/8] selftests: ncdevmem: Implement devmem TCP TX Mina Almasry
2025-02-28 14:25 ` Lei Yang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPpAL=wzN2L_OOLG6b_D+pVvVnTu4N9X4knfgePtrtLMX7vQww@mail.gmail.com' \
--to=leiyang@redhat.com \
--cc=almasrymina@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=asml.silence@gmail.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=dsahern@kernel.org \
--cc=dw@davidwei.uk \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=horms@kernel.org \
--cc=hramamurthy@google.com \
--cc=jasowang@redhat.com \
--cc=jeroendb@google.com \
--cc=jhs@mojatatu.com \
--cc=kuba@kernel.org \
--cc=kuniyu@amazon.com \
--cc=kvm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mst@redhat.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pctammela@mojatatu.com \
--cc=sdf@fomichev.me \
--cc=sgarzare@redhat.com \
--cc=shuah@kernel.org \
--cc=skhawaja@google.com \
--cc=stefanha@redhat.com \
--cc=victor@mojatatu.com \
--cc=virtualization@lists.linux.dev \
--cc=willemb@google.com \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).