Skip to content

Commit

Permalink
net: ping: small changes
Browse files Browse the repository at this point in the history
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 <eric.dumazet@gmail.com>
Acked-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed May 15, 2011
1 parent 89c64d7 commit 1b1cb1f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/ipv4/ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1b1cb1f

Please sign in to comment.