summaryrefslogtreecommitdiff
path: root/net/core/devmem.h
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2025-02-04 13:56:19 -0800
committerJakub Kicinski <kuba@kernel.org>2025-02-06 16:27:31 -0800
commit69e39537b66232103633f685b208f293bf9a15b5 (patch)
treeca848f5a85135fb942d389e8b1c0610327e74a6b /net/core/devmem.h
parentf8350a4358fc9c4801f2f4229cf9b6e678055d9a (diff)
downloadlinux-69e39537b66232103633f685b208f293bf9a15b5.tar.gz
linux-69e39537b66232103633f685b208f293bf9a15b5.tar.bz2
linux-69e39537b66232103633f685b208f293bf9a15b5.zip
net: prepare for non devmem TCP memory providers
There is a good bunch of places in generic paths assuming that the only page pool memory provider is devmem TCP. As we want to reuse the net_iov and provider infrastructure, we need to patch it up and explicitly check the provider type when we branch into devmem TCP code. Reviewed-by: Mina Almasry <almasrymina@google.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: David Wei <dw@davidwei.uk> Link: https://patch.msgid.link/20250204215622.695511-9-dw@davidwei.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/devmem.h')
-rw-r--r--net/core/devmem.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/core/devmem.h b/net/core/devmem.h
index 8e999fe2ae67..7fc158d52729 100644
--- a/net/core/devmem.h
+++ b/net/core/devmem.h
@@ -115,6 +115,8 @@ struct net_iov *
net_devmem_alloc_dmabuf(struct net_devmem_dmabuf_binding *binding);
void net_devmem_free_dmabuf(struct net_iov *ppiov);
+bool net_is_devmem_iov(struct net_iov *niov);
+
#else
struct net_devmem_dmabuf_binding;
@@ -163,6 +165,11 @@ static inline u32 net_devmem_iov_binding_id(const struct net_iov *niov)
{
return 0;
}
+
+static inline bool net_is_devmem_iov(struct net_iov *niov)
+{
+ return false;
+}
#endif
#endif /* _NET_DEVMEM_H */