[PATCH] Fix integer truncation in systat -ifstat

Olivier Cochard-Labbé olivier at cochard.me
Fri Sep 12 08:10:07 UTC 2014


On Fri, Sep 12, 2014 at 8:41 AM, Bruce Evans <brde at optusnet.com.au> 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


More information about the freebsd-net mailing list