Skip to contentSkip to conversation

netfilter: add missing kernel-doc parameters for nf_hook()

PATCH Superseded Kit Dallege 2 participants 2 messages Mar 15 – Mar 16 netfilter

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 netfilter: add missing kernel-doc parameters for nf_hook()

Document all 8 parameters of nf_hook() that were missing from the kernel-doc comment.

Assisted-by Claude <[email protected]>
---
 include/linux/netfilter.h | 8 ++++++++
 1 file changed, 8 insertions(+)
include/linux/netfilter.h +8 -0
index efbbfa770d66..a67fa43955bd 100644
@@ -219,6 +219,14 @@ void nf_hook_slow_list(struct list_head *head, struct nf_hook_state *state,
 		       const struct nf_hook_entries *e);
 /**
  *	nf_hook - call a netfilter hook
+ *	@pf:	protocol family (e.g. NFPROTO_IPV4)
+ *	@hook:	hook number (e.g. NF_INET_PRE_ROUTING)
+ *	@net:	network namespace
+ *	@sk:	socket associated with the packet, or NULL
+ *	@skb:	socket buffer holding the packet
+ *	@indev:	input network device, or NULL
+ *	@outdev: output network device, or NULL
+ *	@okfn:	function to call if the hook allows the packet to pass
  *
  *	Returns 1 if the hook has allowed the packet to pass.  The function
  *	okfn must be invoked by the caller in this case.  Any other return
Signature · 1 line
2.53.0
maintainer
#1 lore raw
Quoted 11 lines · Kit Dallege

/**
* nf_hook - call a netfilter hook
+ * @pf: protocol family (e.g. NFPROTO_IPV4)
+ * @hook: hook number (e.g. NF_INET_PRE_ROUTING)
+ * @net: network namespace
+ * @sk: socket associated with the packet, or NULL
+ * @skb: socket buffer holding the packet
+ * @indev: input network device, or NULL
+ * @outdev: output network device, or NULL
+ * @okfn: function to call if the hook allows the packet to pass
*

I tend towards not applying this, I don't think this adds any value, the arguments are rather obvious for anyone doing kernel networking and its not a utility/library function either.