diff mbox

[net-next,6/8] bna: Add Stats Clear Counter

Message ID 1354748470-26293-7-git-send-email-rmody@brocade.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Rasesh Mody Dec. 5, 2012, 11:01 p.m. UTC
Added Stats clear counter to the bfi_enet_stats_mac structure and ethtool stats
 
Signed-off-by: Rasesh Mody <rmody@brocade.com>
---
 drivers/net/ethernet/brocade/bna/bfi_enet.h     |    1 +
 drivers/net/ethernet/brocade/bna/bnad_ethtool.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

Comments

Ben Hutchings Dec. 6, 2012, 2:19 a.m. UTC | #1
On Wed, 2012-12-05 at 15:01 -0800, Rasesh Mody wrote:
> Added Stats clear counter to the bfi_enet_stats_mac structure and ethtool stats
>  
> Signed-off-by: Rasesh Mody <rmody@brocade.com>

Since this structure appears to be part of the firmware interface, you
should combine this (and any other interface changes) with the change to
the requested firmware version (7/8).

Ben.

> ---
>  drivers/net/ethernet/brocade/bna/bfi_enet.h     |    1 +
>  drivers/net/ethernet/brocade/bna/bnad_ethtool.c |    1 +
>  2 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/ethernet/brocade/bna/bfi_enet.h b/drivers/net/ethernet/brocade/bna/bfi_enet.h
> index eef6e1f..7d10e33 100644
> --- a/drivers/net/ethernet/brocade/bna/bfi_enet.h
> +++ b/drivers/net/ethernet/brocade/bna/bfi_enet.h
> @@ -787,6 +787,7 @@ struct bfi_enet_stats_bpc {
>  
>  /* MAC Rx Statistics */
>  struct bfi_enet_stats_mac {
> +	u64 stats_clr_cnt;	/* times this stats cleared */
>  	u64 frame_64;		/* both rx and tx counter */
>  	u64 frame_65_127;		/* both rx and tx counter */
>  	u64 frame_128_255;		/* both rx and tx counter */
> diff --git a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c
> index 40e1e84..455b5a2 100644
> --- a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c
> +++ b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c
> @@ -102,6 +102,7 @@ static const char *bnad_net_stats_strings[BNAD_ETHTOOL_STATS_NUM] = {
>  	"rx_unmap_q_alloc_failed",
>  	"rxbuf_alloc_failed",
>  
> +	"mac_stats_clr_cnt",
>  	"mac_frame_64",
>  	"mac_frame_65_127",
>  	"mac_frame_128_255",
Ben Hutchings Dec. 6, 2012, 8:54 p.m. UTC | #2
On Thu, 2012-12-06 at 12:34 -0800, Rasesh Mody wrote:
> >From: Ben Hutchings [mailto:bhutchings@solarflare.com]
> >Sent: Wednesday, December 05, 2012 6:20 PM
> >Subject: Re: [net-next 6/8] bna: Add Stats Clear Counter
> >
> >On Wed, 2012-12-05 at 15:01 -0800, Rasesh Mody wrote:
> >> Added Stats clear counter to the bfi_enet_stats_mac structure and
> >> ethtool stats
> >>
> >> Signed-off-by: Rasesh Mody <rmody@brocade.com>
> >
> >Since this structure appears to be part of the firmware interface, you
> >should combine this (and any other interface changes) with the change to
> >the requested firmware version (7/8).
> 
> Ben,
> 
> Thanks for the feedback. Yes, bfi_enet_stats_mac is a part of firmware
> interface update.
> 
> In future submission, I will plan to take care of combining such
> firmware interface updates/changes and the firmware request version
> change into single patch. Please let me know if you think it is
> required for this patch set.

That's not my decision.

Ben.
Rasesh Mody Dec. 6, 2012, 11:23 p.m. UTC | #3
>From: Ben Hutchings [mailto:bhutchings@solarflare.com]

>Sent: Thursday, December 06, 2012 12:55 PM

>

>On Thu, 2012-12-06 at 12:34 -0800, Rasesh Mody wrote:

>> >From: Ben Hutchings [mailto:bhutchings@solarflare.com]

>> >Sent: Wednesday, December 05, 2012 6:20 PM

>> >Subject: Re: [net-next 6/8] bna: Add Stats Clear Counter

>> >

>> >On Wed, 2012-12-05 at 15:01 -0800, Rasesh Mody wrote:

>> >> Added Stats clear counter to the bfi_enet_stats_mac structure and

>> >> ethtool stats

>> >>

>> >> Signed-off-by: Rasesh Mody <rmody@brocade.com>

>> >

>> >Since this structure appears to be part of the firmware interface,

>> >you should combine this (and any other interface changes) with the

>> >change to the requested firmware version (7/8).

>>

>> Ben,

>>

>> Thanks for the feedback. Yes, bfi_enet_stats_mac is a part of firmware

>> interface update.

>>

>> In future submission, I will plan to take care of combining such

>> firmware interface updates/changes and the firmware request version

>> change into single patch. Please let me know if you think it is

>> required for this patch set.

>

>That's not my decision.


I have resubmitted the patch set to address you feedback.

Thanks,
Rasesh
diff mbox

Patch

diff --git a/drivers/net/ethernet/brocade/bna/bfi_enet.h b/drivers/net/ethernet/brocade/bna/bfi_enet.h
index eef6e1f..7d10e33 100644
--- a/drivers/net/ethernet/brocade/bna/bfi_enet.h
+++ b/drivers/net/ethernet/brocade/bna/bfi_enet.h
@@ -787,6 +787,7 @@  struct bfi_enet_stats_bpc {
 
 /* MAC Rx Statistics */
 struct bfi_enet_stats_mac {
+	u64 stats_clr_cnt;	/* times this stats cleared */
 	u64 frame_64;		/* both rx and tx counter */
 	u64 frame_65_127;		/* both rx and tx counter */
 	u64 frame_128_255;		/* both rx and tx counter */
diff --git a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c
index 40e1e84..455b5a2 100644
--- a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c
+++ b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c
@@ -102,6 +102,7 @@  static const char *bnad_net_stats_strings[BNAD_ETHTOOL_STATS_NUM] = {
 	"rx_unmap_q_alloc_failed",
 	"rxbuf_alloc_failed",
 
+	"mac_stats_clr_cnt",
 	"mac_frame_64",
 	"mac_frame_65_127",
 	"mac_frame_128_255",