]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
netkit: Document fast vs slowpath members via macros
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 31 Oct 2025 21:20:59 +0000 (22:20 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 7 Nov 2025 00:46:11 +0000 (16:46 -0800)
Instead of a comment, just use two cachline groups to document the intent
for members often accessed in fast or slow path.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Co-developed-by: David Wei <dw@davidwei.uk>
Signed-off-by: David Wei <dw@davidwei.uk>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://patch.msgid.link/20251031212103.310683-11-daniel@iogearbox.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/netkit.c

index 492be60f2e70f758b1da678f0a97817a83dd0a41..0a2fef7caccb97b4e7ab32906bf71cf5a0faff06 100644 (file)
 #define DRV_NAME "netkit"
 
 struct netkit {
-       /* Needed in fast-path */
+       __cacheline_group_begin(netkit_fastpath);
        struct net_device __rcu *peer;
        struct bpf_mprog_entry __rcu *active;
        enum netkit_action policy;
        enum netkit_scrub scrub;
        struct bpf_mprog_bundle bundle;
+       __cacheline_group_end(netkit_fastpath);
 
-       /* Needed in slow-path */
+       __cacheline_group_begin(netkit_slowpath);
        enum netkit_mode mode;
        bool primary;
        u32 headroom;
+       __cacheline_group_end(netkit_slowpath);
 };
 
 struct netkit_link {