Hi Florian,
> > +static u64 mvpp2_read_count(struct mvpp2_port *port, unsigned int
> > offset) +{
> > + bool reg_is_64b =
> > + (offset == MVPP2_MIB_GOOD_OCTETS_RCVD_LOW) ||
> > + (offset == MVPP2_MIB_GOOD_OCTETS_SENT_LOW);
>
> This does not scale very well, put that in yo
Hi Andrew,
Thanks for the review, I forgot to mention this is for net-next, I'll
fix the subject line when sending the v2.
> > +static struct mvpp2_ethtool_statistics mvpp2_ethtool_stats[] = {
>
> This can probably be const, and save a few bytes of RAM.
Absolutely.
>
> > + { MVPP2_MIB_GOO
On 11/02/2017 11:52 AM, Miquel Raynal wrote:
> Add ethtool statistics support by reading the GOP statistics from the
> hardware counters. Also implement a workqueue to gather the statistics
> every second or some 32-bit counters could overflow.
>
> Suggested-by: Stefan Chulski
> Signed-off-by: Mi
Hi Miquel
> +static struct mvpp2_ethtool_statistics mvpp2_ethtool_stats[] = {
This can probably be const, and save a few bytes of RAM.
> + { MVPP2_MIB_GOOD_OCTETS_RCVD_LOW, "good_octets_received" },
> + { MVPP2_MIB_BAD_OCTETS_RCVD, "bad_octets_received" },
> + { MVPP2_MIB_CRC_ERRORS_
Add ethtool statistics support by reading the GOP statistics from the
hardware counters. Also implement a workqueue to gather the statistics
every second or some 32-bit counters could overflow.
Suggested-by: Stefan Chulski
Signed-off-by: Miquel Raynal
---
drivers/net/ethernet/marvell/mvpp2.c |