diff options
author | Emil Tantilov <emil.s.tantilov@intel.com> | 2011-04-21 04:43:43 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-05-07 06:15:45 -0400 |
commit | 58f6bcf96e95f042a2bee6ace238365cb8fb1ce6 (patch) | |
tree | 7b4d1fb7e77edde1bc60c95e4c215fb686cfe2ad /drivers/net/ixgbe | |
parent | 67a74ee2a24957012661dc4400e4f8e363d25fbb (diff) |
ixgbe: add ethtool counters for OS2BMC
OS2BMC registers are available for X540.
This patch adds ethtool counters based on those registers.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_ethtool.c | 4 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 7 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_type.h | 8 |
3 files changed, 18 insertions, 1 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 545b231b2a74..1fdd075afe79 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c | |||
@@ -102,6 +102,10 @@ static struct ixgbe_stats ixgbe_gstrings_stats[] = { | |||
102 | {"alloc_rx_page_failed", IXGBE_STAT(alloc_rx_page_failed)}, | 102 | {"alloc_rx_page_failed", IXGBE_STAT(alloc_rx_page_failed)}, |
103 | {"alloc_rx_buff_failed", IXGBE_STAT(alloc_rx_buff_failed)}, | 103 | {"alloc_rx_buff_failed", IXGBE_STAT(alloc_rx_buff_failed)}, |
104 | {"rx_no_dma_resources", IXGBE_STAT(hw_rx_no_dma_resources)}, | 104 | {"rx_no_dma_resources", IXGBE_STAT(hw_rx_no_dma_resources)}, |
105 | {"os2bmc_rx_by_bmc", IXGBE_STAT(stats.o2bgptc)}, | ||
106 | {"os2bmc_tx_by_bmc", IXGBE_STAT(stats.b2ospc)}, | ||
107 | {"os2bmc_tx_by_host", IXGBE_STAT(stats.o2bspc)}, | ||
108 | {"os2bmc_rx_by_host", IXGBE_STAT(stats.b2ogprc)}, | ||
105 | #ifdef IXGBE_FCOE | 109 | #ifdef IXGBE_FCOE |
106 | {"fcoe_bad_fccrc", IXGBE_STAT(stats.fccrc)}, | 110 | {"fcoe_bad_fccrc", IXGBE_STAT(stats.fccrc)}, |
107 | {"rx_fcoe_dropped", IXGBE_STAT(stats.fcoerpdc)}, | 111 | {"rx_fcoe_dropped", IXGBE_STAT(stats.fcoerpdc)}, |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 56cc9a10c717..a3e384bc50fe 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -5912,8 +5912,13 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter) | |||
5912 | hwstats->gotc += IXGBE_READ_REG(hw, IXGBE_GOTCH); | 5912 | hwstats->gotc += IXGBE_READ_REG(hw, IXGBE_GOTCH); |
5913 | hwstats->tor += IXGBE_READ_REG(hw, IXGBE_TORH); | 5913 | hwstats->tor += IXGBE_READ_REG(hw, IXGBE_TORH); |
5914 | break; | 5914 | break; |
5915 | case ixgbe_mac_82599EB: | ||
5916 | case ixgbe_mac_X540: | 5915 | case ixgbe_mac_X540: |
5916 | /* OS2BMC stats are X540 only*/ | ||
5917 | hwstats->o2bgptc += IXGBE_READ_REG(hw, IXGBE_O2BGPTC); | ||
5918 | hwstats->o2bspc += IXGBE_READ_REG(hw, IXGBE_O2BSPC); | ||
5919 | hwstats->b2ospc += IXGBE_READ_REG(hw, IXGBE_B2OSPC); | ||
5920 | hwstats->b2ogprc += IXGBE_READ_REG(hw, IXGBE_B2OGPRC); | ||
5921 | case ixgbe_mac_82599EB: | ||
5917 | hwstats->gorc += IXGBE_READ_REG(hw, IXGBE_GORCL); | 5922 | hwstats->gorc += IXGBE_READ_REG(hw, IXGBE_GORCL); |
5918 | IXGBE_READ_REG(hw, IXGBE_GORCH); /* to clear */ | 5923 | IXGBE_READ_REG(hw, IXGBE_GORCH); /* to clear */ |
5919 | hwstats->gotc += IXGBE_READ_REG(hw, IXGBE_GOTCL); | 5924 | hwstats->gotc += IXGBE_READ_REG(hw, IXGBE_GOTCL); |
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h index b1d523ca4d81..70e6870be01f 100644 --- a/drivers/net/ixgbe/ixgbe_type.h +++ b/drivers/net/ixgbe/ixgbe_type.h | |||
@@ -672,6 +672,10 @@ | |||
672 | #define IXGBE_FCOEDWRC 0x0242C /* Number of FCoE DWords Received */ | 672 | #define IXGBE_FCOEDWRC 0x0242C /* Number of FCoE DWords Received */ |
673 | #define IXGBE_FCOEPTC 0x08784 /* Number of FCoE Packets Transmitted */ | 673 | #define IXGBE_FCOEPTC 0x08784 /* Number of FCoE Packets Transmitted */ |
674 | #define IXGBE_FCOEDWTC 0x08788 /* Number of FCoE DWords Transmitted */ | 674 | #define IXGBE_FCOEDWTC 0x08788 /* Number of FCoE DWords Transmitted */ |
675 | #define IXGBE_O2BGPTC 0x041C4 | ||
676 | #define IXGBE_O2BSPC 0x087B0 | ||
677 | #define IXGBE_B2OSPC 0x041C0 | ||
678 | #define IXGBE_B2OGPRC 0x02F90 | ||
675 | #define IXGBE_PCRC8ECL 0x0E810 | 679 | #define IXGBE_PCRC8ECL 0x0E810 |
676 | #define IXGBE_PCRC8ECH 0x0E811 | 680 | #define IXGBE_PCRC8ECH 0x0E811 |
677 | #define IXGBE_PCRC8ECH_MASK 0x1F | 681 | #define IXGBE_PCRC8ECH_MASK 0x1F |
@@ -2554,6 +2558,10 @@ struct ixgbe_hw_stats { | |||
2554 | u64 fcoeptc; | 2558 | u64 fcoeptc; |
2555 | u64 fcoedwrc; | 2559 | u64 fcoedwrc; |
2556 | u64 fcoedwtc; | 2560 | u64 fcoedwtc; |
2561 | u64 b2ospc; | ||
2562 | u64 b2ogprc; | ||
2563 | u64 o2bgptc; | ||
2564 | u64 o2bspc; | ||
2557 | }; | 2565 | }; |
2558 | 2566 | ||
2559 | /* forward declaration */ | 2567 | /* forward declaration */ |