From nobody Wed May 11 15:55:54 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 032DB1AD487F for ; Wed, 11 May 2022 15:55:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kyzyy1hSrz3mXY for ; Wed, 11 May 2022 15:55:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1ADB01CB20 for ; Wed, 11 May 2022 15:55:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 24BFtsv0015734 for ; Wed, 11 May 2022 15:55:54 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 24BFts6f015733 for bugs@FreeBSD.org; Wed, 11 May 2022 15:55:54 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 237915] "netstat -i" for ixl/lagg shows idrop as 18446744073709551612 (-4) - incorrectly intialized counters? Date: Wed, 11 May 2022 15:55:54 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: brian90013@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652284554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F1NDbguP9fxdaRY9CM96WThWiUt10er0j0BsMUC8+Nc=; b=AwcqoUoYo2oPlpGFOZ27b1cjJPtPhOVNmnd4t1x+dBS7qAsbBPZKNhi5Dnajde7KRVRZMz GDvIVwNdy7raIiL5Wjt6lbetpFja9kLvr0RE2Bw35inmD5P2TlDurJp30tBVlQStnuIv4N QpEGxtJthrEW3614WwtdjyhO14TQCA1H6qEDHKN+FlniyZyELOA69jDoo5dTU/HoxIRuxd 7LOroh9B3t/BdUTJ7p5/yXhvceeEv/W8geMDRtc8EBbXJ2D43Pe9r0U12nrmV7ky8ointN kWztrdJLwbLxGNJcwWGyA+C46e/eEjmBSJW91AN8gIZX0G6cp861j6T0mywD6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652284554; a=rsa-sha256; cv=none; b=iHPjllukzhSp1GdTAilqWESjEKwo+TgEyP6NldX2DihGrzAzjJEtI+4ko44G80m5fPN65I +lHFqtE2PXwb89KDcMnePQLmjAjN9dMA/u29wI7Gmnv4TEcCuu0OyPvFC6aXXJQL9d4aHa Afa8fSiZddKxYM7usPDaW4ZlNKb5yVqvsRFiC5EHv/hq02loaljNniV3ujEnnM1XthtVJ/ Z2hV1YyirjjF9lbClKHbQxfQuDJsRQ02dz8+5aa7OrnZZMXs4p4dvOT/dCGGkXwSvJYU79 bXLUmvrUiJxIvqyxEsVFUiASiXsjpMSEtXsNyyzJTg5k+/JsdFkCYvw6gyTMEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D237915 Brian Poole changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |brian90013@gmail.com --- Comment #2 from Brian Poole --- Created attachment 233858 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D233858&action= =3Dedit Patch to call ixl_vsi_reset_stats() Hello, I am seeing the same issue with the ixl driver on FreeBSD-12.3 and believe I have a fix. The hardware counters can start with any value so the ixl_stat_update48()/ixl_stat_update32() functions check if this is the first read. If so, they save the current value as an offset which is subtracted f= rom all later reads. On two different servers (one using ixl for 10G the other for 40G) I used debugging output to determine some counters were small but non-zero at boot time. These values are saved as the offsets. Then the counters appear to be reset to 0 so on the next call newval < oldval and return_value =3D newval + (1<