Skip to contentSkip to conversation

net: ipv6: netfilter: Format block comments.

PATCH In review Arushi Singhal 2 participants 3 messages Mar 29, 2017 – Apr 8, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: ipv6: netfilter: Format block comments.

Fix checkpatch warnings:
WARNING: Block comments use a trailing */ on a separate line
WARNING: Block comments use * on subsequent lines

---
 net/ipv6/netfilter/ip6_tables.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
net/ipv6/netfilter/ip6_tables.c +8 -8
index b8cb61c27aa1..ac69ce3bfa1e 100644
@@ -51,14 +51,14 @@ void *ip6t_alloc_initial_table(const struct xt_table *info)
 }
 EXPORT_SYMBOL_GPL(ip6t_alloc_initial_table);
 
-/*
-   We keep a set of rules for each CPU, so we can avoid write-locking
-   them in the softirq when updating the counters and therefore
-   only need to read-lock in the softirq; doing a write_lock_bh() in user
-   context stops packets coming through and allows user context to read
-   the counters or update the rules.
-
-   Hence the start of any table is given by get_table() below.  */
+/* We keep a set of rules for each CPU, so we can avoid write-locking
+ * them in the softirq when updating the counters and therefore
+ * only need to read-lock in the softirq; doing a write_lock_bh() in user
+ * context stops packets coming through and allows user context to read
+ * the counters or update the rules.
+ *
+ * Hence the start of any table is given by get_table() below.
+ */
 
 /* Returns whether matches rule or not. */
 /* Performance critical - called for every packet */
Signature · 1 line
2.11.0
#1 lore raw
Quoted 23 lines · Arushi Singhal

Fix checkpatch warnings:
WARNING: Block comments use a trailing */ on a separate line
WARNING: Block comments use * on subsequent lines

---
 net/ipv6/netfilter/ip6_tables.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
net/ipv6/netfilter/ip6_tables.c +0 -6
index b8cb61c27aa1..ac69ce3bfa1e 100644
@@ -51,14 +51,14 @@ void *ip6t_alloc_initial_table(const struct xt_table *info)
 }
 EXPORT_SYMBOL_GPL(ip6t_alloc_initial_table);
 
-/*
-   We keep a set of rules for each CPU, so we can avoid write-locking
-   them in the softirq when updating the counters and therefore
-   only need to read-lock in the softirq; doing a write_lock_bh() in user
-   context stops packets coming through and allows user context to read
-   the counters or update the rules.

net/ipv6/netfilter/ip6_tables.c void *ip6t_alloc_initial_table(const struct xt_table *info) · line 61

Quoted 10 lines
net/ipv6/netfilter/ip6_tables.c +8 -2
-
-   Hence the start of any table is given by get_table() below.  */
+/* We keep a set of rules for each CPU, so we can avoid write-locking
+ * them in the softirq when updating the counters and therefore
+ * only need to read-lock in the softirq; doing a write_lock_bh() in user
+ * context stops packets coming through and allows user context to read
+ * the counters or update the rules.
+ *
+ * Hence the start of any table is given by get_table() below.
+ */

This comment is obsolete and should go.

We have no set of rules per CPU anymore.

#2 lore raw
Quoted 39 lines · Pablo Neira Ayuso

net/ipv6/netfilter/ip6_

Quoted 10 lines · Arushi Singhal

Fix checkpatch warnings:
WARNING: Block comments use a trailing */ on a separate line
WARNING: Block comments use * on subsequent lines

---
 net/ipv6/netfilter/ip6_tables.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
net/ipv6/netfilter/ip6_ renamed from net/ipv6/netfilter/ip6_tables.c +0 -0

tables.c

net/ipv6/netfilter/ip6_tables.c void *ip6t_alloc_initial_table(const struct

Quoted 4 lines

index b8cb61c27aa1..ac69ce3bfa1e 100644

net/ipv6/netfilter/ip6_tables.c +0 -0
@@ -51,14 +51,14 @@ void *ip6t_alloc_initial_table(const struct

xt_table *info)

net/ipv6/netfilter/ip6_tables.c void *ip6t_alloc_initial_table(const struct xt_table *info)

Quoted 7 lines
net/ipv6/netfilter/ip6_tables.c +0 -4
 }
 EXPORT_SYMBOL_GPL(ip6t_alloc_initial_table);
 
-/*
-   We keep a set of rules for each CPU, so we can avoid write-locking
-   them in the softirq when updating the counters and therefore
-   only need to read-lock in the softirq; doing a write_lock_bh() in

user

net/ipv6/netfilter/ip6_tables.c void *ip6t_alloc_initial_table(const struct xt_table *info)

Quoted 7 lines
net/ipv6/netfilter/ip6_tables.c +3 -4
-   context stops packets coming through and allows user context to read
-   the counters or update the rules.
-
-   Hence the start of any table is given by get_table() below.  */
+/* We keep a set of rules for each CPU, so we can avoid write-locking
+ * them in the softirq when updating the counters and therefore
+ * only need to read-lock in the softirq; doing a write_lock_bh() in

user

net/ipv6/netfilter/ip6_tables.c void *ip6t_alloc_initial_table(const struct xt_table *info) · line 61

Quoted 5 lines
net/ipv6/netfilter/ip6_tables.c +5 -0
+ * context stops packets coming through and allows user context to read
+ * the counters or update the rules.
+ *
+ * Hence the start of any table is given by get_table() below.
+ */
Quoted 4 lines

This comment is obsolete and should go.

We have no set of rules per CPU anymore.

Hi Pablo
So should I fix this by removing these comments.

Thanks
Arushi