mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Oded Gabbay <oded.gabbay@gmail.com>, Jakub Kicinski <kuba@kernel.org>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	SW_Drivers@habana.ai, gregkh@linuxfoundation.org,
	davem@davemloft.net, kuba@kernel.org, f.fainelli@gmail.com,
	Omer Shpigelman <oshpigelman@habana.ai>
Subject: Re: [PATCH v2 12/14] habanalabs/gaudi: Add ethtool support using coresight
Date: Mon, 14 Sep 2020 03:24:13 +0200	[thread overview]
Message-ID: <20200914012413.GB3463198@lunn.ch> (raw)
In-Reply-To: <20200912144106.11799-13-oded.gabbay@gmail.com>

> +static struct gaudi_nic_ethtool_stats gaudi_nic_mac_stats_rx[] = {
> +	{"Rx MAC counters", 0},
> +	{"  etherStatsOctets", 0x0},
> +	{"  OctetsReceivedOK", 0x4},
> +	{"  aAlignmentErrors", 0x8},
> +	{"  aPAUSEMACCtrlFramesReceived", 0xC},
> +	{"  aFrameTooLongErrors", 0x10},
> +	{"  aInRangeLengthErrors", 0x14},
> +	{"  aFramesReceivedOK", 0x18},
> +	{"  VLANReceivedOK", 0x1C},
> +	{"  aFrameCheckSequenceErrors", 0x20},
> +	{"  ifInErrors", 0x24},
> +	{"  ifInUcastPkts", 0x28},
> +	{"  ifInMulticastPkts", 0x2C},
> +	{"  ifInBroadcastPkts", 0x30},
> +	{"  etherStatsDropEvents", 0x34},
> +	{"  etherStatsUndersizePkts", 0x38},
> +	{"  etherStatsPkts", 0x3C},
> +	{"  etherStatsPkts64Octets", 0x40},
> +	{"  etherStatsPkts65to127Octets", 0x44},
> +	{"  etherStatsPkts128to255Octets", 0x48},
> +	{"  etherStatsPkts256to511Octets", 0x4C},
> +	{"  etherStatsPkts512to1023Octets", 0x50},
> +	{"  etherStatsPkts1024to1518Octets", 0x54},
> +	{"  etherStatsPkts1519toMaxOctets", 0x58},
> +	{"  etherStatsOversizePkts", 0x5C},
> +	{"  etherStatsJabbers", 0x60},
> +	{"  etherStatsFragments", 0x64},
> +	{"  aCBFCPAUSEFramesReceived_0", 0x68},
> +	{"  aCBFCPAUSEFramesReceived_1", 0x6C},
> +	{"  aCBFCPAUSEFramesReceived_2", 0x70},
> +	{"  aCBFCPAUSEFramesReceived_3", 0x74},
> +	{"  aCBFCPAUSEFramesReceived_4", 0x78},
> +	{"  aCBFCPAUSEFramesReceived_5", 0x7C},
> +	{"  aCBFCPAUSEFramesReceived_6", 0x80},
> +	{"  aCBFCPAUSEFramesReceived_7", 0x84},
> +	{"  aMACControlFramesReceived", 0x88}
> +};
> +
> +static struct gaudi_nic_ethtool_stats gaudi_nic_mac_stats_tx[] = {
> +	{"Tx MAC counters", 0},
> +	{"  etherStatsOctets", 0x0},
> +	{"  OctetsTransmittedOK", 0x4},
> +	{"  aPAUSEMACCtrlFramesTransmitted", 0x8},
> +	{"  aFramesTransmittedOK", 0xC},
> +	{"  VLANTransmittedOK", 0x10},
> +	{"  ifOutErrors", 0x14},
> +	{"  ifOutUcastPkts", 0x18},
> +	{"  ifOutMulticastPkts", 0x1C},
> +	{"  ifOutBroadcastPkts", 0x20},
> +	{"  etherStatsPkts64Octets", 0x24},
> +	{"  etherStatsPkts65to127Octets", 0x28},
> +	{"  etherStatsPkts128to255Octets", 0x2C},
> +	{"  etherStatsPkts256to511Octets", 0x30},
> +	{"  etherStatsPkts512to1023Octets", 0x34},
> +	{"  etherStatsPkts1024to1518Octets", 0x38},
> +	{"  etherStatsPkts1519toMaxOctets", 0x3C},
> +	{"  aCBFCPAUSEFramesTransmitted_0", 0x40},
> +	{"  aCBFCPAUSEFramesTransmitted_1", 0x44},
> +	{"  aCBFCPAUSEFramesTransmitted_2", 0x48},
> +	{"  aCBFCPAUSEFramesTransmitted_3", 0x4C},
> +	{"  aCBFCPAUSEFramesTransmitted_4", 0x50},
> +	{"  aCBFCPAUSEFramesTransmitted_5", 0x54},
> +	{"  aCBFCPAUSEFramesTransmitted_6", 0x58},
> +	{"  aCBFCPAUSEFramesTransmitted_7", 0x5C},
> +	{"  aMACControlFramesTransmitted", 0x60},
> +	{"  etherStatsPkts", 0x64}
> +};

...

> +static void gaudi_nic_get_internal_stats(struct net_device *netdev, u64 *data)
> +{
> +	struct gaudi_nic_device **ptr = netdev_priv(netdev);
> +	struct gaudi_nic_device *gaudi_nic = *ptr;
> +	struct hl_device *hdev = gaudi_nic->hdev;
> +	u32 port = gaudi_nic->port;
> +	u32 num_spmus;
> +	int i;
> +
> +	num_spmus = (port & 1) ? NIC_SPMU1_STATS_LEN : NIC_SPMU0_STATS_LEN;
> +
> +	gaudi_sample_spmu_nic(hdev, port, num_spmus, data);
> +	data += num_spmus;
> +
> +	/* first entry is title */
> +	data[0] = 0;

Hi Jakub

You have been looking at statistics names recently. What do you think
of this data[0]?

   Andrew

  reply	other threads:[~2020-09-14  1:24 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-12 14:40 [PATCH v2 00/14] Adding GAUDI NIC code to habanalabs driver Oded Gabbay
2020-09-12 14:40 ` [PATCH v2 02/14] habanalabs/gaudi: add NIC firmware-related definitions Oded Gabbay
2020-09-12 14:40 ` [PATCH v2 03/14] habanalabs/gaudi: add NIC security configuration Oded Gabbay
2020-09-12 14:40 ` [PATCH v2 04/14] habanalabs/gaudi: add support for NIC QMANs Oded Gabbay
2020-09-12 14:40 ` [PATCH v2 05/14] habanalabs/gaudi: add NIC Ethernet support Oded Gabbay
2020-09-12 14:40 ` [PATCH v2 06/14] habanalabs/gaudi: add NIC PHY code Oded Gabbay
2020-09-12 14:40 ` [PATCH v2 07/14] habanalabs/gaudi: allow user to get MAC addresses in INFO IOCTL Oded Gabbay
2020-09-12 14:41 ` [PATCH v2 08/14] habanalabs/gaudi: add a new IOCTL for NIC control operations Oded Gabbay
2020-09-12 15:07   ` Randy Dunlap
2020-09-12 15:19     ` Oded Gabbay
2020-09-12 15:23       ` Randy Dunlap
2020-09-12 14:41 ` [PATCH v2 09/14] habanalabs/gaudi: add CQ " Oded Gabbay
2020-09-12 14:41 ` [PATCH v2 10/14] habanalabs/gaudi: add WQ " Oded Gabbay
2020-09-12 14:41 ` [PATCH v2 11/14] habanalabs/gaudi: add QP error handling Oded Gabbay
2020-09-12 14:41 ` [PATCH v2 12/14] habanalabs/gaudi: Add ethtool support using coresight Oded Gabbay
2020-09-14  1:24   ` Andrew Lunn [this message]
2020-09-14 20:07     ` Jakub Kicinski
2020-09-14 20:53       ` Oded Gabbay
2020-09-14  1:37   ` Andrew Lunn
2020-09-14  5:15     ` Oded Gabbay
2020-09-14  1:39   ` Florian Fainelli
2020-09-14  5:14     ` Oded Gabbay
2020-09-12 14:41 ` [PATCH v2 13/14] habanalabs/gaudi: support DCB protocol Oded Gabbay
2020-09-12 14:41 ` [PATCH v2 14/14] habanalabs/gaudi: add NIC init/fini calls from common code Oded Gabbay

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=20200914012413.GB3463198@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=SW_Drivers@habana.ai \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oded.gabbay@gmail.com \
    --cc=oshpigelman@habana.ai \
    /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

all inboxes | Powered by JetHome®