aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/man/man4/utopia.424
-rw-r--r--share/man/man9/utopia.95
2 files changed, 29 insertions, 0 deletions
diff --git a/share/man/man4/utopia.4 b/share/man/man4/utopia.4
index 1ee8294752ad..42bde3fe1491 100644
--- a/share/man/man4/utopia.4
+++ b/share/man/man4/utopia.4
@@ -107,6 +107,30 @@ IDT77155 (155MBit interface)
.El
.It Cm phy_name
This is a string describing the type of the PHY chip.
+.It Cm phy_stats
+Physical and some ATM layer statistics. These are the statistics usually
+provided by the chip. The data is a returned in the following structure:
+.Bd -literal
+struct utopia_stats1 {
+ uint32_t version; /* version of this struct */
+ uint32_t fill;
+ uint64_t rx_sbip; /* rx section BIP errors */
+ uint64_t rx_lbip; /* rx line BIP errors */
+ uint64_t rx_lfebe; /* rx line far end block errors */
+ uint64_t rx_pbip; /* rx path BIP errors */
+ uint64_t rx_pfebe; /* rx path far end block errors */
+ uint64_t rx_cells; /* received cells */
+ uint64_t rx_corr; /* correctable cell errors */
+ uint64_t rx_uncorr; /* uncorrectable cell errors */
+ uint64_t rx_symerr; /* symbol errors */
+ uint64_t tx_cells; /* transmitted cells */
+};
+.Ed
+.Pp
+The current version is 1. The statistics are updated from the chip once
+a second. On overflow the counters wrap to zero. Note that not all counters
+are meaningful for all PHY chips. The statistics are cleared by writing an
+arbitrary new value (the value is ignored).
.El
.Pp
The
diff --git a/share/man/man9/utopia.9 b/share/man/man9/utopia.9
index 8716bd6e4a53..20c856ef51e0 100644
--- a/share/man/man9/utopia.9
+++ b/share/man/man9/utopia.9
@@ -60,6 +60,8 @@
.Fn utopia_set_loopback "struct utopia *utp" "u_int mode"
.Ft void
.Fn utopia_intr "struct utopia *utp"
+.Ft void
+.Fn utopia_update_stats "struct utopia *utp"
.Sh DESCRIPTION
This module is used by all ATM drivers for cards that use a number of known
PHY chips to provide uniform functionality.
@@ -116,6 +118,7 @@ struct utopia {
u_int carrier; /* carrier state */
u_int loopback; /* loopback mode */
const struct utopia_chip *chip; /* chip operations */
+ struct utopia_stats1 stats; /* statistics */
};
.Ed
The public accessible fields have the following functions:
@@ -298,6 +301,8 @@ otherwise leaving the previous state.
Called when an interrupt from the PHY chip is detected. This resets the
interrupt state by reading all registers and, if the interrupt was from the
RSOP, checks the carrier state.
+.It Fn utopia_update_stats
+Update the statistics with counters red from the chip.
.El
.Sh SEE ALSO
.Xr utopia 4