mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
Merge branch 'bcmgenet_systemport_stats'
Florian Fainelli says: ==================== net: bcmgenet and systemport statistics fixes This two patches fix a similar problem in the GENET and SYSTEMPORT drivers for software maintained statistics used to track DMA mapping and SKB re-allocation failures. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
38674a49f3
3 changed files with 12 additions and 6 deletions
|
@ -274,9 +274,9 @@ static const struct bcm_sysport_stats bcm_sysport_gstrings_stats[] = {
|
|||
/* RBUF misc statistics */
|
||||
STAT_RBUF("rbuf_ovflow_cnt", mib.rbuf_ovflow_cnt, RBUF_OVFL_DISC_CNTR),
|
||||
STAT_RBUF("rbuf_err_cnt", mib.rbuf_err_cnt, RBUF_ERR_PKT_CNTR),
|
||||
STAT_MIB_RX("alloc_rx_buff_failed", mib.alloc_rx_buff_failed),
|
||||
STAT_MIB_RX("rx_dma_failed", mib.rx_dma_failed),
|
||||
STAT_MIB_TX("tx_dma_failed", mib.tx_dma_failed),
|
||||
STAT_MIB_SOFT("alloc_rx_buff_failed", mib.alloc_rx_buff_failed),
|
||||
STAT_MIB_SOFT("rx_dma_failed", mib.rx_dma_failed),
|
||||
STAT_MIB_SOFT("tx_dma_failed", mib.tx_dma_failed),
|
||||
};
|
||||
|
||||
#define BCM_SYSPORT_STATS_LEN ARRAY_SIZE(bcm_sysport_gstrings_stats)
|
||||
|
@ -345,6 +345,7 @@ static void bcm_sysport_update_mib_counters(struct bcm_sysport_priv *priv)
|
|||
s = &bcm_sysport_gstrings_stats[i];
|
||||
switch (s->type) {
|
||||
case BCM_SYSPORT_STAT_NETDEV:
|
||||
case BCM_SYSPORT_STAT_SOFT:
|
||||
continue;
|
||||
case BCM_SYSPORT_STAT_MIB_RX:
|
||||
case BCM_SYSPORT_STAT_MIB_TX:
|
||||
|
|
|
@ -570,6 +570,7 @@ enum bcm_sysport_stat_type {
|
|||
BCM_SYSPORT_STAT_RUNT,
|
||||
BCM_SYSPORT_STAT_RXCHK,
|
||||
BCM_SYSPORT_STAT_RBUF,
|
||||
BCM_SYSPORT_STAT_SOFT,
|
||||
};
|
||||
|
||||
/* Macros to help define ethtool statistics */
|
||||
|
@ -590,6 +591,7 @@ enum bcm_sysport_stat_type {
|
|||
#define STAT_MIB_RX(str, m) STAT_MIB(str, m, BCM_SYSPORT_STAT_MIB_RX)
|
||||
#define STAT_MIB_TX(str, m) STAT_MIB(str, m, BCM_SYSPORT_STAT_MIB_TX)
|
||||
#define STAT_RUNT(str, m) STAT_MIB(str, m, BCM_SYSPORT_STAT_RUNT)
|
||||
#define STAT_MIB_SOFT(str, m) STAT_MIB(str, m, BCM_SYSPORT_STAT_SOFT)
|
||||
|
||||
#define STAT_RXCHK(str, m, ofs) { \
|
||||
.stat_string = str, \
|
||||
|
|
|
@ -487,6 +487,7 @@ enum bcmgenet_stat_type {
|
|||
BCMGENET_STAT_MIB_TX,
|
||||
BCMGENET_STAT_RUNT,
|
||||
BCMGENET_STAT_MISC,
|
||||
BCMGENET_STAT_SOFT,
|
||||
};
|
||||
|
||||
struct bcmgenet_stats {
|
||||
|
@ -515,6 +516,7 @@ struct bcmgenet_stats {
|
|||
#define STAT_GENET_MIB_RX(str, m) STAT_GENET_MIB(str, m, BCMGENET_STAT_MIB_RX)
|
||||
#define STAT_GENET_MIB_TX(str, m) STAT_GENET_MIB(str, m, BCMGENET_STAT_MIB_TX)
|
||||
#define STAT_GENET_RUNT(str, m) STAT_GENET_MIB(str, m, BCMGENET_STAT_RUNT)
|
||||
#define STAT_GENET_SOFT_MIB(str, m) STAT_GENET_MIB(str, m, BCMGENET_STAT_SOFT)
|
||||
|
||||
#define STAT_GENET_MISC(str, m, offset) { \
|
||||
.stat_string = str, \
|
||||
|
@ -614,9 +616,9 @@ static const struct bcmgenet_stats bcmgenet_gstrings_stats[] = {
|
|||
UMAC_RBUF_OVFL_CNT),
|
||||
STAT_GENET_MISC("rbuf_err_cnt", mib.rbuf_err_cnt, UMAC_RBUF_ERR_CNT),
|
||||
STAT_GENET_MISC("mdf_err_cnt", mib.mdf_err_cnt, UMAC_MDF_ERR_CNT),
|
||||
STAT_GENET_MIB_RX("alloc_rx_buff_failed", mib.alloc_rx_buff_failed),
|
||||
STAT_GENET_MIB_RX("rx_dma_failed", mib.rx_dma_failed),
|
||||
STAT_GENET_MIB_TX("tx_dma_failed", mib.tx_dma_failed),
|
||||
STAT_GENET_SOFT_MIB("alloc_rx_buff_failed", mib.alloc_rx_buff_failed),
|
||||
STAT_GENET_SOFT_MIB("rx_dma_failed", mib.rx_dma_failed),
|
||||
STAT_GENET_SOFT_MIB("tx_dma_failed", mib.tx_dma_failed),
|
||||
};
|
||||
|
||||
#define BCMGENET_STATS_LEN ARRAY_SIZE(bcmgenet_gstrings_stats)
|
||||
|
@ -668,6 +670,7 @@ static void bcmgenet_update_mib_counters(struct bcmgenet_priv *priv)
|
|||
s = &bcmgenet_gstrings_stats[i];
|
||||
switch (s->type) {
|
||||
case BCMGENET_STAT_NETDEV:
|
||||
case BCMGENET_STAT_SOFT:
|
||||
continue;
|
||||
case BCMGENET_STAT_MIB_RX:
|
||||
case BCMGENET_STAT_MIB_TX:
|
||||
|
|
Loading…
Reference in a new issue