diff options
author | arybchik <arybchik@FreeBSD.org> | 2015-03-25 13:14:50 +0000 |
---|---|---|
committer | arybchik <arybchik@FreeBSD.org> | 2015-03-25 13:14:50 +0000 |
commit | 972b15c05bea48b1bc013937857148c51da0c635 (patch) | |
tree | d0bf6e26e87fd6f238e4228cf119f5234940c3b5 | |
parent | 9c325f67a8ec98bb5373baef3fbea78e5d25b272 (diff) | |
download | FreeBSD-src-972b15c05bea48b1bc013937857148c51da0c635.zip FreeBSD-src-972b15c05bea48b1bc013937857148c51da0c635.tar.gz |
MFC: 279231
sfxge: add put-list high watermark
It is interesting to know how long put-list grows.
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)
-rw-r--r-- | sys/dev/sfxge/sfxge_tx.c | 7 | ||||
-rw-r--r-- | sys/dev/sfxge/sfxge_tx.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/sfxge/sfxge_tx.c b/sys/dev/sfxge/sfxge_tx.c index a3a1788..72a4b5b 100644 --- a/sys/dev/sfxge/sfxge_tx.c +++ b/sys/dev/sfxge/sfxge_tx.c @@ -214,6 +214,9 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq *txq) count++; } while (mbuf != NULL); + if (count > stdp->std_put_hiwat) + stdp->std_put_hiwat = count; + /* Append the reversed put list to the get list. */ KASSERT(*get_tailp == NULL, ("*get_tailp != NULL")); *stdp->std_getp = get_next; @@ -1484,6 +1487,10 @@ sfxge_tx_qinit(struct sfxge_softc *sc, unsigned int txq_index, SYSCTL_CHILDREN(txq_node), OID_AUTO, "dpl_get_hiwat", CTLFLAG_RD | CTLFLAG_STATS, &stdp->std_get_hiwat, 0, ""); + SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), + SYSCTL_CHILDREN(txq_node), OID_AUTO, + "dpl_put_hiwat", CTLFLAG_RD | CTLFLAG_STATS, + &stdp->std_put_hiwat, 0, ""); #endif txq->type = type; diff --git a/sys/dev/sfxge/sfxge_tx.h b/sys/dev/sfxge/sfxge_tx.h index 3965ffd..ae7594b 100644 --- a/sys/dev/sfxge/sfxge_tx.h +++ b/sys/dev/sfxge/sfxge_tx.h @@ -102,6 +102,8 @@ struct sfxge_tx_dpl { * in get list */ unsigned int std_get_hiwat; /* Packets in get list * high watermark */ + unsigned int std_put_hiwat; /* Packets in put list + * high watermark */ }; |