Re: [PATCH net-next v17 1/2] hinic3: Add ethtool statistic ops part1
From: Jakub Kicinski
Date: Wed Oct 21 2026 - 19:56:00 EST
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.