From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 33B90154C15; Tue, 20 Aug 2024 20:23:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724185400; cv=none; b=UdsBjsvWXpPc1w23nP/0+njvpbkPpTYI9Fbidw+4ylo56HL6LEIm6vbRHC9MK6CbStYMUhlqcKUCLW6NVAgQu1IPPxgdIAr6ZxQlI9Rp6GzppJmMmEdecwU1eX4AtuBDKJAFZNn+jYx/ssDgv/R6HJLPzYy75UCdGWtoEtGWZyQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724185400; c=relaxed/simple; bh=N0kVamxQdbaq3r2k8x+FouJskbpisdpD1nQK/n9DuAw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YV4ZF0hjqzpQArGtekDHhfYx1qd/Qw3s1d53lYKxhdJquiiyRoKlvpdbQBfaSh4jN+KYh2Os8BjlGZI6SQpCFEQNgq3Oo4MpBJLWJjebI3zhgd/8NN+Cmd5EKc5+07wFlRqL0vfodylUUUba/9MD+SEQiLTm7wEqTVSJqjxrBGk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=gBjE2KGj; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="gBjE2KGj" 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=ALmsTdvvNrRc81t5o913qxK+GrVh4ybAsT1NnrRbgNc=; b=gBjE2KGjUbnVfn7FlCW3130nbN JeEloYKiTn8iicp6goLGNEWSwKSZRRc+NGIUYTlxlRTTZ2v1tAItcKujWf9ktvatuQyaj3t11qn72 UB+s0EiVr3MdjwdQnTdzqBCdiQv3hllAq4X1iK9xlMjADDProveHYXzhAA3Qb3cvWEf0=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1sgVNo-005G29-Uj; Tue, 20 Aug 2024 22:23:12 +0200 Date: Tue, 20 Aug 2024 22:23:12 +0200 From: Andrew Lunn To: Sean Anderson Cc: "Pandey, Radhey Shyam" , "netdev@vger.kernel.org" , "Simek, Michal" , "linux-kernel@vger.kernel.org" , Russell King , "David S . Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet , Simon Horman , "linux-arm-kernel@lists.infradead.org" , "Katakam, Harini" Subject: Re: [PATCH net-next v4 2/2] net: xilinx: axienet: Add statistics support Message-ID: <98441cee-193d-404c-8dc5-9cf2061ce2e4@lunn.ch> References: <20240820175343.760389-1-sean.anderson@linux.dev> <20240820175343.760389-3-sean.anderson@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: > > Is that a standard convention to retain/persist counter values across > > link up/down? > > IEEE 802.3 section 30.2.1 says > > | All counters defined in this specification are assumed to be > | wrap-around counters. Wrap-around counters are those that > | automatically go from their maximum value (or final value) to zero and > | continue to operate. These unsigned counters do not provide for any > | explicit means to return them to their minimum (zero), i.e., reset. > > And get_eth_mac_stats implements these counters for Linux. So I would > say that resetting the counters on link up/down would be non-conformant. > > Other drivers also preserve stats across link up/down. For example, > MACB/GEM doesn't reset it stats either. And keeping the stats is also > more friendly for users and monitoring tools. Agreed. Some driver get this wrong, and clear them. But as a reviewer, it try to spot this. Andrew