Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Feb 2021 22:25:47 +0100
From:      "Kristof Provost" <kp@FreeBSD.org>
To:        "Daniel Ponte" <dan@dynatron.me>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Interface counter inaccurate
Message-ID:  <EAC050BB-D8FC-490A-826B-39B6BBFC22F3@FreeBSD.org>
In-Reply-To: <20210215210957.vesrn63yt3ckpxll@dtvax.dynatron.me>
References:  <20210215210957.vesrn63yt3ckpxll@dtvax.dynatron.me>

next in thread | previous in thread | raw e-mail | index | archive | help
On 15 Feb 2021, at 22:09, Daniel Ponte wrote:
> I've noticed that since upgrading to stable/13-n244514-18097ee2fb7c 
> from
> 12.2-STABLE, throughput on my WAN interface (the box runs pf) is
> incorrectly showing double in systat -if, as well as in vnstat and 
> pftop
> from ports. The LAN interface does not appear to be so afflicted.
>
`systat -if` doesn’t read the pf counters, so I wouldn’t expect that 
to be related.

Those are the interface counters.
What network card and driver do you use?

Kristof
From owner-freebsd-current@freebsd.org  Mon Feb 15 22:13:58 2021
Return-Path: <owner-freebsd-current@freebsd.org>
Delivered-To: freebsd-current@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 76EC653CD19
 for <freebsd-current@mailman.nyi.freebsd.org>;
 Mon, 15 Feb 2021 22:13:58 +0000 (UTC)
 (envelope-from sgk@troutmask.apl.washington.edu)
Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu
 [128.95.76.21])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "troutmask", Issuer "troutmask" (not verified))
 by mx1.freebsd.org (Postfix) with ESMTPS id 4Dfdfs28nvz3lRy
 for <freebsd-current@freebsd.org>; Mon, 15 Feb 2021 22:13:55 +0000 (UTC)
 (envelope-from sgk@troutmask.apl.washington.edu)
Received: from troutmask.apl.washington.edu (localhost [127.0.0.1])
 by troutmask.apl.washington.edu (8.16.1/8.16.1) with ESMTPS id 11FMDlT1086914
 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO)
 for <freebsd-current@freebsd.org>; Mon, 15 Feb 2021 14:13:47 -0800 (PST)
 (envelope-from sgk@troutmask.apl.washington.edu)
Received: (from sgk@localhost)
 by troutmask.apl.washington.edu (8.16.1/8.16.1/Submit) id 11FMDlgX086913
 for freebsd-current@freebsd.org; Mon, 15 Feb 2021 14:13:47 -0800 (PST)
 (envelope-from sgk)
Date: Mon, 15 Feb 2021 14:13:47 -0800
From: Steve Kargl <sgk@troutmask.apl.washington.edu>
To: freebsd-current@freebsd.org
Subject: Re: HEADSUP: math is broken with clang and optimization
Message-ID: <20210215221347.GA86660@troutmask.apl.washington.edu>
References: <20210214215958.GA80810@troutmask.apl.washington.edu>
 <20210215204913.GA86364@troutmask.apl.washington.edu>
 <20210215210336.GA86544@troutmask.apl.washington.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20210215210336.GA86544@troutmask.apl.washington.edu>
X-Rspamd-Queue-Id: 4Dfdfs28nvz3lRy
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org; dkim=none;
 dmarc=fail reason="No valid SPF, No valid DKIM" header.from=washington.edu
 (policy=none); 
 spf=none (mx1.freebsd.org: domain of sgk@troutmask.apl.washington.edu has no
 SPF policy when checking 128.95.76.21)
 smtp.mailfrom=sgk@troutmask.apl.washington.edu
X-Spamd-Result: default: False [-2.10 / 15.00]; RCVD_TLS_ALL(0.00)[];
 ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[];
 FROM_HAS_DN(0.00)[];
 RBL_DBL_DONT_QUERY_IPS(0.00)[128.95.76.21:from];
 TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000];
 MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[];
 PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org];
 RCPT_COUNT_ONE(0.00)[1];
 SPAMHAUS_ZRD(0.00)[128.95.76.21:from:127.0.2.255];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000];
 NEURAL_HAM_SHORT(-0.10)[-0.099]; R_SPF_NA(0.00)[no SPF record];
 FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[];
 MIME_TRACE(0.00)[0:+];
 ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US];
 RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-current];
 DMARC_POLICY_SOFTFAIL(0.10)[washington.edu : No valid SPF, No valid DKIM, none]
X-BeenThere: freebsd-current@freebsd.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: Discussions about the use of FreeBSD-current
 <freebsd-current.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-current>, 
 <mailto:freebsd-current-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-current/>;
List-Post: <mailto:freebsd-current@freebsd.org>
List-Help: <mailto:freebsd-current-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-current>, 
 <mailto:freebsd-current-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 15 Feb 2021 22:13:58 -0000

On Mon, Feb 15, 2021 at 01:03:36PM -0800, Steve Kargl wrote:
> On Mon, Feb 15, 2021 at 12:49:13PM -0800, Steve Kargl wrote:
> > On Sun, Feb 14, 2021 at 01:59:58PM -0800, Steve Kargl wrote:
> > > Just a headsup for anyone doing numerical work with
> > > FreeBSD-current.  clang with optimization of -O1 or
> > > higher produces wrong results.  Testing 1 million 
> > > complex values of ccoshf and limiting |z| < 20,
> > > shows
> > > 
> > 
> > This is either an in-ling bug or discarding a cast issue.
> > With everything in the same file so clang has dp_ccosh
> > available to it when compiling main.
> > 
> 
> Code builds and works as expected with gcc 10.2and
> gcc 11.0.0.
> 

Can't find a list of options that is equivalent to -O1,
so cannot test various optimizations.

Notice that -march=i686 gives the wrong results and
-march=core2 gives the correct result.  Trying -march=i686
-msse -msse2 gives the correct result.  It seems that
clang does not understand how the x87 (on i585-freebsd).

-- 
Steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EAC050BB-D8FC-490A-826B-39B6BBFC22F3>