From: Corentin Labbe <clabbe.montjoie@gmail.com>
To: peppe.cavallaro@st.com, alexandre.torgue@st.com, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Corentin Labbe <clabbe.montjoie@gmail.com>
Subject: [PATCH v2 12/16] net: stmmac: rename rx_crc to rx_crc_errors
Date: Wed, 8 Feb 2017 09:31:17 +0100 [thread overview]
Message-ID: <20170208083121.27949-13-clabbe.montjoie@gmail.com> (raw)
In-Reply-To: <20170208083121.27949-1-clabbe.montjoie@gmail.com>
The ethtool stat counter rx_crc from stmmac is mis-named, the name
seems to speak about the number of RX CRC done, but in fact it is about
errors.
This patch rename it to rx_crc_errors, just like the same ifconfig
counter.
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
drivers/net/ethernet/stmicro/stmmac/common.h | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/enh_desc.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/norm_desc.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h
index 24929bf..144fe84 100644
--- a/drivers/net/ethernet/stmicro/stmmac/common.h
+++ b/drivers/net/ethernet/stmicro/stmmac/common.h
@@ -67,7 +67,7 @@ struct stmmac_extra_stats {
unsigned long overflow_error;
unsigned long ipc_csum_error;
unsigned long rx_collision;
- unsigned long rx_crc;
+ unsigned long rx_crc_errors;
unsigned long dribbling_bit;
unsigned long rx_length;
unsigned long rx_mii;
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
index 8816515..843ec69 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
@@ -103,7 +103,7 @@ static int dwmac4_wrback_get_rx_status(void *data, struct stmmac_extra_stats *x,
x->rx_mii++;
if (unlikely(rdes3 & RDES3_CRC_ERROR)) {
- x->rx_crc++;
+ x->rx_crc_errors++;
stats->rx_crc_errors++;
}
diff --git a/drivers/net/ethernet/stmicro/stmmac/enh_desc.c b/drivers/net/ethernet/stmicro/stmmac/enh_desc.c
index 8427643..323b59e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/enh_desc.c
+++ b/drivers/net/ethernet/stmicro/stmmac/enh_desc.c
@@ -221,7 +221,7 @@ static int enh_desc_get_rx_status(void *data, struct stmmac_extra_stats *x,
x->rx_mii++;
if (unlikely(rdes0 & RDES0_CRC_ERROR)) {
- x->rx_crc++;
+ x->rx_crc_errors++;
stats->rx_crc_errors++;
}
ret = discard_frame;
diff --git a/drivers/net/ethernet/stmicro/stmmac/norm_desc.c b/drivers/net/ethernet/stmicro/stmmac/norm_desc.c
index 5a0d4b0..efb818e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/norm_desc.c
+++ b/drivers/net/ethernet/stmicro/stmmac/norm_desc.c
@@ -111,7 +111,7 @@ static int ndesc_get_rx_status(void *data, struct stmmac_extra_stats *x,
stats->collisions++;
}
if (unlikely(rdes0 & RDES0_CRC_ERROR)) {
- x->rx_crc++;
+ x->rx_crc_errors++;
stats->rx_crc_errors++;
}
ret = discard_frame;
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
index 9083d9a..aab895d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
@@ -61,7 +61,7 @@ static const struct stmmac_stats stmmac_gstrings_stats[] = {
STMMAC_STAT(overflow_error),
STMMAC_STAT(ipc_csum_error),
STMMAC_STAT(rx_collision),
- STMMAC_STAT(rx_crc),
+ STMMAC_STAT(rx_crc_errors),
STMMAC_STAT(dribbling_bit),
STMMAC_STAT(rx_length),
STMMAC_STAT(rx_mii),
--
2.10.2
next prev parent reply other threads:[~2017-02-08 8:35 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-08 8:31 [PATCH v2 00/16] net: stmmac: misc fix Corentin Labbe
2017-02-08 8:31 ` [PATCH v2 01/16] net: stmmac: fix the typo on MAC_RNABLE_RX Corentin Labbe
2017-02-08 8:31 ` [PATCH v2 02/16] net: stmmac: Remove the bus_setup function pointer Corentin Labbe
2017-02-08 13:17 ` Giuseppe CAVALLARO
2017-02-08 8:31 ` [PATCH v2 03/16] net: stmmac: fix some typos in comments Corentin Labbe
2017-02-08 8:31 ` [PATCH v2 04/16] net: stmmac: remove freesoftware address Corentin Labbe
2017-02-08 13:17 ` Giuseppe CAVALLARO
2017-02-08 8:31 ` [PATCH v2 05/16] net: stmmac: remplace asm/io.h by linux/io.h Corentin Labbe
2017-02-08 8:31 ` [PATCH v2 06/16] net: stmmac: fix some code style problem Corentin Labbe
2017-02-08 10:41 ` Joe Perches
2017-02-08 15:06 ` Corentin Labbe
2017-02-08 11:57 ` Sergei Shtylyov
2017-02-08 8:31 ` [PATCH v2 07/16] net: stmmac: replace stmmac_mdio_busy_wait by readl_poll_timeout Corentin Labbe
2017-02-08 8:31 ` [PATCH v2 08/16] net: stmmac: Use readl_poll_timeout Corentin Labbe
2017-02-08 13:18 ` Giuseppe CAVALLARO
2017-02-08 8:31 ` [PATCH v2 09/16] net: stmmac: replace ENOSYS by EINVAL Corentin Labbe
2017-02-08 8:31 ` [PATCH v2 10/16] net: stmmac: Correct the error message about invalid speed Corentin Labbe
2017-02-08 13:18 ` Giuseppe CAVALLARO
2017-02-08 8:31 ` [PATCH v2 11/16] net: stmmac: Rewrite two test against NULL value Corentin Labbe
2017-02-08 8:31 ` Corentin Labbe [this message]
2017-02-08 8:31 ` [PATCH v2 13/16] net: stmmac: print phy information Corentin Labbe
2017-02-08 13:18 ` Giuseppe CAVALLARO
2017-02-08 8:31 ` [PATCH v2 14/16] net: stmmac: remove dead code in stmmac_tx_clean Corentin Labbe
2017-02-08 8:31 ` [PATCH v2 15/16] net: stmmac: remove unused variable in sysfs_display_ring Corentin Labbe
2017-02-08 8:31 ` [PATCH v2 16/16] net: stmmac: replace unsigned by u32 Corentin Labbe
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=20170208083121.27949-13-clabbe.montjoie@gmail.com \
--to=clabbe.montjoie@gmail.com \
--cc=alexandre.torgue@st.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.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
all inboxes | Powered by JetHome®