From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, lorenzo.bianconi@redhat.com,
davem@davemloft.net, pabeni@redhat.com,
thomas.petazzoni@bootlin.com, ilias.apalodimas@linaro.org,
jbrouer@redhat.com, andrew@lunn.ch, jdamato@fastly.com
Subject: Re: [RFC net-next 1/2] net: page_pool: introduce ethtool stats
Date: Fri, 8 Apr 2022 10:11:09 +0200 [thread overview]
Message-ID: <Yk/uHf4/rccT4LsV@lore-desk> (raw)
In-Reply-To: <20220407203002.6d514e43@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1833 bytes --]
On Apr 07, Jakub Kicinski wrote:
> On Thu, 7 Apr 2022 18:55:04 +0200 Lorenzo Bianconi wrote:
> > +void page_pool_ethtool_stats_get_strings(u8 *data)
>
> This needs to return the pointer to after the used area, so drivers can
> append more stats. Or make data double pointer and update it before
> returning.
ack, I will fix it in v2.
>
> > +{
> > + static const struct {
> > + u8 type;
> > + char name[ETH_GSTRING_LEN];
> > + } stats[PP_ETHTOOL_STATS_MAX] = {
> > + {
> > + .type = PP_ETHTOOL_ALLOC_FAST,
>
> Why enumerate the type? It's not used.
ack, I will fix it in v2.
Regards,
Lorenzo
>
> > + .name = "rx_pp_alloc_fast"
> > + }, {
> > + .type = PP_ETHTOOL_ALLOC_SLOW,
> > + .name = "rx_pp_alloc_slow"
> > + }, {
> > + .type = PP_ETHTOOL_ALLOC_SLOW_HIGH_ORDER,
> > + .name = "rx_pp_alloc_slow_ho"
> > + }, {
> > + .type = PP_ETHTOOL_ALLOC_EMPTY,
> > + .name = "rx_pp_alloc_empty"
> > + }, {
> > + .type = PP_ETHTOOL_ALLOC_REFILL,
> > + .name = "rx_pp_alloc_refill"
> > + }, {
> > + .type = PP_ETHTOOL_ALLOC_WAIVE,
> > + .name = "rx_pp_alloc_waive"
> > + }, {
> > + .type = PP_ETHTOOL_RECYCLE_CACHED,
> > + .name = "rx_pp_recycle_cached"
> > + }, {
> > + .type = PP_ETHTOOL_RECYCLE_CACHE_FULL,
> > + .name = "rx_pp_recycle_cache_full"
> > + }, {
> > + .type = PP_ETHTOOL_RECYCLE_RING,
> > + .name = "rx_pp_recycle_ring"
> > + }, {
> > + .type = PP_ETHTOOL_RECYCLE_RING_FULL,
> > + .name = "rx_pp_recycle_ring_full"
> > + }, {
> > + .type = PP_ETHTOOL_RECYCLE_RELEASED_REF,
> > + .name = "rx_pp_recycle_released_ref"
> > + },
> > + };
> > + int i;
> > +
> > + for (i = 0; i < PP_ETHTOOL_STATS_MAX; i++) {
> > + memcpy(data, stats[i].name, ETH_GSTRING_LEN);
> > + data += ETH_GSTRING_LEN;
> > + }
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2022-04-08 8:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 16:55 [RFC net-next 0/2] Add page_pool_stats ethtool APIs Lorenzo Bianconi
2022-04-07 16:55 ` [RFC net-next 1/2] net: page_pool: introduce ethtool stats Lorenzo Bianconi
2022-04-08 3:30 ` Jakub Kicinski
2022-04-08 8:11 ` Lorenzo Bianconi [this message]
2022-04-07 16:55 ` [RFC net-next 2/2] net: mvneta: add support for page_pool_get_stats Lorenzo Bianconi
2022-04-07 18:25 ` Andrew Lunn
2022-04-07 18:35 ` Ilias Apalodimas
2022-04-07 19:25 ` Andrew Lunn
2022-04-07 20:19 ` Ilias Apalodimas
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=Yk/uHf4/rccT4LsV@lore-desk \
--to=lorenzo@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=ilias.apalodimas@linaro.org \
--cc=jbrouer@redhat.com \
--cc=jdamato@fastly.com \
--cc=kuba@kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=thomas.petazzoni@bootlin.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).