[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <473A998D.8050101@cn.fujitsu.com>
Date: Wed, 14 Nov 2007 14:45:33 +0800
From: Wang Chen <wangchen@...fujitsu.com>
To: Eric Dumazet <dada1@...mosbay.com>
CC: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH 2/2] SOCK: add raw6 drops counter
Eric Dumazet said the following on 2007-11-14 13:48:
>> diff -Nurp linux-2.6.24-rc2.org/net/ipv6/raw.c
>> linux-2.6.24-rc2/net/ipv6/raw.c
>> --- linux-2.6.24-rc2.org/net/ipv6/raw.c 2007-11-09
>> 16:38:05.000000000 +0800
>> +++ linux-2.6.24-rc2/net/ipv6/raw.c 2007-11-14 09:46:54.000000000
>> +0800
>> @@ -354,14 +354,14 @@ static inline int rawv6_rcv_skb(struct s
>> {
>> if ((raw6_sk(sk)->checksum || sk->sk_filter) &&
>> skb_checksum_complete(skb)) {
>> - /* FIXME: increment a raw6 drops counter here */
>> + atomic_inc(&sk->sk_drops);
>
> I am not sure the comment was refering to a per socket counter here.
>
> If the frame checksum is bad, we can not be sure the socket is OK, since
> the garbaged bits could be in the tuple that identify the socket.
>
> Maybe here we want to increment a global raw6 drop counter (well, for
> the given ipv6 instance)
>
What the /proc/net/raw6 shows is statistical information about raw socket
in IPv6 stack. And the information is per socket per row.
So I think it's better to count it to per socket.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists