From 66e855f3f5197fec1162c5235fdb5f92b956d618 Mon Sep 17 00:00:00 2001 From: Yitchak Gertner Date: Wed, 13 Aug 2008 15:49:05 -0700 Subject: bnx2x: Statistics Statistics - Making sure that each drop is accounted for in the driver statistics - Clearing the FW statistics when driver is loaded to prevent inconsistency with HW statistics - Once error is detected (bnx2x_panic_dump), stop the statistics before other actions (currently it is stopped last and can corrupt the data) - Adding HW checksum error counter to the statistics - Removing unused variable stats_ticks - Using macros instead of magic numbers to indicate which statistics are shared per port and which are per function Signed-off-by: Yitchak Gertner Signed-off-by: Eilon Greenstein Signed-off-by: David S. Miller --- drivers/net/bnx2x_fw_defs.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/net/bnx2x_fw_defs.h') diff --git a/drivers/net/bnx2x_fw_defs.h b/drivers/net/bnx2x_fw_defs.h index e3da7f69d27b..6e35761fc7dc 100644 --- a/drivers/net/bnx2x_fw_defs.h +++ b/drivers/net/bnx2x_fw_defs.h @@ -79,6 +79,9 @@ #define TSTORM_MAC_FILTER_CONFIG_OFFSET(function) \ (IS_E1H_OFFSET? (0x3008 + (function * 0x38)) : (0x1508 + \ (function * 0x38))) +#define TSTORM_PER_COUNTER_ID_STATS_OFFSET(port, stats_counter_id) \ + (IS_E1H_OFFSET ? (0x2010 + (port * 0x5b0) + (stats_counter_id * \ + 0x50)) : (0x4000 + (port * 0x3f0) + (stats_counter_id * 0x38))) #define TSTORM_RX_PRODS_OFFSET(port, client_id) \ (IS_E1H_OFFSET? (0x3350 + (port * 0x3e8) + (client_id * 0x28)) : \ (0x9c0 + (port * 0x2f8) + (client_id * 0x28))) @@ -157,6 +160,9 @@ (IS_E1H_OFFSET? 0x2ac8 : 0xffffffff) #define XSTORM_HC_BTR_OFFSET(port) \ (IS_E1H_OFFSET? (0xa144 + (port * 0x30)) : (0x1454 + (port * 0x18))) +#define XSTORM_PER_COUNTER_ID_STATS_OFFSET(port, stats_counter_id) \ + (IS_E1H_OFFSET ? (0xc000 + (port * 0x3f0) + (stats_counter_id * \ + 0x38)) : (0x3378 + (port * 0x3f0) + (stats_counter_id * 0x38))) #define XSTORM_RATE_SHAPING_PER_VN_VARS_OFFSET(function) \ (IS_E1H_OFFSET? (0x2528 + (function * 0x70)) : (0x3c20 + \ (function * 0x70))) -- cgit v1.2.3-59-g8ed1b