From: "Anwar, Md Danish" <a0501179@ti.com>
To: Roger Quadros <rogerq@kernel.org>,
MD Danish Anwar <danishanwar@ti.com>, Suman Anna <s-anna@ti.com>,
Sai Krishna <saikrishnag@marvell.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
Dan Carpenter <dan.carpenter@linaro.org>,
Diogo Ivo <diogo.ivo@siemens.com>,
Kory Maincent <kory.maincent@bootlin.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Andrew Lunn <andrew@lunn.ch>, Simon Horman <horms@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Rob Herring <robh@kernel.org>,
Santosh Shilimkar <ssantosh@kernel.org>,
Nishanth Menon <nm@ti.com>
Cc: <netdev@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <srk@ti.com>,
Vignesh Raghavendra <vigneshr@ti.com>
Subject: Re: [PATCH net-next v6 2/2] net: ti: icssg-prueth: Add support for PA Stats
Date: Thu, 22 Aug 2024 17:44:46 +0530 [thread overview]
Message-ID: <59756906-bfbb-4e83-88fc-bc1363515711@ti.com> (raw)
In-Reply-To: <42f29ba8-e341-474e-9e2a-59f55850803a@kernel.org>
On 8/22/2024 4:59 PM, Roger Quadros wrote:
>
>
> On 22/08/2024 08:28, MD Danish Anwar wrote:
>>
>>
>> On 21/08/24 6:05 pm, Roger Quadros wrote:
>>>
>>>
>>> On 20/08/2024 12:16, MD Danish Anwar wrote:
>>>> Add support for dumping PA stats registers via ethtool.
>>>> Firmware maintained stats are stored at PA Stats registers.
>>>> Also modify emac_get_strings() API to use ethtool_puts().
>>>>
>>>> This commit also renames the array icssg_all_stats to icssg_mii_g_rt_stats
>>>> and creates a new array named icssg_all_pa_stats for PA Stats.
>>>>
>>>> Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
>>>> ---
>>
>> [ ... ]
>>
>>>> +
>>>> #define ICSSG_STATS(field, stats_type) \
>>>> { \
>>>> #field, \
>>>> @@ -84,13 +98,24 @@ struct miig_stats_regs {
>>>> stats_type \
>>>> }
>>>>
>>>> +#define ICSSG_PA_STATS(field) \
>>>> +{ \
>>>> + #field, \
>>>> + offsetof(struct pa_stats_regs, field), \
>>>> +}
>>>> +
>>>> struct icssg_stats {
>>>
>>> icssg_mii_stats?
>>>
>>
>> Sure Roger. I will name it icssg_miig_stats to be consistent with
>> 'struct miig_stats_regs'
>>
>>>> char name[ETH_GSTRING_LEN];
>>>> u32 offset;
>>>> bool standard_stats;
>>>> };
>>>>
>>>> -static const struct icssg_stats icssg_all_stats[] = {
>>>> +struct icssg_pa_stats {
>>>> + char name[ETH_GSTRING_LEN];
>>>> + u32 offset;
>>>> +};
>>>> +
>>>> +static const struct icssg_stats icssg_mii_g_rt_stats[] = {
>>>
>>> icssg_all_mii_stats? to be consistend with the newly added
>>> icssg_pa_stats and icssg_all_pa_stats.
>>>
>>> Could you please group all mii_stats data strucutres and arrays together
>>> followed by pa_stats data structures and arrays?
>>>
>>
>> Sure Roger, I will group all mii stats related data structures and
>> pa_stats related data structures together.
>>
>> The sequence and naming will be something like this,
>>
>> struct miig_stats_regs
>> #define ICSSG_MIIG_STATS(field, stats_type)
>> struct icssg_miig_stats
>> static const struct icssg_miig_stats icssg_all_miig_stats[]
>>
>> struct pa_stats_regs
>> #define ICSSG_PA_STATS(field)
>> struct icssg_pa_stats
>> static const struct icssg_pa_stats icssg_all_pa_stats[]
>>
>> Let me know if this looks ok to you.
>
> This is good. Thanks!
>
Sure I will post next version soon.
>>
>>>> /* Rx */
>>>> ICSSG_STATS(rx_packets, true),
>>>> ICSSG_STATS(rx_broadcast_frames, false),
>>>> @@ -155,4 +180,11 @@ static const struct icssg_stats icssg_all_stats[] = {
>>>> ICSSG_STATS(tx_bytes, true),t
>>>> };
>>>>
>>>> +static const struct icssg_pa_stats icssg_all_pa_stats[] = > + ICSSG_PA_STATS(fw_rx_cnt),
>>>> + ICSSG_PA_STATS(fw_tx_cnt),
>>>> + ICSSG_PA_STATS(fw_tx_pre_overflow),
>>>> + ICSSG_PA_STATS(fw_tx_exp_overflow),
>>>> +};
>>>> +
>>>> #endif /* __NET_TI_ICSSG_STATS_H */
>>>
>>
>
--
Thanks and Regards,
Md Danish Anwar
prev parent reply other threads:[~2024-08-22 12:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 9:16 [PATCH net-next v6 0/2] Add support for ICSSG PA_STATS MD Danish Anwar
2024-08-20 9:16 ` [PATCH net-next v6 1/2] dt-bindings: soc: ti: pruss: Add documentation for PA_STATS support MD Danish Anwar
2024-08-20 9:16 ` [PATCH net-next v6 2/2] net: ti: icssg-prueth: Add support for PA Stats MD Danish Anwar
2024-08-20 21:50 ` Jacob Keller
2024-08-21 12:35 ` Roger Quadros
2024-08-22 5:28 ` MD Danish Anwar
2024-08-22 11:29 ` Roger Quadros
2024-08-22 12:14 ` Anwar, Md Danish [this message]
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=59756906-bfbb-4e83-88fc-bc1363515711@ti.com \
--to=a0501179@ti.com \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=diogo.ivo@siemens.com \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=jan.kiszka@siemens.com \
--cc=kory.maincent@bootlin.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nm@ti.com \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=rogerq@kernel.org \
--cc=s-anna@ti.com \
--cc=saikrishnag@marvell.com \
--cc=srk@ti.com \
--cc=ssantosh@kernel.org \
--cc=vigneshr@ti.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