All of lore.kernel.org
 help / color / mirror / Atom feed
From: Biju Das <biju.das.jz@bp.renesas.com>
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: Biju Das <biju.das.jz@bp.renesas.com>,
	Sergey Shtylyov <s.shtylyov@omp.ru>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Sergey Shtylyov <s.shtylyov@omprussia.ru>,
	Adam Ford <aford173@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
	Yuusuke Ashizuka <ashiduka@fujitsu.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Chris Paterson <Chris.Paterson2@renesas.com>,
	Biju Das <biju.das@bp.renesas.com>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: [PATCH net-next v3 08/14] ravb: Add support to retrieve stats for GbEthernet
Date: Tue, 12 Oct 2021 17:36:07 +0100	[thread overview]
Message-ID: <20211012163613.30030-9-biju.das.jz@bp.renesas.com> (raw)
In-Reply-To: <20211012163613.30030-1-biju.das.jz@bp.renesas.com>

Add support for retrieving stats information for GbEthernet.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
v2->v3:
 * No change
V1->V2:
 * No change
RFC->v1:
 * No change. Added Sergey's Rb tag.
RFC changes:
 * New patch.
---
 drivers/net/ethernet/renesas/ravb_main.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index 2221a2565397..c984875e8ae0 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -1493,6 +1493,24 @@ static void ravb_set_msglevel(struct net_device *ndev, u32 value)
 	priv->msg_enable = value;
 }
 
+static const char ravb_gstrings_stats_gbeth[][ETH_GSTRING_LEN] = {
+	"rx_queue_0_current",
+	"tx_queue_0_current",
+	"rx_queue_0_dirty",
+	"tx_queue_0_dirty",
+	"rx_queue_0_packets",
+	"tx_queue_0_packets",
+	"rx_queue_0_bytes",
+	"tx_queue_0_bytes",
+	"rx_queue_0_mcast_packets",
+	"rx_queue_0_errors",
+	"rx_queue_0_crc_errors",
+	"rx_queue_0_frame_errors",
+	"rx_queue_0_length_errors",
+	"rx_queue_0_csum_offload_errors",
+	"rx_queue_0_over_errors",
+};
+
 static const char ravb_gstrings_stats[][ETH_GSTRING_LEN] = {
 	"rx_queue_0_current",
 	"tx_queue_0_current",
@@ -2434,6 +2452,9 @@ static const struct ravb_hw_info gbeth_hw_info = {
 	.set_feature = ravb_set_features_gbeth,
 	.dmac_init = ravb_dmac_init_gbeth,
 	.emac_init = ravb_emac_init_gbeth,
+	.gstrings_stats = ravb_gstrings_stats_gbeth,
+	.gstrings_size = sizeof(ravb_gstrings_stats_gbeth),
+	.stats_len = ARRAY_SIZE(ravb_gstrings_stats_gbeth),
 	.max_rx_len = ALIGN(GBETH_RX_BUFF_MAX, RAVB_ALIGN),
 	.tsrq = TCCR_TSRQ0,
 	.rx_max_buf_size = SZ_8K,
-- 
2.17.1


  parent reply	other threads:[~2021-10-12 16:36 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-12 16:35 [PATCH net-next v3 00/14] Add functional support for Gigabit Ethernet driver Biju Das
2021-10-12 16:36 ` [PATCH net-next v3 01/14] ravb: Use ALIGN macro for max_rx_len Biju Das
2021-10-12 16:36 ` [PATCH net-next v3 02/14] ravb: Add rx_max_buf_size to struct ravb_hw_info Biju Das
2021-10-12 16:36 ` [PATCH net-next v3 03/14] ravb: Fillup ravb_alloc_rx_desc_gbeth() stub Biju Das
2021-10-12 16:36 ` [PATCH net-next v3 04/14] ravb: Fillup ravb_rx_ring_free_gbeth() stub Biju Das
2021-10-12 16:36 ` [PATCH net-next v3 05/14] ravb: Fillup ravb_rx_ring_format_gbeth() stub Biju Das
2021-10-12 16:36 ` [PATCH net-next v3 06/14] ravb: Fillup ravb_rx_gbeth() stub Biju Das
2021-10-12 16:36 ` [PATCH net-next v3 07/14] ravb: Add carrier_counters to struct ravb_hw_info Biju Das
2021-10-12 16:36 ` Biju Das [this message]
2021-10-12 16:36 ` [PATCH net-next v3 09/14] ravb: Rename "tsrq" variable Biju Das
2021-10-12 16:36 ` [PATCH net-next v3 10/14] ravb: Optimize ravb_emac_init_gbeth function Biju Das
2021-10-12 16:36 ` [PATCH net-next v3 11/14] ravb: Rename "nc_queue" feature bit Biju Das
2021-10-12 16:36 ` [PATCH net-next v3 12/14] ravb: Document PFRI register bit Biju Das
2021-10-12 16:36 ` [PATCH net-next v3 13/14] ravb: Update ravb_emac_init_gbeth() Biju Das
2021-10-12 17:34   ` Sergey Shtylyov
2021-10-12 17:52     ` Biju Das
2021-10-12 18:03       ` Sergei Shtylyov
2021-10-12 18:23         ` Biju Das
2021-10-12 18:25           ` Sergei Shtylyov
2021-10-12 18:55             ` Biju Das
2021-10-13  6:14               ` Biju Das
2021-10-13 15:46               ` Sergey Shtylyov
     [not found]                 ` <20211013085704.4a059444@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
2021-10-13 16:03                   ` Sergey Shtylyov
2021-10-12 16:36 ` [PATCH net-next v3 14/14] ravb: Fix typo AVB->DMAC Biju Das
2021-10-12 18:19 ` [PATCH net-next v3 00/14] Add functional support for Gigabit Ethernet driver Jakub Kicinski
2021-10-12 18:28   ` Biju Das
     [not found]     ` <20211012114125.0a9d71ae@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
2021-10-12 18:53       ` Biju Das
2021-10-12 20:17         ` Jakub Kicinski
2021-10-13  6:41           ` Biju Das
2021-10-13  6:50             ` Biju Das
2021-10-13 16:20 ` 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=20211012163613.30030-9-biju.das.jz@bp.renesas.com \
    --to=biju.das.jz@bp.renesas.com \
    --cc=Chris.Paterson2@renesas.com \
    --cc=aford173@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=ashiduka@fujitsu.com \
    --cc=biju.das@bp.renesas.com \
    --cc=davem@davemloft.net \
    --cc=geert+renesas@glider.be \
    --cc=kuba@kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=s.shtylyov@omp.ru \
    --cc=s.shtylyov@omprussia.ru \
    --cc=yoshihiro.shimoda.uh@renesas.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.