mbox series

[net-next,0/3] dpaa2-eth: Add new statistics counters

Message ID 1567160443-31297-1-git-send-email-ruxandra.radulescu@nxp.com
Headers show
Series dpaa2-eth: Add new statistics counters | expand

Message

Ioana Radulescu Aug. 30, 2019, 10:20 a.m. UTC
Recent firmware versions offer access to more DPNI statistics
counters. Add the relevant ones to ethtool interface stats.

Also we can now make use of a new counter for in flight egress frames
to avoid sleeping an arbitrary amount of time in the ndo_stop routine.

Ioana Radulescu (3):
  dpaa2-eth: Minor refactoring in ethtool stats
  dpaa2-eth: Add new DPNI statistics counters
  dpaa2-eth: Poll Tx pending frames counter on if down

 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c   | 31 +++++++++++++++--
 .../net/ethernet/freescale/dpaa2/dpaa2-ethtool.c   | 39 +++++++++++++--------
 drivers/net/ethernet/freescale/dpaa2/dpni.c        |  2 +-
 drivers/net/ethernet/freescale/dpaa2/dpni.h        | 40 ++++++++++++++++++++++
 4 files changed, 94 insertions(+), 18 deletions(-)

Comments

Jakub Kicinski Aug. 31, 2019, 6:12 a.m. UTC | #1
On Fri, 30 Aug 2019 13:20:40 +0300, Ioana Radulescu wrote:
> Recent firmware versions offer access to more DPNI statistics
> counters. Add the relevant ones to ethtool interface stats.
> 
> Also we can now make use of a new counter for in flight egress frames
> to avoid sleeping an arbitrary amount of time in the ndo_stop routine.

A little messy there in the comment of patch 2, and IMHO if you're
expecting particular errors to be ignored it's better to write:

	if (err == -EOPNOTSUPP)
		/* still fine*/;
	else if (err)
		/* real err */

than assume any error is for unsupported and add a extra comment
explaining that things may be not supported.

Series LGTM tho.
David Miller Sept. 1, 2019, 6:42 a.m. UTC | #2
From: Jakub Kicinski <jakub.kicinski@netronome.com>
Date: Fri, 30 Aug 2019 23:12:19 -0700

> On Fri, 30 Aug 2019 13:20:40 +0300, Ioana Radulescu wrote:
>> Recent firmware versions offer access to more DPNI statistics
>> counters. Add the relevant ones to ethtool interface stats.
>> 
>> Also we can now make use of a new counter for in flight egress frames
>> to avoid sleeping an arbitrary amount of time in the ndo_stop routine.
> 
> A little messy there in the comment of patch 2, and IMHO if you're
> expecting particular errors to be ignored it's better to write:
> 
> 	if (err == -EOPNOTSUPP)
> 		/* still fine*/;
> 	else if (err)
> 		/* real err */
> 
> than assume any error is for unsupported and add a extra comment
> explaining that things may be not supported.

Ioana, please address this feedback and respin your patchset.

Thank you.