net: add SO_DEVMEM_DONTNEED setsockopt to release RX frags

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 <willemb@google.com>
Signed-off-by: Kaiyuan Zhang <kaiyuanz@google.com>
Signed-off-by: Mina Almasry <almasrymina@google.com>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20240910171458.219195-11-almasrymina@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Mina Almasry
2024-09-10 17:14:54 +00:00
committed by Jakub Kicinski
parent 8f0b3cc9a4
commit 678f6e28b5
7 changed files with 78 additions and 0 deletions
+5
View File
@@ -33,6 +33,11 @@ struct dmabuf_cmsg {
*/
};
struct dmabuf_token {
__u32 token_start;
__u32 token_count;
};
/*
* UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1)
*/