From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5320E2C2374 for ; Tue, 16 Jun 2026 01:27:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781573255; cv=none; b=DmPsej3FMBJe0P54CFO11/o9AS9nUQq16x/SU2vntRN22YWz+KSkuFGhPPaFPsBxwao4Km++bepBqIJqs5uO1Tnkkkz5fyHhN2RLWPm1oJJ70mGYW/EQYdnTmy7kDs/niEPImRnEf7AD/akyA4QqIyGyvRWgqKYooxPj48HoZn8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781573255; c=relaxed/simple; bh=eyMPuATrFS2OTqsiADcq/gyLKUwursPohM/0jluuQfo=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=VfXshBJFhAaC+TJHKHSXbiIe4HkepmdkhueXsEJRHnlNVuP55/wZMEUJiiSuysXKPYxdtymf1n2XP/ckvonEfSrZT6BZCOKExEXkqBZ4d6Ti+InkZNtJIDh0WNMTj0qBTe4Y4h8OFSjRPTz8lo+ku1qq/BX9LjKtWAlbcVrPjsM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VkcH0y3L; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VkcH0y3L" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 592AB1F000E9; Tue, 16 Jun 2026 01:27:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781573253; bh=6hTMkCg4OsqsqIHaeluLsOS0eLuyg7/K2ebDVUYGbUw=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=VkcH0y3L0+pN/yaPFlCtqoll7KUV3i/IanrTelTO/o5FZQ7PoiQ+4HySjMk1ogtRV P98t1p8hRyie57syi4R/pLQwqbiXy6WCH3hbN/WNzIrhDw7f5vZDVPJ/zfTEx+RZYH YDo4BKQnz4GPcZgPeW1hTnIdxQ3gQTrLnSi0Nf9g3JtC/M0Ya92BT9JW2gP7aiv41S Fc8APAVcuC0de0y401hJsAtrpw+zT/aQKmV13mlfFxgqyBcAYbswqf6ad05Dix6EM4 io8TKFCXnBuH/rzxwiIaBIO04rMMmShVu1fDKLzab48C4WqnbKt6+1/bbhF0rvSvUq DLPOCJY9onXXg== Date: Mon, 15 Jun 2026 18:27:32 -0700 From: Jakub Kicinski To: Eric Joyner Cc: , Brett Creeley , Andrew Lunn , "David S. Miller" , "Eric Dumazet" , Paolo Abeni , "Nikhil P . Rao" , Simon Horman Subject: Re: [PATCH net-next v5 5/5] ionic: Add .get_fec_stats ethtool handler Message-ID: <20260615182732.7d28e31a@kernel.org> In-Reply-To: <20260614205303.48088-6-eric.joyner@amd.com> References: <20260614205303.48088-1-eric.joyner@amd.com> <20260614205303.48088-6-eric.joyner@amd.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 14 Jun 2026 13:53:03 -0700 Eric Joyner wrote: > + if (fec_cw_err_bin != IONIC_STAT_INVALID) > + hist->values[i].sum = le64_to_cpu(fec_cw_err_bin); > + else > + hist->values[i].sum = 0; Setting the sum to zero is very much against the API contract with ethtool, no? Since we are just digging ourselves out of a whole with the link down events maybe let's be more strict going forward. :S I think mlx5 had a similar problem of not knowing bucket count. You can put the bucket table in some driver struct and populate it at runtime. Looking at this scheme, tho, I think the ethtool core is buggy for mlx5 :/ We should make a copy of the hist table, because we write the Netlink attrs after releasing the locks. Another call may start already and make the driver write its table in parallel. Please send a fix for that if you can, or LMK if not, I'll chase one of the people involved in adding the fec stats. I'll apply the first 4 patches here in the meantime.