svn commit: r221911 - head/sys/dev/cxgbe
Navdeep Parhar
np at FreeBSD.org
Sat May 14 19:27:16 UTC 2011
Author: np
Date: Sat May 14 19:27:15 2011
New Revision: 221911
URL: http://svn.freebsd.org/changeset/base/221911
Log:
sysctl that displays the absolute queue id of an rxq.
Modified:
head/sys/dev/cxgbe/t4_sge.c
Modified: head/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- head/sys/dev/cxgbe/t4_sge.c Sat May 14 19:20:13 2011 (r221910)
+++ head/sys/dev/cxgbe/t4_sge.c Sat May 14 19:27:15 2011 (r221911)
@@ -141,6 +141,7 @@ static int handle_sge_egr_update(struct
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 s
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);
+}
More information about the svn-src-all
mailing list