diff options
author | sephe <sephe@FreeBSD.org> | 2016-04-27 06:49:16 +0000 |
---|---|---|
committer | sephe <sephe@FreeBSD.org> | 2016-04-27 06:49:16 +0000 |
commit | bfb191f240107e9d6573c5106848927ba7b82ec6 (patch) | |
tree | 04b242625236262f3eb3ca1e6a9400aa76e29a0c | |
parent | 4db0839c2cca96408065b0dd4ac862683e879baf (diff) | |
download | FreeBSD-src-bfb191f240107e9d6573c5106848927ba7b82ec6.zip FreeBSD-src-bfb191f240107e9d6573c5106848927ba7b82ec6.tar.gz |
hyperv/hn: Add stat for # of chimney sending tries
MFC after: 1 week
Sponsored by: Microsoft OSTC
-rw-r--r-- | sys/dev/hyperv/netvsc/hv_net_vsc.h | 1 | ||||
-rw-r--r-- | sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/hyperv/netvsc/hv_net_vsc.h b/sys/dev/hyperv/netvsc/hv_net_vsc.h index 39588ea..e5020cf 100644 --- a/sys/dev/hyperv/netvsc/hv_net_vsc.h +++ b/sys/dev/hyperv/netvsc/hv_net_vsc.h @@ -1211,6 +1211,7 @@ struct hn_tx_ring { u_long hn_send_failed; u_long hn_txdma_failed; u_long hn_tx_collapsed; + u_long hn_tx_chimney_tried; u_long hn_tx_chimney; u_long hn_pkts; diff --git a/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c b/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c index 3556677..29cb0ba 100644 --- a/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c +++ b/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c @@ -1004,6 +1004,7 @@ hn_encap(struct hn_tx_ring *txr, struct hn_txdesc *txd, struct mbuf **m_head0) netvsc_dev *net_dev = txr->hn_sc->net_dev; uint32_t send_buf_section_idx; + txr->hn_tx_chimney_tried++; send_buf_section_idx = hv_nv_get_next_send_section(net_dev); if (send_buf_section_idx != @@ -2595,6 +2596,10 @@ hn_create_tx_data(struct hn_softc *sc, int ring_cnt) CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, __offsetof(struct hn_tx_ring, hn_tx_chimney), hn_tx_stat_ulong_sysctl, "LU", "# of chimney send"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "tx_chimney_tried", + CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, + __offsetof(struct hn_tx_ring, hn_tx_chimney_tried), + hn_tx_stat_ulong_sysctl, "LU", "# of chimney send tries"); SYSCTL_ADD_INT(ctx, child, OID_AUTO, "txdesc_cnt", CTLFLAG_RD, &sc->hn_tx_ring[0].hn_txdesc_cnt, 0, "# of total TX descs"); |