From c29a0bc4dfc4d833eb702b1929cec96a3eeb9f7a Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Mon, 31 Mar 2008 19:41:46 -0700 Subject: [SOCK][NETNS]: Add a struct net argument to sock_prot_inuse_add and _get. This counter is about to become per-proto-and-per-net, so we'll need two arguments to determine which cell in this "table" to work with. All the places, but proc already pass proper net to it - proc will be tuned a bit later. Some indentation with spaces in proc files is done to keep the file coding style consistent. Signed-off-by: Pavel Emelyanov Signed-off-by: David S. Miller --- net/ipv4/proc.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'net/ipv4/proc.c') diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index d63474c6b400..8156c26f9337 100644 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c @@ -53,14 +53,17 @@ static int sockstat_seq_show(struct seq_file *seq, void *v) { socket_seq_show(seq); seq_printf(seq, "TCP: inuse %d orphan %d tw %d alloc %d mem %d\n", - sock_prot_inuse_get(&tcp_prot), + sock_prot_inuse_get(&init_net, &tcp_prot), atomic_read(&tcp_orphan_count), tcp_death_row.tw_count, atomic_read(&tcp_sockets_allocated), atomic_read(&tcp_memory_allocated)); - seq_printf(seq, "UDP: inuse %d mem %d\n", sock_prot_inuse_get(&udp_prot), + seq_printf(seq, "UDP: inuse %d mem %d\n", + sock_prot_inuse_get(&init_net, &udp_prot), atomic_read(&udp_memory_allocated)); - seq_printf(seq, "UDPLITE: inuse %d\n", sock_prot_inuse_get(&udplite_prot)); - seq_printf(seq, "RAW: inuse %d\n", sock_prot_inuse_get(&raw_prot)); + seq_printf(seq, "UDPLITE: inuse %d\n", + sock_prot_inuse_get(&init_net, &udplite_prot)); + seq_printf(seq, "RAW: inuse %d\n", + sock_prot_inuse_get(&init_net, &raw_prot)); seq_printf(seq, "FRAG: inuse %d memory %d\n", ip_frag_nqueues(&init_net), ip_frag_mem(&init_net)); return 0; -- cgit v1.2.3-59-g8ed1b