From owner-freebsd-net@FreeBSD.ORG Fri Sep 12 08:10:07 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26E8B8AB for ; Fri, 12 Sep 2014 08:10:07 +0000 (UTC) Received: from mail-wg0-x232.google.com (mail-wg0-x232.google.com [IPv6:2a00:1450:400c:c00::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B37AAA80 for ; Fri, 12 Sep 2014 08:10:06 +0000 (UTC) Received: by mail-wg0-f50.google.com with SMTP id x13so326240wgg.21 for ; Fri, 12 Sep 2014 01:10:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=iON2UB0DkibZCrzzT/Sd5K8NcItv/gGbntT9quM6xL8=; b=x7xW3oYguPCaaKwNfrQyTW894J2A8DRkOqUQh+MvrINNkes9/bfC0Ufcl/4yR4JFa9 rF2NlxY32o9i7tIioMmNlaKgLLSNLotjX0rGvmNG2Yba2Q1eBEa8tJzRHklLOLfVGzeO EFinqlhaJAR1E6jJqf8MwHLclAP9j9rbmQaAiqfxlxVYFxDpCYru5PYFCZJ50D2/aEIl j4C8kjHQ06JEQS4vBsV7Pn//+ak3opZkkl8YiNI4NvWD43+0GNuAssw3Psi0kcaR+iNv fhgbTUySSUCIX63Z5DkwHNJ60NRXi1SbK7a5Vw/6mf+Hc5UXhVcWER+xOn0ny8mgd0sn dJXg== X-Received: by 10.194.59.18 with SMTP id v18mr9101581wjq.64.1410509404837; Fri, 12 Sep 2014 01:10:04 -0700 (PDT) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.194.90.2 with HTTP; Fri, 12 Sep 2014 01:09:44 -0700 (PDT) In-Reply-To: <20140912154903.L923@besplex.bde.org> References: <20140912154903.L923@besplex.bde.org> From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Fri, 12 Sep 2014 10:09:44 +0200 X-Google-Sender-Auth: nEzRZC6f6vpOrx2cFDZIJKCKiyc Message-ID: Subject: Re: [PATCH] Fix integer truncation in systat -ifstat To: Bruce Evans Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-net , Ryan Stone X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 08:10:07 -0000 On Fri, Sep 12, 2014 at 8:41 AM, Bruce Evans wrote: > Only differences in the counters are used except in 1 place that is > broken in other ways, so overflow is only a large problem starting at > about 40 Gbps. At only 10 Gbps, 32-bit counters are enough with a > refresh interval of 1 second but not quite enough with the default > interval of 5 seconds (this default is not documented in the man > page. It seems to only be documented (with a grammar error -- comma > splice) in the status message for mode switches). 5 seconds at > nearly 1.125 GBps exceeds UINT32_MAX. Packet counter overflow isn't > a problem until about 600 Gbps with the default interval. 32-bit > systems would have other problems supporting 600 GBps interfaces. > I confirm this behavior reported in this PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=182448