netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Colin Foster <colin.foster@in-advantage.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	UNGLinuxDriver@microchip.com,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Maxim Kochetkov <fido_max@inbox.ru>
Subject: Re: [PATCH net 2/8] net: mscc: ocelot: fix incorrect ndo_get_stats64 packet counters
Date: Tue, 16 Aug 2022 23:26:00 -0700	[thread overview]
Message-ID: <YvyJ+FNELJsfxCWX@euler> (raw)
In-Reply-To: <20220816135352.1431497-3-vladimir.oltean@nxp.com>

> --- 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
> 

  reply	other threads:[~2022-08-17  6:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-16 13:53 [PATCH net 0/8] Fixes for Ocelot driver statistics Vladimir Oltean
2022-08-16 13:53 ` [PATCH net 1/8] net: dsa: felix: fix ethtool 256-511 and 512-1023 TX packet counters Vladimir Oltean
2022-08-16 13:53 ` [PATCH net 2/8] net: mscc: ocelot: fix incorrect ndo_get_stats64 " Vladimir Oltean
2022-08-17  6:26   ` Colin Foster [this message]
2022-08-16 13:53 ` [PATCH net 3/8] net: mscc: ocelot: fix address of SYS_COUNT_TX_AGING counter Vladimir Oltean
2022-08-16 13:53 ` [PATCH net 4/8] net: mscc: ocelot: turn stats_lock into a spinlock Vladimir Oltean
2022-08-16 13:53 ` [PATCH net 5/8] net: mscc: ocelot: fix race between ndo_get_stats64 and ocelot_check_stats_work Vladimir Oltean
2022-08-16 13:53 ` [PATCH net 6/8] net: mscc: ocelot: make struct ocelot_stat_layout array indexable Vladimir Oltean
2022-08-17  6:46   ` Colin Foster
2022-08-17 11:06     ` Vladimir Oltean
2022-08-17 13:05       ` Vladimir Oltean
2022-08-17 15:14         ` Colin Foster
2022-08-17 17:42           ` Vladimir Oltean
2022-08-17 20:47             ` Colin Foster
2022-08-17 22:03               ` Vladimir Oltean
2022-08-17 22:07                 ` Colin Foster
2022-08-18  6:01                 ` Colin Foster
2022-08-16 13:53 ` [PATCH net 7/8] net: mscc: ocelot: keep ocelot_stat_layout by reg address, not offset Vladimir Oltean
2022-08-16 13:53 ` [PATCH net 8/8] net: mscc: ocelot: report ndo_get_stats64 from the wraparound-resistant ocelot->stats Vladimir Oltean
2022-08-18  5:20 ` [PATCH net 0/8] Fixes for Ocelot driver statistics patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YvyJ+FNELJsfxCWX@euler \
    --to=colin.foster@in-advantage.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=fido_max@inbox.ru \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vivien.didelot@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).