public inbox for linux-parisc@vger.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Mina Almasry <almasrymina@google.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-parisc@vger.kernel.org
Subject: Re: [RFC PATCH net-next v5 12/14] net: add SO_DEVMEM_DONTNEED setsockopt to release RX frags
Date: Thu, 28 Dec 2023 09:46:03 +0100	[thread overview]
Message-ID: <5585dee0-452e-48e1-8fae-bab1eccc8e97@gmx.de> (raw)
In-Reply-To: <20231218024024.3516870-13-almasrymina@google.com>

Hi Mina,

On 12/18/23 03:40, 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 re-use.
>
> Signed-off-by: Willem de Bruijn <willemb@google.com>
> Signed-off-by: Kaiyuan Zhang <kaiyuanz@google.com>
> Signed-off-by: Mina Almasry <almasrymina@google.com>
>
> ---
>
> 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  |  8 ++++-
>   arch/mips/include/uapi/asm/socket.h   |  6 ++++
>   arch/parisc/include/uapi/asm/socket.h |  6 ++++
>   arch/sparc/include/uapi/asm/socket.h  |  6 ++++
>   include/uapi/asm-generic/socket.h     |  1 +
>   include/uapi/linux/uio.h              |  4 +++
>   net/core/sock.c                       | 45 +++++++++++++++++++++++++++
>   7 files changed, 75 insertions(+), 1 deletion(-)
>
...
> diff --git a/arch/parisc/include/uapi/asm/socket.h b/arch/parisc/include/uapi/asm/socket.h
> index be264c2b1a11..6b8674399363 100644
> --- a/arch/parisc/include/uapi/asm/socket.h
> +++ b/arch/parisc/include/uapi/asm/socket.h
> @@ -132,6 +132,12 @@
>   #define SO_PASSPIDFD		0x404A
>   #define SO_PEERPIDFD		0x404B
>
> +#define SO_DEVMEM_DONTNEED	0x404C
> +#define SO_DEVMEM_LINEAR	0x404D
> +#define SCM_DEVMEM_LINEAR	SO_DEVMEM_LINEAR
> +#define SO_DEVMEM_DMABUF	0x404E
> +#define SCM_DEVMEM_DMABUF	SO_DEVMEM_DMABUF


Could you please change this ^^ for parisc to use the same constants as
the generic version below (97-99).
Although 0x404c is the logical successor, I'd prefer to be in sync
with other generic code if possible...

Thanks!
Helge

...

> diff --git a/include/uapi/asm-generic/socket.h b/include/uapi/asm-generic/socket.h
> index 25a2f5255f52..1acb77780f10 100644
> --- a/include/uapi/asm-generic/socket.h
> +++ b/include/uapi/asm-generic/socket.h
> @@ -135,6 +135,7 @@
>   #define SO_PASSPIDFD		76
>   #define SO_PEERPIDFD		77
>
> +#define SO_DEVMEM_DONTNEED	97
>   #define SO_DEVMEM_LINEAR	98
>   #define SCM_DEVMEM_LINEAR	SO_DEVMEM_LINEAR
>   #define SO_DEVMEM_DMABUF	99


  reply	other threads:[~2023-12-28  8:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-18  2:40 [RFC PATCH net-next v5 00/14] Device Memory TCP Mina Almasry
2023-12-18  2:40 ` [RFC PATCH net-next v5 01/14] net: page_pool: create hooks for custom page providers Mina Almasry
2023-12-18  2:40 ` [RFC PATCH net-next v5 02/14] net: page_pool: factor out page_pool recycle check Mina Almasry
2023-12-18  2:40 ` [RFC PATCH net-next v5 03/14] net: netdev netlink api to bind dma-buf to a net device Mina Almasry
2023-12-18  2:40 ` [RFC PATCH net-next v5 04/14] netdev: support binding dma-buf to netdevice Mina Almasry
2023-12-18  2:40 ` [RFC PATCH net-next v5 05/14] netdev: netdevice devmem allocator Mina Almasry
2024-02-13 13:15   ` Pavel Begunkov
2024-02-13 20:01     ` Mina Almasry
2023-12-18  2:40 ` [RFC PATCH net-next v5 06/14] page_pool: convert to use netmem Mina Almasry
2023-12-18  2:40 ` [RFC PATCH net-next v5 07/14] page_pool: devmem support Mina Almasry
2024-02-13 13:18   ` Pavel Begunkov
2024-02-13 21:11     ` Mina Almasry
2024-02-14 15:30       ` Pavel Begunkov
2023-12-18  2:40 ` [RFC PATCH net-next v5 08/14] memory-provider: dmabuf devmem memory provider Mina Almasry
2024-02-13 13:19   ` Pavel Begunkov
2023-12-18  2:40 ` [RFC PATCH net-next v5 09/14] net: support non paged skb frags Mina Almasry
2023-12-18  2:40 ` [RFC PATCH net-next v5 10/14] net: add support for skbs with unreadable frags Mina Almasry
2023-12-18  2:40 ` [RFC PATCH net-next v5 11/14] tcp: RX path for devmem TCP Mina Almasry
2023-12-18  2:40 ` [RFC PATCH net-next v5 12/14] net: add SO_DEVMEM_DONTNEED setsockopt to release RX frags Mina Almasry
2023-12-28  8:46   ` Helge Deller [this message]
2023-12-18  2:40 ` [RFC PATCH net-next v5 13/14] net: add devmem TCP documentation Mina Almasry
2023-12-18  2:40 ` [RFC PATCH net-next v5 14/14] selftests: add ncdevmem, netcat for devmem TCP Mina Almasry

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=5585dee0-452e-48e1-8fae-bab1eccc8e97@gmx.de \
    --to=deller@gmx.de \
    --cc=almasrymina@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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