netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Jakub Kicinski <kuba@kernel.org>,
	Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: <davem@davemloft.net>, <pabeni@redhat.com>, <edumazet@google.com>,
	<netdev@vger.kernel.org>, Alan Brady <alan.brady@intel.com>,
	<pavan.kumar.linga@intel.com>, <emil.s.tantilov@intel.com>,
	<jesse.brandeburg@intel.com>, <sridhar.samudrala@intel.com>,
	<shiraz.saleem@intel.com>, <sindhu.devale@intel.com>,
	<willemb@google.com>, <decot@google.com>, <andrew@lunn.ch>,
	<leon@kernel.org>, <mst@redhat.com>, <simon.horman@corigine.com>,
	<shannon.nelson@amd.com>, <stephen@networkplumber.org>,
	Alice Michael <alice.michael@intel.com>,
	"Joshua Hay" <joshua.a.hay@intel.com>,
	Phani Burra <phani.r.burra@intel.com>
Subject: Re: [PATCH net-next v5 14/15] idpf: add ethtool callbacks
Date: Sat, 19 Aug 2023 00:42:56 +0200	[thread overview]
Message-ID: <53a996f1-402e-dea8-9c08-51b84d02d0ac@intel.com> (raw)
In-Reply-To: <20230818115824.446d1ea7@kernel.org>

On 8/18/23 20:58, Jakub Kicinski wrote:
> On Tue, 15 Aug 2023 17:43:04 -0700 Tony Nguyen wrote:

[...]

> 
>> +static const struct idpf_stats idpf_gstrings_port_stats[] = {
>> +	IDPF_PORT_STAT("rx-csum_errors", port_stats.rx_hw_csum_err),
>> +	IDPF_PORT_STAT("rx-hsplit", port_stats.rx_hsplit),
>> +	IDPF_PORT_STAT("rx-hsplit_hbo", port_stats.rx_hsplit_hbo),
>> +	IDPF_PORT_STAT("rx-bad_descs", port_stats.rx_bad_descs),
>> +	IDPF_PORT_STAT("rx-length_errors", port_stats.vport_stats.rx_invalid_frame_length),
>> +	IDPF_PORT_STAT("tx-skb_drops", port_stats.tx_drops),
>> +	IDPF_PORT_STAT("tx-dma_map_errs", port_stats.tx_dma_map_errs),
>> +	IDPF_PORT_STAT("tx-linearized_pkts", port_stats.tx_linearize),
>> +	IDPF_PORT_STAT("tx-busy_events", port_stats.tx_busy),
>> +	IDPF_PORT_STAT("rx_bytes", port_stats.vport_stats.rx_bytes),
>> +	IDPF_PORT_STAT("rx-unicast_pkts", port_stats.vport_stats.rx_unicast),
>> +	IDPF_PORT_STAT("rx-multicast_pkts", port_stats.vport_stats.rx_multicast),
>> +	IDPF_PORT_STAT("rx-broadcast_pkts", port_stats.vport_stats.rx_broadcast),
> 
> how are the basic stats different form the base stats reported via
> if_link?
> 
> Also what's up with the mix of - and _ in the names?

I see that here we (Intel) attempt for the first time to propose our 
"Unified stats" naming scheme [1].

Purpose is to have:
- common naming scheme (at least for the ice we have patch ~ready);
- less "customer frustration";
- easier job for analytical scripts, copying from wiki:
| The naming schema was created to be human readable and easily parsed
| by an analytic engine (such as a script or other entity).
| All statistic strings will be comprised of three components:
| @Where, @Instance and @Units.  Each of these components is separated
| by an underscore "_"; if a component is comprised of more than one
| word, then those words are separated by a dash "-".
|
| An example statistic that shows this is xdp-rx-dropped_q-23_packets.
| In this case the @where is xdp-rx-dropped, the @instance is q-32 and
| the @unit is packets.

Public wiki is unfortunately present only for our OOT driver:
[1] https://sourceforge.net/p/e1000/wiki/UnifiedStats/

> 
>> +	IDPF_PORT_STAT("rx-unknown_protocol", port_stats.vport_stats.rx_unknown_protocol),
>> +	IDPF_PORT_STAT("tx_bytes", port_stats.vport_stats.tx_bytes),
>> +	IDPF_PORT_STAT("tx-unicast_pkts", port_stats.vport_stats.tx_unicast),
>> +	IDPF_PORT_STAT("tx-multicast_pkts", port_stats.vport_stats.tx_multicast),
>> +	IDPF_PORT_STAT("tx-broadcast_pkts", port_stats.vport_stats.tx_broadcast),
>> +	IDPF_PORT_STAT("tx_errors", port_stats.vport_stats.tx_errors),
> 
>> +static void idpf_add_stat_strings(u8 **p, const struct idpf_stats *stats,
>> +				  const unsigned int size)
>> +{
>> +	unsigned int i;
>> +
>> +	for (i = 0; i < size; i++) {
>> +		snprintf((char *)*p, ETH_GSTRING_LEN, "%.32s",
>> +			 stats[i].stat_string);
>> +		*p += ETH_GSTRING_LEN;
> 
> ethtool_sprintf()
> 
>> +	}
>> +}
> 


  reply	other threads:[~2023-08-18 22:43 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-16  0:42 [PATCH net-next v5 00/15][pull request] Introduce Intel IDPF driver Tony Nguyen
2023-08-16  0:42 ` [PATCH net-next v5 01/15] virtchnl: add virtchnl version 2 ops Tony Nguyen
2023-08-16  0:42 ` [PATCH net-next v5 02/15] idpf: add module register and probe functionality Tony Nguyen
2023-08-16  0:42 ` [PATCH net-next v5 03/15] idpf: add controlq init and reset checks Tony Nguyen
2023-08-16  0:42 ` [PATCH net-next v5 04/15] idpf: add core init and interrupt request Tony Nguyen
2023-08-16  0:42 ` [PATCH net-next v5 05/15] idpf: add create vport and netdev configuration Tony Nguyen
2023-08-16  0:42 ` [PATCH net-next v5 06/15] idpf: add ptypes and MAC filter support Tony Nguyen
2023-08-16  0:42 ` [PATCH net-next v5 07/15] idpf: configure resources for TX queues Tony Nguyen
2023-08-16  0:42 ` [PATCH net-next v5 08/15] idpf: configure resources for RX queues Tony Nguyen
2023-08-18  2:58   ` Jakub Kicinski
2023-08-18 17:36     ` Linga, Pavan Kumar
2023-08-16  0:42 ` [PATCH net-next v5 09/15] idpf: initialize interrupts and enable vport Tony Nguyen
2023-08-16  0:43 ` [PATCH net-next v5 10/15] idpf: add splitq start_xmit Tony Nguyen
2023-08-18 18:37   ` Jakub Kicinski
2023-08-21 20:42     ` Linga, Pavan Kumar
2023-08-16  0:43 ` [PATCH net-next v5 11/15] idpf: add TX splitq napi poll support Tony Nguyen
2023-08-18 18:42   ` Jakub Kicinski
2023-08-16  0:43 ` [PATCH net-next v5 12/15] idpf: add RX " Tony Nguyen
2023-08-18 18:46   ` Jakub Kicinski
2023-08-16  0:43 ` [PATCH net-next v5 13/15] idpf: add singleq start_xmit and napi poll Tony Nguyen
2023-08-18 18:47   ` Jakub Kicinski
2023-08-16  0:43 ` [PATCH net-next v5 14/15] idpf: add ethtool callbacks Tony Nguyen
2023-08-18 18:58   ` Jakub Kicinski
2023-08-18 22:42     ` Przemek Kitszel [this message]
2023-08-19  0:01       ` Jakub Kicinski
2023-08-21 20:41     ` Linga, Pavan Kumar
2023-08-21 21:02       ` Jakub Kicinski
2023-08-23 18:05         ` Linga, Pavan Kumar
2023-08-16  0:43 ` [PATCH net-next v5 15/15] idpf: configure SRIOV and add other ndo_ops Tony Nguyen
2023-08-18  3:02   ` Jakub Kicinski
2023-08-18 17:41     ` Linga, Pavan Kumar

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=53a996f1-402e-dea8-9c08-51b84d02d0ac@intel.com \
    --to=przemyslaw.kitszel@intel.com \
    --cc=alan.brady@intel.com \
    --cc=alice.michael@intel.com \
    --cc=andrew@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=decot@google.com \
    --cc=edumazet@google.com \
    --cc=emil.s.tantilov@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=joshua.a.hay@intel.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.kumar.linga@intel.com \
    --cc=phani.r.burra@intel.com \
    --cc=shannon.nelson@amd.com \
    --cc=shiraz.saleem@intel.com \
    --cc=simon.horman@corigine.com \
    --cc=sindhu.devale@intel.com \
    --cc=sridhar.samudrala@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=willemb@google.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).