netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netfilter: remove inaccurate code comments from struct nft_table
@ 2023-10-07 10:25 George Guo
  2023-10-07 10:53 ` Florian Westphal
  0 siblings, 1 reply; 4+ messages in thread
From: George Guo @ 2023-10-07 10:25 UTC (permalink / raw)
  To: pablo, kadlec, fw, davem, edumazet, kuba, pabeni
  Cc: netfilter-devel, coreteam, netdev, linux-kernel, George Guo

From: George Guo <guodongtai@kylinos.cn>

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

Signed-off-by: George Guo <guodongtai@kylinos.cn>
---
 include/net/netfilter/nf_tables.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index dd40c75011d2..acbb18c212e9 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -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
  */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] netfilter: remove inaccurate code comments from struct nft_table
  2023-10-07 10:25 [PATCH] netfilter: remove inaccurate code comments from struct nft_table George Guo
@ 2023-10-07 10:53 ` Florian Westphal
  2023-10-09  2:55   ` [PATCH v2] netfilter: cleanup " George Guo
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Westphal @ 2023-10-07 10:53 UTC (permalink / raw)
  To: George Guo
  Cc: pablo, kadlec, fw, davem, edumazet, kuba, pabeni, netfilter-devel,
	coreteam, netdev, linux-kernel, George Guo

George Guo <dongtai.guo@linux.dev> wrote:
> From: George Guo <guodongtai@kylinos.cn>
> 
> 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] netfilter: cleanup struct nft_table
  2023-10-07 10:53 ` Florian Westphal
@ 2023-10-09  2:55   ` George Guo
  2023-10-13  9:26     ` Simon Horman
  0 siblings, 1 reply; 4+ messages in thread
From: George Guo @ 2023-10-09  2:55 UTC (permalink / raw)
  To: fw
  Cc: coreteam, davem, dongtai.guo, edumazet, guodongtai, kadlec, kuba,
	linux-kernel, netdev, netfilter-devel, pabeni, pablo

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.

Signed-off-by: George Guo <guodongtai@kylinos.cn>
---
 include/net/netfilter/nf_tables.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index 7c816359d5a9..9fb16485d08f 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -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 {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] netfilter: cleanup struct nft_table
  2023-10-09  2:55   ` [PATCH v2] netfilter: cleanup " George Guo
@ 2023-10-13  9:26     ` Simon Horman
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2023-10-13  9:26 UTC (permalink / raw)
  To: George Guo
  Cc: fw, coreteam, davem, dongtai.guo, edumazet, kadlec, kuba,
	linux-kernel, netdev, netfilter-devel, pabeni, pablo

On Mon, Oct 09, 2023 at 10:55:48AM +0800, George Guo wrote:
> 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.
> 
> Signed-off-by: George Guo <guodongtai@kylinos.cn>

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

Reviewed-by: Simon Horman <horms@kernel.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-13  9:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-07 10:25 [PATCH] netfilter: remove inaccurate code comments from struct nft_table George Guo
2023-10-07 10:53 ` Florian Westphal
2023-10-09  2:55   ` [PATCH v2] netfilter: cleanup " George Guo
2023-10-13  9:26     ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).