summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarybchik <arybchik@FreeBSD.org>2015-02-24 06:09:31 +0000
committerarybchik <arybchik@FreeBSD.org>2015-02-24 06:09:31 +0000
commitfa8630798cb68d399f17a2202982f0ce4ce6adbb (patch)
tree59ad3e453271534fdc88226f56fccec2630bef6d
parent207c0d5532afdd0c2e9620c80b9d804f02769757 (diff)
downloadFreeBSD-src-fa8630798cb68d399f17a2202982f0ce4ce6adbb.zip
FreeBSD-src-fa8630798cb68d399f17a2202982f0ce4ce6adbb.tar.gz
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.c7
-rw-r--r--sys/dev/sfxge/sfxge_tx.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/sfxge/sfxge_tx.c b/sys/dev/sfxge/sfxge_tx.c
index a7263c8..7622086 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;
@@ -1485,6 +1488,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 c7a8c12..38309a3 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 */
};
OpenPOWER on IntegriCloud