🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #6235

Re: [PATCH net-next v17 1/2] hinic3: Add ethtool statistic ops part1

#6235
From: Jakub Kicinski
Date: Wed, 21 Oct 2026 23:54
40 lines
9599 bytes
On Wed, 21 Oct 2026 16:21:04 +0800 Fan Gong wrote:
> > On Thu, 15 Oct 2026 17:55:43 +0800 Fan Gong wrote:  
> > > +	HINIC3_RXQ_STAT(alloc_skb_err),
> > > +	HINIC3_RXQ_STAT(alloc_rx_buf_err),  
> >
> > Why bother separating these two? Rx packet was lost due to memory
> > pressure, doesn't matter which part failed to alloc.  
> 
> The `alloc_skb_err` counter signifies a failure in allocating a skb,
> whereas `alloc_rx_buf_err` indicates a failure in allocating the data
> buffer referenced by the skb. Given that these two resources are allocated
> and managed independently, distinct counters have been implemented for each.

Okay, so no good reason. Please use the standard alloc_fail stat
instead.

> > On Thu, 15 Oct 2026 17:55:43 +0800 Fan Gong wrote:  
> > > +	HINIC3_PORT_STAT(mac_rx_1519_max_bad_pkt_num),
> > > +	HINIC3_PORT_STAT(mac_rx_1519_max_good_pkt_num),  
> >
> > Isn't the 1519_max_good just the last RMON histogram bucket?  
> 
> The `mac_rx_1519_max_bad_pkt_num` metric functions as a specialized counter;
> strictly speaking, it is not the last RMON histogram bucket. It quantifies
> the aggregate number of packets exceeding 1,518 bytes while simultaneously
> providing granular statistics for such oversized frames. Consequently,
> this metric is classified as a private, non-standard counter within
> the `ethtool -S` output.

AFAIU user can just add up the buckets >=1519 ?

> > > +static struct hinic3_stats hinic3_tx_queue_stats[] = {
> > > +	HINIC3_TXQ_STAT(gso_packets),  
> >
> > Isn't this the standard lso/tso counter from queue stats?  
> 
> Yes, it is.

Remove it please.
Technical Details
Message-ID: <20261021165439.1a795e5d@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350309-linux-kernel-netdev=dewy.ru
References: <20261020175113.182b3b92@kernel.org> <20261021082104.14495-1-gongfan1@huawei.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350309-linux-kernel-netdev=dewy.ru
From: kuba@kernel.org (Jakub Kicinski)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v17 1/2] hinic3: Add ethtool statistic ops
 part1
Date: Wed, 21 Oct 2026 16:54:39 -0700
Organization: Usenet Network
Message-ID: <20261021165439.1a795e5d@kernel.org>
References: <20261020175113.182b3b92@kernel.org>
	<20261021082104.14495-1-gongfan1@huawei.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="89937"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Tq3fdR6nIHJCiG3EXgZLng13Wa4= sha256:EfBI06awPGl7f2WcllXzK982vEyQhSImQA5HXBJeU8Y=
	sha1:Pp0z/9aUzbQocdcWFcTNaeEwSa8= sha256:qWk2YSg68Q6qGZ2fxrEnehAP1G3cKlZH4A6MOY2k0u8=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 79951111159; Thu, 22 Oct 2026 02:56:37 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 3ixaBv6XZ0YI;
	Thu, 22 Oct 2026 02:56:30 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-350309-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 21FF011114B; Thu, 22 Oct 2026 02:56:21 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 17DD52A1FB; Wed, 21 Oct 2026 23:54:48 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792626887;
	b=t8w5cnscBwVsebfqddAA5tMhUAyiE8PJo9YfqTnwMe7OSh9y8YJYBnYWV5++FUyATbAV
	 n6xKKOCO6s3tjlf8V9WunOyeNuzzos6u0dCt04+d0vgN4DIWkIJsIopuXwl4o2EKyFKXX
	 lRA0FuKDgZbtvbthBc7AVjtG/zFHtK0eAaN+3a4Hs9RiVyWCq8gLd87jMLYuWIhRviLoD
	 hOxsNgfKi6NyF1OOukSCzcL/JVlzjabT5R3QbhB/Q6qEEGiC2fdPHhveR1FhBJQzRI05N
	 IuDnHxKHKe5E0tyYGAuCWemMo4pyRTgQStjjo8a25TR9hWBj/XGjTM1GHvZ4q4XZaNw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792626887;
	h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc:
	 Subject:Message-ID:In-Reply-To:References:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding;
	bh=q36qNveLTcF/2CVCJ9eqhSiMOybN5Gr8A5IUFmwUtAg=;
	b=gGiLMrqTihtXVtN5811oMCNuCOkXmivqUWhCMtEOXYWPfsTGKzjqAvIlmSCg14yp8dEU
	 VYhS7ssKKj+fMXVYDp+eN/zupwKcm+f0PJTQdEWZxkJkKYk7RCavWRZadtHkcmd3F4M8R
	 Eqs/mhXwtE1JFVLGXcPmUTvA0RMJgkBVOdHvy5WAjoa1XAJpc8Mv5IMc6HloBOO2jJeAo
	 rGOrjfle69nU3kQyX8x5vjsOE8njoqBwTWdAcJqqIj/lhBBJunBoy7AtENKw+T8CyVl1B
	 qtBunXQQwsxZR0yKOodFcyvr46Zz5Evm6pA0vjXPlB2seGLL42Dw/TJ67Np7Haor3eQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NBiBaBwa;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id ABEFD606A321;
	Wed, 21 Oct 2026 23:54:47 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NBiBaBwa
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792626881;
	b=m3k+khtT3OwDkhqda9rqBAywxcJZG3YytbH0CNhgEQ/8h3PWl9ehC50LAc1Hee4Lko8l
	 L03PUBm4wbH/zmkasUen8FYJKw2d3J5NXlpnmmj12JBK8EV0zzFW3dSmGgiYgmE+xsXfd
	 /AA9rjH+Gcl20U7b47/TAtG5JAScEgz6ZSYv1/6AEfdpC564TJbLpkOmHL+e5MJ1/yluD
	 qrb1771uMZlQFRF+xCMeK4L4Gl9E+YYhyBvyhQn10y38aIqn3fIfENsmP+uG5DjyrnvbX
	 L8DtmOmEFI/OJFrGzfyPqIaQ8DhtEGhiUdYtM704z6f6fBMNEXL2SvGu3S/6nyf9YGA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792626881;
	h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID:
	 In-Reply-To:References:MIME-Version:Content-Type:
	 Content-Transfer-Encoding;
	bh=q36qNveLTcF/2CVCJ9eqhSiMOybN5Gr8A5IUFmwUtAg=;
	b=MwdHOWyx0JhXHkMzbiyI3m4wRQfSRpQX0XvzqXik1hHYFOsig+iRlFPo/X4UOlrY5yWW
	 C4gIcB1clL0zDYAp9LBffxzDghd7OLW0YkycgiQN3ljIfLqOX1SkbggwZRFPlwMZ9faPC
	 iNQmycOk1AYgIsMri/aYpqLZ4wJAjij/lSRrr63AYJvglrPLg4Htgmg4y9wx8DeuxVnQc
	 jFjNCi4+dV82/VYBSnZZ0mdf4hgy9XNbc6fAc92Zuu5a+GzRGw5lPZqTa/AZyxMYJpt+R
	 iUzho+yfxQjZ+ggq8QImCeod2LTkFs8sPPlHuIqLTi4uOgggqiu1R0z2TIXQYLKqtzA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NBiBaBwa;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77C2A606A319;
	Wed, 21 Oct 2026 23:54:41 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 710611F000C1;
	Wed, 21 Oct 2026 23:54:40 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792626881;
	bh=q36qNveLTcF/2CVCJ9eqhSiMOybN5Gr8A5IUFmwUtAg=;
	h=Date:From:To:Cc:Subject:In-Reply-To:References;
	b=NBiBaBwaGElD+PIGjz8+tQPRqzf/2eOqGBTzo/tNaRSZAvl7PlXB8ofO5QxjH8FFU
	 g3SwiYwfPx6N1Bdsxj0PnBBfdQDX0Iod++RclBJTlVStwSgePVswwA3ygolca4KqWx
	 PPxcZWrd3MIkJ4SE9vNldU60+zZE48XbsjuFtalc1nhy25oxuyosdMG/M6hXzwN3Ya
	 u2uQyzbwE2iUGXqC8FocO/gMTWHwrvjCEinUggn3RS19GXO9+MzSlj2fEDqKRWiIfT
	 wvitGdjqRynIWwliIkx4kVIDFjRd+YDqv22tSZbvGgHrqO2ezngjbCUIjDEreI0nnI
	 lJWtNW3eFNc0Q==
X-Cc: <andrew+netdev@lunn.ch>, <davem@davemloft.net>,
 <dimitri.daskalakis1@gmail.com>, <edumazet@google.com>, <horms@kernel.org>,
 <hramamurthy@google.com>, <ioana.ciornei@nxp.com>,
 <larysa.zaremba@intel.com>, <linux-doc@vger.kernel.org>,
 <linux-kernel@vger.kernel.org>, <maxime.chevallier@bootlin.com>,
 <mohsin.bashr@gmail.com>, <netdev@vger.kernel.org>, <pabeni@redhat.com>,
 <tengpeisen@huawei.com>, <vadim.fedorenko@linux.dev>, <wudi234@huawei.com>,
 <wulike1@huawei.com>, <zhoushuai28@huawei.com>
X-In-Reply-To: <20261021082104.14495-1-gongfan1@huawei.com>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list