🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by Nicolai Buchwitz Fri, 09 Oct 2026 08:42
Re: [PATCH net v2 1/6] net: bcmasp: fix mib counters struct alignment with ethtool stats
#1119
Author: Nicolai Buchwitz
Date: Fri, 09 Oct 2026 08:42
49 lines
7989 bytes
On 8.10.2026 23:06, Florian Fainelli wrote:
> When EDPKT stats were removed in commit e9f31435ee7d ("net: bcmasp: Add
> support for asp-v3.0"), the corresponding entries were removed from
> bcmasp_gstrings_stats in bcmasp_ethtool.c, but the edpkt_* fields were
> left at the beginning of struct bcmasp_mib_counters in bcmasp.h.
> 
> Because bcmasp_update_mib_counters() and bcmasp_get_ethtool_stats() 
> index
> into struct bcmasp_mib_counters sequentially based on the order of
> bcmasp_gstrings_stats, this 16-byte offset caused ethtool to read from
> shifted offsets: the first four software counters read unused fields 
> and
> reported 0, the next four software counters reported the values of
> alloc_rx_skb_failed, tx_dma_failed, mc_filters_full_cnt, and
> uc_filters_full_cnt, while filters_combine_cnt, promisc_filters_cnt,
> tx_realloc_offload_failed, and tx_timeout_cnt were never reported.
> 
> Remove the obsolete edpkt_* fields from struct bcmasp_mib_counters so
> that it aligns with bcmasp_gstrings_stats.
> 
> Fixes: e9f31435ee7d ("net: bcmasp: Add support for asp-v3.0")
> Assisted-by: LLM
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
> ---
>  drivers/net/ethernet/broadcom/asp2/bcmasp.h | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp.h 
> b/drivers/net/ethernet/broadcom/asp2/bcmasp.h
> index 8c8ffaeadc79..9c9721da1662 100644
> --- a/drivers/net/ethernet/broadcom/asp2/bcmasp.h
> +++ b/drivers/net/ethernet/broadcom/asp2/bcmasp.h
> @@ -250,10 +250,6 @@ struct bcmasp_intf_stats64 {
>  };
> 
>  struct bcmasp_mib_counters {
> -	u32	edpkt_ts;
> -	u32	edpkt_rx_pkt_cnt;
> -	u32	edpkt_hdr_ext_cnt;
> -	u32	edpkt_hdr_out_cnt;
>  	u32	umac_frm_cnt;
>  	u32	fb_frm_cnt;
>  	u32	fb_rx_fifo_depth;

Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>

Thanks,
Nicolai
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads