Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 May 2011 19:27:15 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r221911 - head/sys/dev/cxgbe
Message-ID:  <201105141927.p4EJRF5C013024@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
+}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105141927.p4EJRF5C013024>