Skip to content

Commit

Permalink
Merge branch 'bnx2x-stats'
Browse files Browse the repository at this point in the history
Yuval Mintz says:

====================
bnx2x: Statistics patch series

This series contains 2 small statistics-related patches,
first adding a new SW statistics and the other exposing port stats
for multi-function devices.

Please consider applying this series to `net-next'.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Nov 20, 2015
2 parents 7521cd4 + 3fb2d49 commit 12ded5c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static const struct {
{ Q_STATS_OFFSET32(rx_skb_alloc_failed),
4, "[%s]: rx_skb_alloc_discard" },
{ Q_STATS_OFFSET32(hw_csum_err), 4, "[%s]: rx_csum_offload_errors" },

{ Q_STATS_OFFSET32(driver_xoff), 4, "[%s]: tx_exhaustion_events" },
{ Q_STATS_OFFSET32(total_bytes_transmitted_hi), 8, "[%s]: tx_bytes" },
/* 10 */{ Q_STATS_OFFSET32(total_unicast_packets_transmitted_hi),
8, "[%s]: tx_ucast_packets" },
Expand Down Expand Up @@ -128,7 +128,8 @@ static const struct {
4, STATS_FLAGS_BOTH, "rx_skb_alloc_discard" },
{ STATS_OFFSET32(hw_csum_err),
4, STATS_FLAGS_BOTH, "rx_csum_offload_errors" },

{ STATS_OFFSET32(driver_xoff),
4, STATS_FLAGS_BOTH, "tx_exhaustion_events" },
{ STATS_OFFSET32(total_bytes_transmitted_hi),
8, STATS_FLAGS_BOTH, "tx_bytes" },
{ STATS_OFFSET32(tx_stat_ifhcoutbadoctets_hi),
Expand Down Expand Up @@ -3068,9 +3069,7 @@ static void bnx2x_self_test(struct net_device *dev,
#define IS_PORT_STAT(i) \
((bnx2x_stats_arr[i].flags & STATS_FLAGS_BOTH) == STATS_FLAGS_PORT)
#define IS_FUNC_STAT(i) (bnx2x_stats_arr[i].flags & STATS_FLAGS_FUNC)
#define HIDE_PORT_STAT(bp) \
((IS_MF(bp) && !(bp->msg_enable & BNX2X_MSG_STATS)) || \
IS_VF(bp))
#define HIDE_PORT_STAT(bp) IS_VF(bp)

/* ethtool statistics are displayed for all regular ethernet queues and the
* fcoe L2 queue if not disabled
Expand Down

0 comments on commit 12ded5c

Please sign in to comment.