[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 <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
8efa6e93cb
commit
c29a0bc4df
@ -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;
|
||||
|
Reference in New Issue
Block a user