Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 12 Jul 2002 18:14:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 12 Jul 2002 18:14:04 -0400 Received: from pizda.ninka.net ([216.101.162.242]:36524 "EHLO pizda.ninka.net") by vger.kernel.org with ESMTP id ; Fri, 12 Jul 2002 18:12:25 -0400 Date: Fri, 12 Jul 2002 15:06:07 -0700 (PDT) Message-Id: <20020712.150607.35506145.davem@redhat.com> To: alan@lxorguk.ukuu.org.uk Cc: matts@ksu.edu, shemminger@osdl.org, linux-kernel@vger.kernel.org Subject: Re: 64 bit netdev stats counter From: "David S. Miller" In-Reply-To: <1026516053.9958.33.camel@irongate.swansea.linux.org.uk> References: <20020712.145835.91443486.davem@redhat.com> <1026516053.9958.33.camel@irongate.swansea.linux.org.uk> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 622 Lines: 20 From: Alan Cox Date: 13 Jul 2002 00:20:53 +0100 gcc will output increment low 32bit if zero increment high Which means we can rapidly get 2^32 out of sync True and this equals the "fix" suggested C code involving two 32-bit counters that the original author posted :-) So this makes both cases equally wrong. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/