Skip to contentSkip to conversation

netfilter: remove inaccurate code comments from struct nft_table

PATCH In review George Guo 4 participants 4 messages Oct 7, 2023 – Oct 13, 2023

Subsystems (3)
lore
Share & tools
lore

George Guo

author
#0 lore raw

PATCH 1/1 netfilter: remove inaccurate code comments from struct nft_table

From: George Guo <[email protected]>

afinfo is no longer a member of struct nft_table, so remove the comment for it.

---
 include/net/netfilter/nf_tables.h | 1 -
 1 file changed, 1 deletion(-)
include/net/netfilter/nf_tables.h +0 -1
index dd40c75011d2..acbb18c212e9 100644
@@ -1200,7 +1200,6 @@ static inline void nft_use_inc_restore(u32 *use)
  *	@use: number of chain references to this table
  *	@flags: table flag (see enum nft_table_flags)
  *	@genmask: generation mask
- *	@afinfo: address family info
  *	@name: name of the table
  *	@validate_state: internal, set when transaction adds jumps
  */
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 4 lines · George Guo

From: George Guo <[email protected]>

afinfo is no longer a member of struct nft_table, so remove the comment for it.

Correct, but could you please send a v2 that fixes up all the comments and gets them back in sync with the structure?

Eg. nlpid, family, udlen and udata exist in struct but are not mentioned in the comments.

#2 lore raw

PATCH v2 1/1 netfilter: cleanup struct nft_table

Add comments for nlpid, family, udlen and udata in struct nft_table, and afinfo is no longer a member of struct nft_table, so remove the comment for it.

---
 include/net/netfilter/nf_tables.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
include/net/netfilter/nf_tables.h +4 -1
index 7c816359d5a9..9fb16485d08f 100644
@@ -1198,10 +1198,13 @@ static inline void nft_use_inc_restore(u32 *use)
  *	@hgenerator: handle generator state
  *	@handle: table handle
  *	@use: number of chain references to this table
+ *	@family:address family
  *	@flags: table flag (see enum nft_table_flags)
  *	@genmask: generation mask
- *	@afinfo: address family info
+ *	@nlpid: netlink port ID
  *	@name: name of the table
+ *	@udlen: length of the user data
+ *	@udata: user data
  *	@validate_state: internal, set when transaction adds jumps
  */
 struct nft_table {
Signature · 1 line
2.34.1
reviewer Reviewed-by on v2 1/1
#3 lore raw

Re: [PATCH v2] netfilter: cleanup struct nft_table

Quoted 5 lines · George Guo

Add comments for nlpid, family, udlen and udata in struct nft_table, and afinfo is no longer a member of struct nft_table, so remove the comment for it.

Thanks,

I checked that the fields of the structure now match the kernel doc for struct nft_table.

I might have mentioned kernel doc, or similar in the subject, but I don't think there is a need to respin because of that.

As a follow-up, you may want to consider addressing other kernel doc problems in the same file. The following command may be helpful there.

./scripts/kernel-doc -none include/net/netfilter/nf_tables.h