Changeset View
Changeset View
Standalone View
Standalone View
sys/mips/nlm/dev/net/xlpge.c
Show All 12 Lines | |||||
struct sysctl_oid *tree; | struct sysctl_oid *tree; | ||||
ctx = device_get_sysctl_ctx(dev); | ctx = device_get_sysctl_ctx(dev); | ||||
tree = device_get_sysctl_tree(dev); | tree = device_get_sysctl_tree(dev); | ||||
child = SYSCTL_CHILDREN(tree); | child = SYSCTL_CHILDREN(tree); | ||||
#define XLPGE_STAT(name, offset, desc) \ | #define XLPGE_STAT(name, offset, desc) \ | ||||
SYSCTL_ADD_PROC(ctx, child, OID_AUTO, name, \ | SYSCTL_ADD_PROC(ctx, child, OID_AUTO, name, \ | ||||
CTLTYPE_UINT | CTLFLAG_RD, sc, offset, \ | CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, \ | ||||
xlpge_stats_sysctl, "IU", desc) | sc, offset, xlpge_stats_sysctl, "IU", desc) | ||||
XLPGE_STAT("tr127", nlm_sgmii_stats_tr127, "TxRx 64 - 127 Bytes"); | XLPGE_STAT("tr127", nlm_sgmii_stats_tr127, "TxRx 64 - 127 Bytes"); | ||||
XLPGE_STAT("tr255", nlm_sgmii_stats_tr255, "TxRx 128 - 255 Bytes"); | XLPGE_STAT("tr255", nlm_sgmii_stats_tr255, "TxRx 128 - 255 Bytes"); | ||||
XLPGE_STAT("tr511", nlm_sgmii_stats_tr511, "TxRx 256 - 511 Bytes"); | XLPGE_STAT("tr511", nlm_sgmii_stats_tr511, "TxRx 256 - 511 Bytes"); | ||||
XLPGE_STAT("tr1k", nlm_sgmii_stats_tr1k, "TxRx 512 - 1023 Bytes"); | XLPGE_STAT("tr1k", nlm_sgmii_stats_tr1k, "TxRx 512 - 1023 Bytes"); | ||||
XLPGE_STAT("trmax", nlm_sgmii_stats_trmax, "TxRx 1024 - 1518 Bytes"); | XLPGE_STAT("trmax", nlm_sgmii_stats_trmax, "TxRx 1024 - 1518 Bytes"); | ||||
XLPGE_STAT("trmgv", nlm_sgmii_stats_trmgv, "TxRx 1519 - 1522 Bytes"); | XLPGE_STAT("trmgv", nlm_sgmii_stats_trmgv, "TxRx 1519 - 1522 Bytes"); | ||||
Show All 12 Lines |