From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH 3/3] net: core: add IFLA_STATS64 support Date: Thu, 11 Mar 2010 14:04:06 -0800 Message-ID: <20100311140406.37ee0b83@nehalam> References: <1268337450-6749-1-git-send-email-jengelh@medozas.de> <1268337450-6749-4-git-send-email-jengelh@medozas.de> <20100311121239.14944fd5@nehalam> <20100311.122639.258785986.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: jengelh@medozas.de, netdev@vger.kernel.org To: David Miller Return-path: Received: from mail.vyatta.com ([76.74.103.46]:55695 "EHLO mail.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758243Ab0CKWEe (ORCPT ); Thu, 11 Mar 2010 17:04:34 -0500 In-Reply-To: <20100311.122639.258785986.davem@davemloft.net> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, 11 Mar 2010 12:26:39 -0800 (PST) David Miller wrote: > From: Stephen Hemminger > Date: Thu, 11 Mar 2010 12:12:39 -0800 > > > On Thu, 11 Mar 2010 20:57:29 +0100 > > Jan Engelhardt wrote: > > > >> `ip -s link` shows interface counters truncated to 32 bit. This is > >> because interface statistics are transported only in 32-bit quantity > >> to userspace. This commit adds a new IFLA_STATS64 attribute that > >> exports them in full 64 bit. > >> > >> References: http://lkml.indiana.edu/hypermail/linux/kernel/0307.3/0215.html > >> Signed-off-by: Jan Engelhardt > >> > > > > What is the point since net_device_stats has only 32 bit counters. > > The last time this came up the issue was is that is not possible > > to atomically increment a 64 bit counter on most 32 bit platforms. > > On 64-bit it has 64-bit counters, yet we only report 32-bit > counters to userspace via netlink even in that case. That make sense, but maybe we shouldn't send IFLA_STATS64 on 32bit platforms.