Commit 25e63e55 authored by Daniel Borkmann's avatar Daniel Borkmann Committed by Jakub Kicinski
Browse files

netkit: Document fast vs slowpath members via macros



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: default avatarDaniel Borkmann <daniel@iogearbox.net>
Co-developed-by: default avatarDavid Wei <dw@davidwei.uk>
Signed-off-by: default avatarDavid Wei <dw@davidwei.uk>
Reviewed-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
Link: https://patch.msgid.link/20251031212103.310683-11-daniel@iogearbox.net


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 24ab8efb
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -16,17 +16,19 @@
#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 {