netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: mvpp2: extend mib-fragments name to mib-fragments-err
@ 2021-01-14 10:07 stefanc
  2021-01-14 15:44 ` Andrew Lunn
  2021-01-14 17:46 ` Jakub Kicinski
  0 siblings, 2 replies; 6+ messages in thread
From: stefanc @ 2021-01-14 10:07 UTC (permalink / raw)
  To: netdev
  Cc: thomas.petazzoni, davem, nadavh, ymarkman, linux-kernel, stefanc,
	kuba, linux, mw, andrew, rmk+kernel, atenart

From: Stefan Chulski <stefanc@marvell.com>

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
Signed-off-by: Stefan Chulski <stefanc@marvell.com>
---
 drivers/net/ethernet/marvell/mvpp2/mvpp2.h      | 2 +-
 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h
index 6bd7e40..6c9b7c9 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h
@@ -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
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index 3982956..85fcdd6 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -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" },
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] net: mvpp2: extend mib-fragments name to mib-fragments-err
  2021-01-14 10:07 [PATCH net-next] net: mvpp2: extend mib-fragments name to mib-fragments-err stefanc
@ 2021-01-14 15:44 ` Andrew Lunn
  2021-01-14 16:13   ` [EXT] " Stefan Chulski
  2021-01-14 17:46 ` Jakub Kicinski
  1 sibling, 1 reply; 6+ messages in thread
From: Andrew Lunn @ 2021-01-14 15:44 UTC (permalink / raw)
  To: stefanc
  Cc: netdev, thomas.petazzoni, davem, nadavh, ymarkman, linux-kernel,
	kuba, linux, mw, rmk+kernel, atenart

On Thu, Jan 14, 2021 at 12:07:38PM +0200, stefanc@marvell.com wrote:
> From: Stefan Chulski <stefanc@marvell.com>
> 
> 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.

> --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> @@ -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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [EXT] Re: [PATCH net-next] net: mvpp2: extend mib-fragments name to mib-fragments-err
  2021-01-14 15:44 ` Andrew Lunn
@ 2021-01-14 16:13   ` Stefan Chulski
  2021-01-14 17:49     ` Jakub Kicinski
  2021-01-14 18:20     ` Andrew Lunn
  0 siblings, 2 replies; 6+ messages in thread
From: Stefan Chulski @ 2021-01-14 16:13 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: netdev, thomas.petazzoni, davem, Nadav Haklai, Yan Markman,
	linux-kernel, kuba, linux, mw, rmk+kernel, atenart

> > From: Stefan Chulski <stefanc@marvell.com>
> >
> > 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.
> 
> > --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> > +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> > @@ -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

Hi Andrew,

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

Thanks,
Stefan.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] net: mvpp2: extend mib-fragments name to mib-fragments-err
  2021-01-14 10:07 [PATCH net-next] net: mvpp2: extend mib-fragments name to mib-fragments-err stefanc
  2021-01-14 15:44 ` Andrew Lunn
@ 2021-01-14 17:46 ` Jakub Kicinski
  1 sibling, 0 replies; 6+ messages in thread
From: Jakub Kicinski @ 2021-01-14 17:46 UTC (permalink / raw)
  To: stefanc
  Cc: netdev, thomas.petazzoni, davem, nadavh, ymarkman, linux-kernel,
	linux, mw, andrew, rmk+kernel, atenart

On Thu, 14 Jan 2021 12:07:38 +0200 stefanc@marvell.com wrote:
> From: Stefan Chulski <stefanc@marvell.com>
> 
> 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
> Signed-off-by: Stefan Chulski <stefanc@marvell.com>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [EXT] Re: [PATCH net-next] net: mvpp2: extend mib-fragments name to mib-fragments-err
  2021-01-14 16:13   ` [EXT] " Stefan Chulski
@ 2021-01-14 17:49     ` Jakub Kicinski
  2021-01-14 18:20     ` Andrew Lunn
  1 sibling, 0 replies; 6+ messages in thread
From: Jakub Kicinski @ 2021-01-14 17:49 UTC (permalink / raw)
  To: Stefan Chulski
  Cc: Andrew Lunn, netdev, thomas.petazzoni, davem, Nadav Haklai,
	Yan Markman, linux-kernel, linux, mw, rmk+kernel, atenart

On Thu, 14 Jan 2021 16:13:23 +0000 Stefan Chulski wrote:
> > > From: Stefan Chulski <stefanc@marvell.com>
> > >
> > > 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.  
> >   
> > > --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> > > +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> > > @@ -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  
> 
> 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [EXT] Re: [PATCH net-next] net: mvpp2: extend mib-fragments name to mib-fragments-err
  2021-01-14 16:13   ` [EXT] " Stefan Chulski
  2021-01-14 17:49     ` Jakub Kicinski
@ 2021-01-14 18:20     ` Andrew Lunn
  1 sibling, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2021-01-14 18:20 UTC (permalink / raw)
  To: Stefan Chulski
  Cc: netdev, thomas.petazzoni, davem, Nadav Haklai, Yan Markman,
	linux-kernel, kuba, linux, mw, rmk+kernel, atenart

On Thu, Jan 14, 2021 at 04:13:23PM +0000, Stefan Chulski wrote:
> > > From: Stefan Chulski <stefanc@marvell.com>
> > >
> > > 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.
> > 
> > > --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> > > +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> > > @@ -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
> 
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-01-14 18:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14 10:07 [PATCH net-next] net: mvpp2: extend mib-fragments name to mib-fragments-err stefanc
2021-01-14 15:44 ` Andrew Lunn
2021-01-14 16:13   ` [EXT] " Stefan Chulski
2021-01-14 17:49     ` Jakub Kicinski
2021-01-14 18:20     ` Andrew Lunn
2021-01-14 17:46 ` Jakub Kicinski

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).