diff options
author | np <np@FreeBSD.org> | 2011-05-14 19:27:15 +0000 |
---|---|---|
committer | np <np@FreeBSD.org> | 2011-05-14 19:27:15 +0000 |
commit | c6747f320fddded1edb9acf52d9fa864cc9cb6df (patch) | |
tree | c2abfd11ebd7e5b90ce2b9b604ecd93c82608734 | |
parent | 387ef8790329e0907b9c706a0790034cbef7d9ee (diff) | |
download | FreeBSD-src-c6747f320fddded1edb9acf52d9fa864cc9cb6df.zip FreeBSD-src-c6747f320fddded1edb9acf52d9fa864cc9cb6df.tar.gz |
sysctl that displays the absolute queue id of an rxq.
-rw-r--r-- | sys/dev/cxgbe/t4_sge.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 5440528..5f59db6 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -141,6 +141,7 @@ static int handle_sge_egr_update(struct adapter *, const struct cpl_sge_egr_update *); static int ctrl_tx(struct adapter *, struct sge_ctrlq *, struct mbuf *); +static int sysctl_abs_id(SYSCTL_HANDLER_ARGS); extern void filter_rpl(struct adapter *, const struct cpl_set_tcb_rpl *); @@ -1363,6 +1364,9 @@ alloc_rxq(struct port_info *pi, struct sge_rxq *rxq, int intr_idx, int idx) NULL, "rx queue"); children = SYSCTL_CHILDREN(oid); + SYSCTL_ADD_PROC(&pi->ctx, children, OID_AUTO, "abs_id", + CTLTYPE_INT | CTLFLAG_RD, &rxq->iq.abs_id, 0, sysctl_abs_id, "I", + "absolute id of the queue"); #ifdef INET SYSCTL_ADD_INT(&pi->ctx, children, OID_AUTO, "lro_queued", CTLFLAG_RD, &rxq->lro.lro_queued, 0, NULL); @@ -2733,3 +2737,12 @@ failed: return (rc); } + +static int +sysctl_abs_id(SYSCTL_HANDLER_ARGS) +{ + uint16_t *id = arg1; + int i = *id; + + return sysctl_handle_int(oidp, &i, 0, req); +} |