[PATCH net-next-2.6] net: ping: small changes

Subsystems: networking [general], the rest

STALE5603d

3 messages, 3 authors, 2011-05-15 · open the first message on its own page

[PATCH net-next-2.6] net: ping: small changes

From: Eric Dumazet <hidden>
Date: 2011-05-14 08:59:24

ping_table is not __read_mostly, since it contains one rwlock,
and is static to ping.c

ping_port_rover & ping_v4_lookup are static

Signed-off-by: Eric Dumazet <redacted>
Vasiliy Kulikov [off-list ref]
---
 net/ipv4/ping.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index a77e2d7..7041d09 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -49,9 +49,9 @@
 #include <net/checksum.h>
 
 
-struct ping_table ping_table __read_mostly;
+static struct ping_table ping_table;
 
-u16 ping_port_rover;
+static u16 ping_port_rover;
 
 static inline int ping_hashfn(struct net *net, unsigned num, unsigned mask)
 {
@@ -150,8 +150,8 @@ static void ping_v4_unhash(struct sock *sk)
 	}
 }
 
-struct sock *ping_v4_lookup(struct net *net, u32 saddr, u32 daddr,
-	 u16 ident, int dif)
+static struct sock *ping_v4_lookup(struct net *net, u32 saddr, u32 daddr,
+				   u16 ident, int dif)
 {
 	struct hlist_nulls_head *hslot = ping_hashslot(&ping_table, net, ident);
 	struct sock *sk = NULL;

Re: [PATCH net-next-2.6] net: ping: small changes

From: Vasiliy Kulikov <hidden>
Date: 2011-05-14 14:34:13

On Sat, May 14, 2011 at 10:59 +0200, Eric Dumazet wrote:
ping_table is not __read_mostly, since it contains one rwlock,
and is static to ping.c

ping_port_rover & ping_v4_lookup are static

Signed-off-by: Eric Dumazet <redacted>
Acked-by: Vasiliy Kulikov <redacted>

Thanks,

-- 
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments

Re: [PATCH net-next-2.6] net: ping: small changes

From: David Miller <davem@davemloft.net>
Date: 2011-05-15 05:23:02

From: Vasiliy Kulikov <redacted>
Date: Sat, 14 May 2011 18:34:05 +0400
On Sat, May 14, 2011 at 10:59 +0200, Eric Dumazet wrote:
quoted
ping_table is not __read_mostly, since it contains one rwlock,
and is static to ping.c

ping_port_rover & ping_v4_lookup are static

Signed-off-by: Eric Dumazet <redacted>
Acked-by: Vasiliy Kulikov <redacted>
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help