[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTinh0cmb0hzpVdm5XemT5NeULeAoHQ@mail.gmail.com>
Date: Thu, 14 Apr 2011 12:16:15 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: Vasiliy Kulikov <segoon@...nwall.com>
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
Pavel Kankovsky <peak@...o.troja.mff.cuni.cz>,
Solar Designer <solar@...nwall.com>,
Kees Cook <kees.cook@...onical.com>,
Dan Rosenberg <dan.j.rosenberg@...il.com>,
Eugene Teo <eugene@...hat.com>,
Nelson Elhage <nelhage@...lice.com>,
"David S. Miller" <davem@...emloft.net>,
Alexey Kuznetsov <kuznet@....inr.ac.ru>,
Pekka Savola <pekkas@...core.fi>,
James Morris <jmorris@...ei.org>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
Patrick McHardy <kaber@...sh.net>
Subject: Re: [PATCH] net: ipv4: add IPPROTO_ICMP socket kind
On Wed, Apr 13, 2011 at 2:32 PM, Vasiliy Kulikov <segoon@...nwall.com> wrote:
> On Wed, Apr 13, 2011 at 13:29 +0300, Alexey Dobriyan wrote:
>> On Sat, Apr 9, 2011 at 1:15 PM, Vasiliy Kulikov <segoon@...nwall.com> wrote:
>> > This patch adds IPPROTO_ICMP socket kind.
>>
>> > + seq_printf(f, "%5d: %08X:%04X %08X:%04X"
>> > + " %02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %d%n",
>> > + bucket, src, srcp, dest, destp, sp->sk_state,
>> > + sk_wmem_alloc_get(sp),
>> > + sk_rmem_alloc_get(sp),
>> > + 0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp),
>>
>> These zeroes can be embedded into format string for slightly faster printing.
>
> Is it really needed? I mean, it is not a fast path, so such a small
> overhead is not very bad. But embedding them into the string makes it a
> bit more difficult to read.
In fact, if field is always zero, it can be removed altogether.
Also, there was big discussion re exposing kernel socket pointers,
which this file continue to do.
> + atomic_read(&sp->sk_refcnt), sp,
> + atomic_read(&sp->sk_drops), len);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists