svn commit: r304485 - head/sys/dev/cxgbe
John Baldwin
jhb at FreeBSD.org
Fri Aug 19 17:54:52 UTC 2016
Author: jhb
Date: Fri Aug 19 17:54:51 2016
New Revision: 304485
URL: https://svnweb.freebsd.org/changeset/base/304485
Log:
Reorder sysctls so that nodes shared with the VF driver are added first.
This permits a single early return for VF devices in the routines that
add sysctl nodes.
Reviewed by: np
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D7512
Modified:
head/sys/dev/cxgbe/t4_main.c
Modified: head/sys/dev/cxgbe/t4_main.c
==============================================================================
--- head/sys/dev/cxgbe/t4_main.c Fri Aug 19 17:54:06 2016 (r304484)
+++ head/sys/dev/cxgbe/t4_main.c Fri Aug 19 17:54:51 2016 (r304485)
@@ -4592,6 +4592,32 @@ t4_sysctls(struct adapter *sc)
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nports", CTLFLAG_RD, NULL,
sc->params.nports, "# of ports");
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "doorbells",
+ CTLTYPE_STRING | CTLFLAG_RD, doorbells, sc->doorbells,
+ sysctl_bitfield, "A", "available doorbells");
+
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO, "core_clock", CTLFLAG_RD, NULL,
+ sc->params.vpd.cclk, "core clock frequency (in KHz)");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "holdoff_timers",
+ CTLTYPE_STRING | CTLFLAG_RD, sc->params.sge.timer_val,
+ sizeof(sc->params.sge.timer_val), sysctl_int_array, "A",
+ "interrupt holdoff timer values (us)");
+
+ SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "holdoff_pkt_counts",
+ CTLTYPE_STRING | CTLFLAG_RD, sc->params.sge.counter_val,
+ sizeof(sc->params.sge.counter_val), sysctl_int_array, "A",
+ "interrupt holdoff packet counter values");
+
+ t4_sge_sysctls(sc, ctx, children);
+
+ sc->lro_timeout = 100;
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO, "lro_timeout", CTLFLAG_RW,
+ &sc->lro_timeout, 0, "lro inactive-flush timeout (in us)");
+
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO, "debug_flags", CTLFLAG_RW,
+ &sc->debug_flags, 0, "flags to enable runtime debugging");
+
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "hw_revision", CTLFLAG_RD,
NULL, chip_rev(sc), "chip hardware revision");
@@ -4612,10 +4638,6 @@ t4_sysctls(struct adapter *sc)
SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "cfcsum", CTLFLAG_RD, NULL,
sc->cfcsum, "config file checksum");
- SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "doorbells",
- CTLTYPE_STRING | CTLFLAG_RD, doorbells, sc->doorbells,
- sysctl_bitfield, "A", "available doorbells");
-
#define SYSCTL_CAP(name, n, text) \
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, #name, \
CTLTYPE_STRING | CTLFLAG_RD, caps_decoder[n], sc->name, \
@@ -4632,19 +4654,6 @@ t4_sysctls(struct adapter *sc)
SYSCTL_CAP(fcoecaps, 8, "FCoE");
#undef SYSCTL_CAP
- SYSCTL_ADD_INT(ctx, children, OID_AUTO, "core_clock", CTLFLAG_RD, NULL,
- sc->params.vpd.cclk, "core clock frequency (in KHz)");
-
- SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "holdoff_timers",
- CTLTYPE_STRING | CTLFLAG_RD, sc->params.sge.timer_val,
- sizeof(sc->params.sge.timer_val), sysctl_int_array, "A",
- "interrupt holdoff timer values (us)");
-
- SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "holdoff_pkt_counts",
- CTLTYPE_STRING | CTLFLAG_RD, sc->params.sge.counter_val,
- sizeof(sc->params.sge.counter_val), sysctl_int_array, "A",
- "interrupt holdoff packet counter values");
-
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nfilters", CTLFLAG_RD,
NULL, sc->tids.nftids, "number of filters");
@@ -4652,15 +4661,6 @@ t4_sysctls(struct adapter *sc)
CTLFLAG_RD, sc, 0, sysctl_temperature, "I",
"chip temperature (in Celsius)");
- t4_sge_sysctls(sc, ctx, children);
-
- sc->lro_timeout = 100;
- SYSCTL_ADD_INT(ctx, children, OID_AUTO, "lro_timeout", CTLFLAG_RW,
- &sc->lro_timeout, 0, "lro inactive-flush timeout (in us)");
-
- SYSCTL_ADD_INT(ctx, children, OID_AUTO, "debug_flags", CTLFLAG_RW,
- &sc->debug_flags, 0, "flags to enable runtime debugging");
-
#ifdef SBUF_DRAIN
/*
* dev.t4nex.X.misc. Marked CTLFLAG_SKIP to avoid information overload.
More information about the svn-src-head
mailing list