From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Rémi Denis-Courmont" <remi.denis-courmont@nokia.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] Phonet: sockets list through proc_fs
Date: Mon, 20 Jul 2009 11:05:05 +0200 [thread overview]
Message-ID: <4A643341.9090604@gmail.com> (raw)
In-Reply-To: <1248078849-7343-1-git-send-email-remi.denis-courmont@nokia.com>
Rémi Denis-Courmont a écrit :
> From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
>
> +static int pn_sock_seq_show(struct seq_file *seq, void *v)
> +{
> + int len;
> +
> + if (v == SEQ_START_TOKEN)
> + seq_printf(seq, "%s%n", "pt loc rem rs st tx_queue rx_queue "
> + " uid inode ref pointer drops", &len);
> + else {
> + struct sock *sk = v;
> + struct pn_sock *pn = pn_sk(sk);
> +
> + seq_printf(seq, "%2d %04X:%04X:%02X %02X %08X:%08X %5d %lu "
> + "%d %p %d%n",
> + sk->sk_protocol, pn->sobject, 0, pn->resource,
> + sk->sk_state,
> + atomic_read(&sk->sk_wmem_alloc),
> + atomic_read(&sk->sk_rmem_alloc),
Please use sk_wmem_alloc_get(sk) and sk_rmem_alloc_get(sk)
> + sock_i_uid(sk), sock_i_ino(sk),
> + atomic_read(&sk->sk_refcnt), sk,
> + atomic_read(&sk->sk_drops), &len);
> + }
> + seq_printf(seq, "%*s\n", 127 - len, "");
> + return 0;
> +}
next prev parent reply other threads:[~2009-07-20 9:05 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-20 8:34 [PATCH] Phonet: sockets list through proc_fs Rémi Denis-Courmont
2009-07-20 8:36 ` Marcel Holtmann
2009-07-20 9:28 ` Rémi Denis-Courmont
2009-07-20 9:34 ` Marcel Holtmann
2009-07-20 9:47 ` Rémi Denis-Courmont
2009-07-20 10:21 ` Marcel Holtmann
2009-07-20 10:31 ` Eric Dumazet
2009-08-03 2:42 ` Arnaldo Carvalho de Melo
2009-07-20 10:32 ` Rémi Denis-Courmont
2009-07-20 10:43 ` David Miller
2009-07-20 12:07 ` Marcel Holtmann
2009-07-20 12:49 ` Rémi Denis-Courmont
2009-07-20 13:00 ` Marcel Holtmann
2009-07-20 14:09 ` David Miller
2009-07-20 14:25 ` Marcel Holtmann
2009-07-20 14:05 ` David Miller
2009-07-20 9:05 ` Eric Dumazet [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-07-21 11:57 Rémi Denis-Courmont
2009-07-21 19:34 ` David Miller
2009-08-12 11:02 ` Rémi Denis-Courmont
2009-08-12 18:06 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A643341.9090604@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=remi.denis-courmont@nokia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).