* [PATCH] ehea: restore multicast and rx_errors fields
@ 2012-03-07 5:46 Eric Dumazet
2012-03-07 14:17 ` Thadeu Lima de Souza Cascardo
0 siblings, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2012-03-07 5:46 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Anton Blanchard, Thadeu Lima de Souza Cascardo
Commit 239c562c94d (ehea: Add 64bit statistics) added a regression,
since we no longer report multicast & rx_errors fields, taken from
port->stats structure. These fields are updated in ehea_update_stats()
every second.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
---
drivers/net/ethernet/ibm/ehea/ehea_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
index 5d5fb26..e6893cd 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -336,7 +336,9 @@ static struct rtnl_link_stats64 *ehea_get_stats64(struct net_device *dev,
stats->tx_bytes = tx_bytes;
stats->rx_packets = rx_packets;
- return &port->stats;
+ stats->multicast = port->stats.multicast;
+ stats->rx_errors = port->stats.rx_errors;
+ return stats;
}
static void ehea_update_stats(struct work_struct *work)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ehea: restore multicast and rx_errors fields
2012-03-07 5:46 [PATCH] ehea: restore multicast and rx_errors fields Eric Dumazet
@ 2012-03-07 14:17 ` Thadeu Lima de Souza Cascardo
2012-03-07 14:44 ` Eric Dumazet
0 siblings, 1 reply; 4+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2012-03-07 14:17 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, netdev, Anton Blanchard
On Tue, Mar 06, 2012 at 09:46:41PM -0800, Eric Dumazet wrote:
> Commit 239c562c94d (ehea: Add 64bit statistics) added a regression,
> since we no longer report multicast & rx_errors fields, taken from
> port->stats structure. These fields are updated in ehea_update_stats()
> every second.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Cc: Anton Blanchard <anton@samba.org>
> Cc: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
> ---
> drivers/net/ethernet/ibm/ehea/ehea_main.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
> index 5d5fb26..e6893cd 100644
> --- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
> +++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
> @@ -336,7 +336,9 @@ static struct rtnl_link_stats64 *ehea_get_stats64(struct net_device *dev,
> stats->tx_bytes = tx_bytes;
> stats->rx_packets = rx_packets;
>
> - return &port->stats;
> + stats->multicast = port->stats.multicast;
> + stats->rx_errors = port->stats.rx_errors;
> + return stats;
> }
>
> static void ehea_update_stats(struct work_struct *work)
>
>
Tested, in particular, the multicast stat, pinging 224.0.0.1 from
another machine.
Thanks.
Cascardo.
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Tested-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ehea: restore multicast and rx_errors fields
2012-03-07 14:17 ` Thadeu Lima de Souza Cascardo
@ 2012-03-07 14:44 ` Eric Dumazet
2012-03-08 8:23 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2012-03-07 14:44 UTC (permalink / raw)
To: Thadeu Lima de Souza Cascardo; +Cc: David Miller, netdev, Anton Blanchard
Le mercredi 07 mars 2012 à 11:17 -0300, Thadeu Lima de Souza Cascardo a
écrit :
> Tested, in particular, the multicast stat, pinging 224.0.0.1 from
> another machine.
>
> Thanks.
> Cascardo.
>
> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
> Tested-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
>
Thanks !
Maybe you could submit a followup patch, to remove the port->stats
structure and only use two u64 fields, since this driver only use two
counters in its private "stats" ?
(I cant compile this driver on my dev machine)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ehea: restore multicast and rx_errors fields
2012-03-07 14:44 ` Eric Dumazet
@ 2012-03-08 8:23 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2012-03-08 8:23 UTC (permalink / raw)
To: eric.dumazet; +Cc: cascardo, netdev, anton
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 07 Mar 2012 06:44:51 -0800
> Le mercredi 07 mars 2012 à 11:17 -0300, Thadeu Lima de Souza Cascardo a
> écrit :
>
>> Tested, in particular, the multicast stat, pinging 224.0.0.1 from
>> another machine.
>>
>> Thanks.
>> Cascardo.
>>
>> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
>> Tested-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
>>
>
> Thanks !
>
> Maybe you could submit a followup patch, to remove the port->stats
> structure and only use two u64 fields, since this driver only use two
> counters in its private "stats" ?
Yes that sounds like a good idea.
I've applied Eric's patch to 'net'.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-08 8:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-07 5:46 [PATCH] ehea: restore multicast and rx_errors fields Eric Dumazet
2012-03-07 14:17 ` Thadeu Lima de Souza Cascardo
2012-03-07 14:44 ` Eric Dumazet
2012-03-08 8:23 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox