Skip to contentSkip to conversation

net: mvpp2: extend mib-fragments name to mib-fragments-err

PATCH In review [email protected] 3 participants 6 messages Jan 14, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: mvpp2: extend mib-fragments name to mib-fragments-err

From: Stefan Chulski <[email protected]>

This patch doesn't change any functionality, but just extend MIB counter register and ethtool-statistic names with "err".

The counter MVPP2_MIB_FRAGMENTS_RCVD in fact is Error counter. Extend REG name and appropriated ethtool statistic reg-name with the ERR/err.

Change-Id Ic32b9779b90ba99789e83e85cfaddb5da9e7fda9
---
 drivers/net/ethernet/marvell/mvpp2/mvpp2.h      | 2 +-
 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/marvell/mvpp2/mvpp2.h +1 -1
index 6bd7e40..6c9b7c9 100644
@@ -899,7 +899,7 @@ enum mvpp22_ptp_packet_format {
 #define MVPP2_MIB_FC_RCVD			0x58
 #define MVPP2_MIB_RX_FIFO_OVERRUN		0x5c
 #define MVPP2_MIB_UNDERSIZE_RCVD		0x60
-#define MVPP2_MIB_FRAGMENTS_RCVD		0x64
+#define MVPP2_MIB_FRAGMENTS_ERR_RCVD		0x64
 #define MVPP2_MIB_OVERSIZE_RCVD			0x68
 #define MVPP2_MIB_JABBER_RCVD			0x6c
 #define MVPP2_MIB_MAC_RCV_ERROR			0x70
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +1 -1
index 3982956..85fcdd6 100644
@@ -1566,7 +1566,7 @@ static u32 mvpp2_read_index(struct mvpp2 *priv, u32 index, u32 reg)
 	{ MVPP2_MIB_FC_RCVD, "fc_received" },
 	{ MVPP2_MIB_RX_FIFO_OVERRUN, "rx_fifo_overrun" },
 	{ MVPP2_MIB_UNDERSIZE_RCVD, "undersize_received" },
-	{ MVPP2_MIB_FRAGMENTS_RCVD, "fragments_received" },
+	{ MVPP2_MIB_FRAGMENTS_ERR_RCVD, "fragments_err_received" },
 	{ MVPP2_MIB_OVERSIZE_RCVD, "oversize_received" },
 	{ MVPP2_MIB_JABBER_RCVD, "jabber_received" },
 	{ MVPP2_MIB_MAC_RCV_ERROR, "mac_receive_error" },
Signature · 1 line
1.9.1
#1 lore raw
Quoted 12 lines · On Thu, Jan 14, 2021 at 12:07:38PM +0200, [email protected] wrote:

From: Stefan Chulski <[email protected]>

This patch doesn't change any functionality, but just extend MIB counter register and ethtool-statistic names with "err".

The counter MVPP2_MIB_FRAGMENTS_RCVD in fact is Error counter. Extend REG name and appropriated ethtool statistic reg-name with the ERR/err.

drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c static u32 mvpp2_read_index(struct mvpp2 *priv, u32 index, u32 reg) · line 1569

Quoted 5 lines
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +1 -1
@@ -1566,7 +1566,7 @@ static u32 mvpp2_read_index(struct mvpp2 *priv, u32 index, u32 reg)
 	{ MVPP2_MIB_FC_RCVD, "fc_received" },
 	{ MVPP2_MIB_RX_FIFO_OVERRUN, "rx_fifo_overrun" },
 	{ MVPP2_MIB_UNDERSIZE_RCVD, "undersize_received" },
-	{ MVPP2_MIB_FRAGMENTS_RCVD, "fragments_received" },
+	{ MVPP2_MIB_FRAGMENTS_ERR_RCVD, "fragments_err_received" },

Hi Stefan

I suspect this is now ABI and you cannot change it. You at least need to argue why it is not ABI.

Andrew

#2 lore raw
Quoted 21 lines

drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c static u32 mvpp2_read_index(struct mvpp2

Quoted 12 lines

From: Stefan Chulski <[email protected]>

This patch doesn't change any functionality, but just extend MIB counter register and ethtool-statistic names with "err".

The counter MVPP2_MIB_FRAGMENTS_RCVD in fact is Error counter. Extend REG name and appropriated ethtool statistic reg-name with the ERR/err.

drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +0 -0
@@ -1566,7 +1566,7 @@ static u32 mvpp2_read_index(struct mvpp2

*priv, u32 index, u32 reg)

drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c static u32 mvpp2_read_index(struct mvpp2 *priv, u32 index, u32 reg) · line 1569

Quoted 5 lines
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +1 -1
 	{ MVPP2_MIB_FC_RCVD, "fc_received" },
 	{ MVPP2_MIB_RX_FIFO_OVERRUN, "rx_fifo_overrun" },
 	{ MVPP2_MIB_UNDERSIZE_RCVD, "undersize_received" },
-	{ MVPP2_MIB_FRAGMENTS_RCVD, "fragments_received" },
+	{ MVPP2_MIB_FRAGMENTS_ERR_RCVD, "fragments_err_received" },

Hi Stefan

Quoted 4 lines

I suspect this is now ABI and you cannot change it. You at least need to argue why it is not ABI.

Andrew

Hi Andrew,

I not familiar with ABI concept. Does this mean we cannot change, fix or extend driver ethtool counters?

Thanks,
Stefan.

maintainer
#3 lore raw
Quoted 24 lines · On Thu, 14 Jan 2021 16:13:23 +0000 Stefan Chulski wrote:
Quoted 24 lines

drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c static u32 mvpp2_read_index(struct mvpp2

Quoted 12 lines

From: Stefan Chulski <[email protected]>

This patch doesn't change any functionality, but just extend MIB counter register and ethtool-statistic names with "err".

The counter MVPP2_MIB_FRAGMENTS_RCVD in fact is Error counter. Extend REG name and appropriated ethtool statistic reg-name with the ERR/err.

drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +0 -0
@@ -1566,7 +1566,7 @@ static u32 mvpp2_read_index(struct mvpp2  

*priv, u32 index, u32 reg)

drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c static u32 mvpp2_read_index(struct mvpp2 *priv, u32 index, u32 reg) · line 1569

Quoted 5 lines
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +1 -1
 	{ MVPP2_MIB_FC_RCVD, "fc_received" },
 	{ MVPP2_MIB_RX_FIFO_OVERRUN, "rx_fifo_overrun" },
 	{ MVPP2_MIB_UNDERSIZE_RCVD, "undersize_received" },
-	{ MVPP2_MIB_FRAGMENTS_RCVD, "fragments_received" },
+	{ MVPP2_MIB_FRAGMENTS_ERR_RCVD, "fragments_err_received" },  

Hi Stefan

I suspect this is now ABI and you cannot change it. You at least need to argue why it is not ABI.

Quoted 6 lines
Quoted 1 line

Andrew

Hi Andrew,

I not familiar with ABI concept. Does this mean we cannot change, fix or extend driver ethtool counters?

Extend yes, but some user may have a script tracking "fragments_received", that script would break if you rename it.

It'd be good if the hardware errors were reported in standard netdev statistics.

#4 lore raw
In reply to Stefan Chulski
Quoted 21 lines · Stefan Chulski
Quoted 21 lines

drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c static u32 mvpp2_read_index(struct mvpp2

Quoted 12 lines

From: Stefan Chulski <[email protected]>

This patch doesn't change any functionality, but just extend MIB counter register and ethtool-statistic names with "err".

The counter MVPP2_MIB_FRAGMENTS_RCVD in fact is Error counter. Extend REG name and appropriated ethtool statistic reg-name with the ERR/err.

drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +0 -0
@@ -1566,7 +1566,7 @@ static u32 mvpp2_read_index(struct mvpp2

*priv, u32 index, u32 reg)

drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c static u32 mvpp2_read_index(struct mvpp2 *priv, u32 index, u32 reg) · line 1569

Quoted 5 lines
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +1 -1
 	{ MVPP2_MIB_FC_RCVD, "fc_received" },
 	{ MVPP2_MIB_RX_FIFO_OVERRUN, "rx_fifo_overrun" },
 	{ MVPP2_MIB_UNDERSIZE_RCVD, "undersize_received" },
-	{ MVPP2_MIB_FRAGMENTS_RCVD, "fragments_received" },
+	{ MVPP2_MIB_FRAGMENTS_ERR_RCVD, "fragments_err_received" },

Hi Stefan

Quoted 8 lines
Quoted 4 lines

I suspect this is now ABI and you cannot change it. You at least need to argue why it is not ABI.

Andrew

Hi Andrew,

I not familiar with ABI concept. Does this mean we cannot change, fix or extend driver ethtool counters?

As Jakub pointed out, there could be user space looking for this name.

What you could do is add fragments_err_received in addition to fragments_received. That should not break anything.

Andrew

maintainer
#5 lore raw
In reply to [email protected]
Quoted 11 lines · On Thu, 14 Jan 2021 12:07:38 +0200 [email protected] wrote:

From: Stefan Chulski <[email protected]>

This patch doesn't change any functionality, but just extend MIB counter register and ethtool-statistic names with "err".

The counter MVPP2_MIB_FRAGMENTS_RCVD in fact is Error counter. Extend REG name and appropriated ethtool statistic reg-name with the ERR/err.

Change-Id Ic32b9779b90ba99789e83e85cfaddb5da9e7fda9

Please strip the gerrit IDs from the upstream patches. Checkpatch flags this as an error. Please always run checkpatch --strict before submitting.