On 25/06/2024 22:53, Mina Almasry wrote:
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 <will...@google.com>
Signed-off-by: Kaiyuan Zhang <kaiyu...@google.com>
Signed-off-by: Mina Almasry <almasrym...@google.com>

---

v10:
- Fix leak of tokens (Nikolay).

v7:
- Updated SO_DEVMEM_* uapi to use the next available entry (Arnd).

v6:
- Squash in locking optimizations from eduma...@google.com. With his
   changes we lock the xarray once per sock_devmem_dontneed operation
   rather than once per frag.

Changes in v1:
- devmemtoken -> dmabuf_token (David).
- Use napi_pp_put_page() for refcounting (Yunsheng).
- Fix build error with missing socket options on other asms.

---
  arch/alpha/include/uapi/asm/socket.h  |  1 +
  arch/mips/include/uapi/asm/socket.h   |  1 +
  arch/parisc/include/uapi/asm/socket.h |  1 +
  arch/sparc/include/uapi/asm/socket.h  |  1 +
  include/uapi/asm-generic/socket.h     |  1 +
  include/uapi/linux/uio.h              |  4 ++
  net/core/sock.c                       | 61 +++++++++++++++++++++++++++
  7 files changed, 70 insertions(+)


FWIW,
Reviewed-by: Nikolay Aleksandrov <ra...@blackwall.org>


Reply via email to