]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
sunrpc: add a generic netlink family for cache upcalls
authorJeff Layton <jlayton@kernel.org>
Wed, 25 Mar 2026 14:40:28 +0000 (10:40 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 1 Jun 2026 15:08:18 +0000 (11:08 -0400)
commitaf81cb247ca94e4bcfea31ea862cf3aaf955a503
treede9046636c5a30bea2540815de0fa2c8403ed8e8
parentc13ecd47648cc98e9f324ce4bcaa3d0654c3c91c
sunrpc: add a generic netlink family for cache upcalls

The auth.unix.ip and auth.unix.gid caches live in the sunrpc module,
so they cannot use the nfsd generic netlink family. Create a new
"sunrpc" generic netlink family with its own "exportd" multicast
group to support cache upcall notifications for sunrpc-resident
caches.

Define a YAML spec (sunrpc_cache.yaml) with a cache-type enum
(ip_map, unix_gid), a cache-notify multicast event, and the
corresponding uapi header.

Implement sunrpc_cache_notify() in cache.c, which checks for
listeners on the exportd multicast group, builds and sends a
SUNRPC_CMD_CACHE_NOTIFY message with the cache-type attribute.

Register/unregister the sunrpc_nl_family in init_sunrpc() and
cleanup_sunrpc().

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Documentation/netlink/specs/sunrpc_cache.yaml [new file with mode: 0644]
include/linux/sunrpc/cache.h
include/uapi/linux/sunrpc_netlink.h [new file with mode: 0644]
net/sunrpc/Makefile
net/sunrpc/cache.c
net/sunrpc/netlink.c [new file with mode: 0644]
net/sunrpc/netlink.h [new file with mode: 0644]
net/sunrpc/sunrpc_syms.c