Commit 12ded5ca authored by David S. Miller's avatar David S. Miller

Merge branch 'bnx2x-stats'

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: default avatarDavid S. Miller <davem@davemloft.net>
parents 7521cd43 3fb2d492
...@@ -52,7 +52,7 @@ static const struct { ...@@ -52,7 +52,7 @@ static const struct {
{ Q_STATS_OFFSET32(rx_skb_alloc_failed), { Q_STATS_OFFSET32(rx_skb_alloc_failed),
4, "[%s]: rx_skb_alloc_discard" }, 4, "[%s]: rx_skb_alloc_discard" },
{ Q_STATS_OFFSET32(hw_csum_err), 4, "[%s]: rx_csum_offload_errors" }, { 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" }, { Q_STATS_OFFSET32(total_bytes_transmitted_hi), 8, "[%s]: tx_bytes" },
/* 10 */{ Q_STATS_OFFSET32(total_unicast_packets_transmitted_hi), /* 10 */{ Q_STATS_OFFSET32(total_unicast_packets_transmitted_hi),
8, "[%s]: tx_ucast_packets" }, 8, "[%s]: tx_ucast_packets" },
...@@ -128,7 +128,8 @@ static const struct { ...@@ -128,7 +128,8 @@ static const struct {
4, STATS_FLAGS_BOTH, "rx_skb_alloc_discard" }, 4, STATS_FLAGS_BOTH, "rx_skb_alloc_discard" },
{ STATS_OFFSET32(hw_csum_err), { STATS_OFFSET32(hw_csum_err),
4, STATS_FLAGS_BOTH, "rx_csum_offload_errors" }, 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), { STATS_OFFSET32(total_bytes_transmitted_hi),
8, STATS_FLAGS_BOTH, "tx_bytes" }, 8, STATS_FLAGS_BOTH, "tx_bytes" },
{ STATS_OFFSET32(tx_stat_ifhcoutbadoctets_hi), { STATS_OFFSET32(tx_stat_ifhcoutbadoctets_hi),
...@@ -3068,9 +3069,7 @@ static void bnx2x_self_test(struct net_device *dev, ...@@ -3068,9 +3069,7 @@ static void bnx2x_self_test(struct net_device *dev,
#define IS_PORT_STAT(i) \ #define IS_PORT_STAT(i) \
((bnx2x_stats_arr[i].flags & STATS_FLAGS_BOTH) == STATS_FLAGS_PORT) ((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 IS_FUNC_STAT(i) (bnx2x_stats_arr[i].flags & STATS_FLAGS_FUNC)
#define HIDE_PORT_STAT(bp) \ #define HIDE_PORT_STAT(bp) IS_VF(bp)
((IS_MF(bp) && !(bp->msg_enable & BNX2X_MSG_STATS)) || \
IS_VF(bp))
/* ethtool statistics are displayed for all regular ethernet queues and the /* ethtool statistics are displayed for all regular ethernet queues and the
* fcoe L2 queue if not disabled * fcoe L2 queue if not disabled
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment