From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F3A9C38A2D for ; Wed, 26 Oct 2022 21:34:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233506AbiJZVeE (ORCPT ); Wed, 26 Oct 2022 17:34:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233626AbiJZVdz (ORCPT ); Wed, 26 Oct 2022 17:33:55 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13DC4149DC5; Wed, 26 Oct 2022 14:33:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=8dhh8ch0xap5ZeZVggnI6sA242VonLDpQCZRZx8JO74=; b=blMt6gL2McMQLAIs6kPAN1Mc0p HVHyy6PcRc/mIH7kg9zl4UYGasekN8WMOLtQixxBoYmzGlhx6F8Vmu8daHpnvVHLLtGzuWCvqoOIh J1vOLfivTAkuvC4+7WsZ+q4MMtH2GEzDpcIw6rHk3fK237Ne1Ic8zENDVckZmbzQIgBU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1ono0M-000ekO-W2; Wed, 26 Oct 2022 23:32:06 +0200 Date: Wed, 26 Oct 2022 23:32:06 +0200 From: Andrew Lunn To: Jakub Kicinski Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com, saeedm@nvidia.com, corbet@lwn.net, michael.chan@broadcom.com, huangguangbin2@huawei.com, chenhao288@hisilicon.com, moshet@nvidia.com, linux@rempel-privat.de, linux-doc@vger.kernel.org Subject: Re: [PATCH net-next] ethtool: linkstate: add a statistic for PHY down events Message-ID: References: <20221026020948.1913777-1-kuba@kernel.org> <20221026091015.643b3e8f@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221026091015.643b3e8f@kernel.org> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Oct 26, 2022 at 09:10:15AM -0700, Jakub Kicinski wrote: > On Wed, 26 Oct 2022 14:19:08 +0200 Andrew Lunn wrote: > > You might want to consider a generic implementation in phylib. > > Would bumping a counter in phy_link_down() be suitable? Yes, that seems reasonable. > I'm slightly unsure about the cable test behavior but > I think increments during cable tests are quite fair. Me too. The interface is not usable, and the link will do an auto-neg once the cable test is finished. So it does seem reasonable to count such events. > > You should then have over 60 drivers implementing this, enough > > momentum it might actually get used. > > Depends on your definition of "get used", I can guarantee it will > get used according to my definition :) We have too many features which only one driver implements. So yes, you might use it, with one driver. But will it get used by others? If it magically starts working for more than 1/2 the kernel drivers, it seems much more likely it will find more widespread us. Andrew