summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp/if_fxpreg.h
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2010-05-09 22:16:15 +0000
committeryongari <yongari@FreeBSD.org>2010-05-09 22:16:15 +0000
commit3e09decd1986826f54af1a47be97bb87c1220783 (patch)
tree37186e7204715c4fe42c5d9a9db3cf8d50f2b3ae /sys/dev/fxp/if_fxpreg.h
parent48c5cd85a64eb9c45f373bdcba6b8287284a13ef (diff)
downloadFreeBSD-src-3e09decd1986826f54af1a47be97bb87c1220783.zip
FreeBSD-src-3e09decd1986826f54af1a47be97bb87c1220783.tar.gz
Export hardware MAC statistics through sysctl node. Previously
fxp(4) already used to extract most hardware MAC statistics but it didn't show them. With this change, all MAC statistics counters are exported. Because there are a couple of new counters for 82558 and 82559, enable extended MAC statistics functionality to get these counters. Accoring to public data sheet, 82559 MAC statistics return 24 DWORD counters(3 counters are unknown at this moment) so increase MAC counter structure to meet the MAC statistics block size. The completion of MAC counter dump is now checked against FXP_STATS_DR_COMPLETE status code which is appended at the end of status block. Previously fxp(4) ignored the status of the FXP_SCB_COMMAND_CU_DUMPRESET command. fxp(4) does not wait for the completion of pending command before issuing FXP_SCB_COMMAND_CU_DUMPRESET. Instead it skips the command and try it next time. This scheme may show better performance but there is chance to loose updated counters after stopping controller. So make sure to update MAC statistics in fxp_stop(). While I'm here move sysctl node creation to fxp_sysctl_node(). Tested by: Larry Baird < lab <> gta dot com >
Diffstat (limited to 'sys/dev/fxp/if_fxpreg.h')
-rw-r--r--sys/dev/fxp/if_fxpreg.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/fxp/if_fxpreg.h b/sys/dev/fxp/if_fxpreg.h
index 9831bd2..d46b49a 100644
--- a/sys/dev/fxp/if_fxpreg.h
+++ b/sys/dev/fxp/if_fxpreg.h
@@ -418,7 +418,15 @@ struct fxp_stats {
uint32_t rx_overrun_errors;
uint32_t rx_cdt_errors;
uint32_t rx_shortframes;
+ uint32_t tx_pause;
+ uint32_t rx_pause;
+ uint32_t rx_controls;
+ uint16_t tx_tco;
+ uint16_t rx_tco;
uint32_t completion_status;
+ uint32_t reserved0;
+ uint32_t reserved1;
+ uint32_t reserved2;
};
#define FXP_STATS_DUMP_COMPLETE 0xa005
#define FXP_STATS_DR_COMPLETE 0xa007
OpenPOWER on IntegriCloud