| 302 | #endif |
| 303 | |
| 304 | static void |
| 305 | arge_attach_sysctl(device_t dev) |
| 306 | { |
| 307 | struct arge_softc *sc = device_get_softc(dev); |
| 308 | struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(dev); |
| 309 | struct sysctl_oid *tree = device_get_sysctl_tree(dev); |
| 310 | |
| 311 | #ifdef ARGE_DEBUG |
| 312 | SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, |
| 313 | "debug", CTLFLAG_RW, &sc->arge_debug, 0, |
| 314 | "arge interface debugging flags"); |
| 315 | arge_attach_intr_sysctl(dev, SYSCTL_CHILDREN(tree)); |
| 316 | #endif |
| 317 | |
| 318 | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, |
| 319 | "tx_pkts_aligned", CTLFLAG_RW, &sc->stats.tx_pkts_aligned, 0, |
| 320 | "number of TX aligned packets"); |
| 321 | |
| 322 | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, |
| 323 | "tx_pkts_unaligned", CTLFLAG_RW, &sc->stats.tx_pkts_unaligned, |
| 324 | 0, "number of TX unaligned packets"); |
| 325 | |
| 326 | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, |
| 327 | "tx_pkts_unaligned_start", CTLFLAG_RW, &sc->stats.tx_pkts_unaligned_start, |
| 328 | 0, "number of TX unaligned packets (start)"); |
| 329 | |
| 330 | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, |
| 331 | "tx_pkts_unaligned_len", CTLFLAG_RW, &sc->stats.tx_pkts_unaligned_len, |
| 332 | 0, "number of TX unaligned packets (len)"); |
| 333 | |
| 334 | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, |
| 335 | "tx_pkts_unaligned_tooshort", CTLFLAG_RW, |
| 336 | &sc->stats.tx_pkts_unaligned_tooshort, |
| 337 | 0, "number of TX unaligned packets (mbuf length < 4 bytes)"); |
| 338 | |
| 339 | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, |
| 340 | "tx_pkts_nosegs", CTLFLAG_RW, &sc->stats.tx_pkts_nosegs, |
| 341 | 0, "number of TX packets fail with no ring slots avail"); |
| 342 | |
| 343 | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, |
| 344 | "intr_stray_filter", CTLFLAG_RW, &sc->stats.intr_stray, |
| 345 | 0, "number of stray interrupts (filter)"); |
| 346 | |
| 347 | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, |
| 348 | "intr_stray_intr", CTLFLAG_RW, &sc->stats.intr_stray2, |
| 349 | 0, "number of stray interrupts (intr)"); |
| 350 | |
| 351 | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, |
| 352 | "intr_ok", CTLFLAG_RW, &sc->stats.intr_ok, |
| 353 | 0, "number of OK interrupts"); |
| 354 | |
| 355 | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, |
| 356 | "tx_underflow", CTLFLAG_RW, &sc->stats.tx_underflow, |
| 357 | 0, "Number of TX underflows"); |
| 358 | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, |
| 359 | "rx_overflow", CTLFLAG_RW, &sc->stats.rx_overflow, |
| 360 | 0, "Number of RX overflows"); |
| 361 | #ifdef ARGE_DEBUG |
no test coverage detected