Re: [PATCH net 2/8] net: mscc: ocelot: fix incorrect ndo_get_stats64 packet counters

Colin Foster
2022-08-17T06:26:15Z

> --- a/drivers/net/ethernet/mscc/vsc7514_regs.c
> +++ b/drivers/net/ethernet/mscc/vsc7514_regs.c
> @@ -180,13 +180,14 @@ const u32 vsc7514_sys_regmap[] = {
> REG(SYS_COUNT_RX_64, 0x000024),
> REG(SYS_COUNT_RX_65_127, 0x000028),
> REG(SYS_COUNT_RX_128_255, 0x00002c),
> - REG(SYS_COUNT_RX_256_1023, 0x000030),
> - REG(SYS_COUNT_RX_1024_1526, 0x000034),
> - REG(SYS_COUNT_RX_1527_MAX, 0x000038),
> - REG(SYS_COUNT_RX_PAUSE, 0x00003c),
> - REG(SYS_COUNT_RX_CONTROL, 0x000040),
> - REG(SYS_COUNT_RX_LONGS, 0x000044),
> - REG(SYS_COUNT_RX_CLASSIFIED_DROPS, 0x000048),
> + REG(SYS_COUNT_RX_256_511, 0x000030),
> + REG(SYS_COUNT_RX_512_1023, 0x000034),
> + REG(SYS_COUNT_RX_1024_1526, 0x000038),
> + REG(SYS_COUNT_RX_1527_MAX, 0x00003c),
> + REG(SYS_COUNT_RX_PAUSE, 0x000040),
> + REG(SYS_COUNT_RX_CONTROL, 0x000044),
> + REG(SYS_COUNT_RX_LONGS, 0x000048),
> + REG(SYS_COUNT_RX_CLASSIFIED_DROPS, 0x00004c),

Hi Vladimir,

Good catch! From a 7512/7514 point, these all look good. There's a
couple conflicts I'll have to deal with to test the whole series.

> REG(SYS_COUNT_TX_OCTETS, 0x000100),
> REG(SYS_COUNT_TX_UNICAST, 0x000104),
> REG(SYS_COUNT_TX_MULTICAST, 0x000108),
> @@ -196,10 +197,11 @@ const u32 vsc7514_sys_regmap[] = {
> REG(SYS_COUNT_TX_PAUSE, 0x000118),
> REG(SYS_COUNT_TX_64, 0x00011c),
> REG(SYS_COUNT_TX_65_127, 0x000120),
> - REG(SYS_COUNT_TX_128_511, 0x000124),
> - REG(SYS_COUNT_TX_512_1023, 0x000128),
> - REG(SYS_COUNT_TX_1024_1526, 0x00012c),
> - REG(SYS_COUNT_TX_1527_MAX, 0x000130),
> + REG(SYS_COUNT_TX_128_255, 0x000124),
> + REG(SYS_COUNT_TX_256_511, 0x000128),
> + REG(SYS_COUNT_TX_512_1023, 0x00012c),
> + REG(SYS_COUNT_TX_1024_1526, 0x000130),
> + REG(SYS_COUNT_TX_1527_MAX, 0x000134),
> REG(SYS_COUNT_TX_AGING, 0x000170),
> REG(SYS_RESET_CFG, 0x000508),
> REG(SYS_CMID, 0x00050c),
> diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h
> index ac151ecc7f19..e7e5b06deb2d 100644
> --- a/include/soc/mscc/ocelot.h
> +++ b/include/soc/mscc/ocelot.h
> @@ -335,7 +335,8 @@ enum ocelot_reg {
> SYS_COUNT_RX_64,
> SYS_COUNT_RX_65_127,
> SYS_COUNT_RX_128_255,
> - SYS_COUNT_RX_256_1023,
> + SYS_COUNT_RX_256_511,
> + SYS_COUNT_RX_512_1023,
> SYS_COUNT_RX_1024_1526,
> SYS_COUNT_RX_1527_MAX,
> SYS_COUNT_RX_PAUSE,
> @@ -351,7 +352,8 @@ enum ocelot_reg {
> SYS_COUNT_TX_PAUSE,
> SYS_COUNT_TX_64,
> SYS_COUNT_TX_65_127,
> - SYS_COUNT_TX_128_511,
> + SYS_COUNT_TX_128_255,
> + SYS_COUNT_TX_256_511,
> SYS_COUNT_TX_512_1023,
> SYS_COUNT_TX_1024_1526,
> SYS_COUNT_TX_1527_MAX,
> --
> 2.34.1
>