Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107494531
D29176.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D29176.diff
View Options
diff --git a/sys/dev/cxgbe/crypto/t4_crypto.c b/sys/dev/cxgbe/crypto/t4_crypto.c
--- a/sys/dev/cxgbe/crypto/t4_crypto.c
+++ b/sys/dev/cxgbe/crypto/t4_crypto.c
@@ -168,6 +168,9 @@
int rx_channel_id;
int tx_channel_id;
u_int active_sessions;
+
+ counter_u64_t stats_queued;
+ counter_u64_t stats_completed;
};
struct ccr_session {
@@ -2128,6 +2131,11 @@
SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "active_sessions",
CTLFLAG_RD, &sc->ports[i].active_sessions, 0,
"Count of active sessions");
+ SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "queued",
+ CTLFLAG_RD, &sc->ports[i].stats_queued, "Requests queued");
+ SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "completed",
+ CTLFLAG_RD, &sc->ports[i].stats_completed,
+ "Requests completed");
}
}
@@ -2141,6 +2149,8 @@
sc->ports[port].rxq = &sc->adapter->sge.rxq[pi->vi->first_rxq];
sc->ports[port].rx_channel_id = pi->rx_c_chan;
sc->ports[port].tx_channel_id = pi->tx_chan;
+ sc->ports[port].stats_queued = counter_u64_alloc(M_WAITOK);
+ sc->ports[port].stats_completed = counter_u64_alloc(M_WAITOK);
_Static_assert(sizeof(sc->port_mask) * NBBY >= MAX_NPORTS - 1,
"Too many ports to fit in port_mask");
sc->port_mask |= 1u << port;
@@ -2199,10 +2209,19 @@
return (0);
}
+static void
+ccr_free_port(struct ccr_softc *sc, int port)
+{
+
+ counter_u64_free(sc->ports[port].stats_queued);
+ counter_u64_free(sc->ports[port].stats_completed);
+}
+
static int
ccr_detach(device_t dev)
{
struct ccr_softc *sc;
+ int i;
sc = device_get_softc(dev);
@@ -2230,6 +2249,9 @@
counter_u64_free(sc->stats_sglist_error);
counter_u64_free(sc->stats_process_error);
counter_u64_free(sc->stats_sw_fallback);
+ for_each_port(sc->adapter, i) {
+ ccr_free_port(sc, i);
+ }
sglist_free(sc->sg_iv_aad);
free(sc->iv_aad_buf, M_CCR);
sc->adapter->ccr_softc = NULL;
@@ -2827,6 +2849,7 @@
s->pending++;
#endif
counter_u64_add(sc->stats_inflight, 1);
+ counter_u64_add(s->port->stats_queued, 1);
} else
counter_u64_add(sc->stats_process_error, 1);
@@ -2871,6 +2894,7 @@
mtx_unlock(&s->lock);
#endif
counter_u64_add(sc->stats_inflight, -1);
+ counter_u64_add(s->port->stats_completed, 1);
switch (s->mode) {
case HASH:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 16, 12:06 AM (17 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15817655
Default Alt Text
D29176.diff (2 KB)
Attached To
Mode
D29176: ccr: Add per-port stats of queued and completed requests.
Attached
Detach File
Event Timeline
Log In to Comment