diff options
author | Pawel Biernacki <kaktus@FreeBSD.org> | 2020-02-26 14:26:36 +0000 |
---|---|---|
committer | Pawel Biernacki <kaktus@FreeBSD.org> | 2020-02-26 14:26:36 +0000 |
commit | 7029da5c36f2d3cf6bb6c81bf551229f416399e8 (patch) | |
tree | 53cae9da1371117a3ac21d0d0f3f030a692807ae /sys/dev/jme | |
parent | d7313dc6f5fcab29946951936597772dfff6a4be (diff) | |
download | src-7029da5c36f2d3cf6bb6c81bf551229f416399e8.tar.gz src-7029da5c36f2d3cf6bb6c81bf551229f416399e8.zip |
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Mark all obvious cases as MPSAFE. All entries that haven't been marked
as MPSAFE before are by default marked as NEEDGIANT
Approved by: kib (mentor, blanket)
Commented by: kib, gallatin, melifaro
Differential Revision: https://reviews.freebsd.org/D23718
Notes
Notes:
svn path=/head/; revision=358333
Diffstat (limited to 'sys/dev/jme')
-rw-r--r-- | sys/dev/jme/if_jme.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/sys/dev/jme/if_jme.c b/sys/dev/jme/if_jme.c index a4395ce20c72..fc0297e70d26 100644 --- a/sys/dev/jme/if_jme.c +++ b/sys/dev/jme/if_jme.c @@ -994,24 +994,24 @@ jme_sysctl_node(struct jme_softc *sc) child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->jme_dev)); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "tx_coal_to", - CTLTYPE_INT | CTLFLAG_RW, &sc->jme_tx_coal_to, 0, - sysctl_hw_jme_tx_coal_to, "I", "jme tx coalescing timeout"); + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &sc->jme_tx_coal_to, + 0, sysctl_hw_jme_tx_coal_to, "I", "jme tx coalescing timeout"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "tx_coal_pkt", - CTLTYPE_INT | CTLFLAG_RW, &sc->jme_tx_coal_pkt, 0, - sysctl_hw_jme_tx_coal_pkt, "I", "jme tx coalescing packet"); + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &sc->jme_tx_coal_pkt, + 0, sysctl_hw_jme_tx_coal_pkt, "I", "jme tx coalescing packet"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rx_coal_to", - CTLTYPE_INT | CTLFLAG_RW, &sc->jme_rx_coal_to, 0, - sysctl_hw_jme_rx_coal_to, "I", "jme rx coalescing timeout"); + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &sc->jme_rx_coal_to, + 0, sysctl_hw_jme_rx_coal_to, "I", "jme rx coalescing timeout"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rx_coal_pkt", - CTLTYPE_INT | CTLFLAG_RW, &sc->jme_rx_coal_pkt, 0, - sysctl_hw_jme_rx_coal_pkt, "I", "jme rx coalescing packet"); + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &sc->jme_rx_coal_pkt, + 0, sysctl_hw_jme_rx_coal_pkt, "I", "jme rx coalescing packet"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "process_limit", - CTLTYPE_INT | CTLFLAG_RW, &sc->jme_process_limit, 0, - sysctl_hw_jme_proc_limit, "I", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + &sc->jme_process_limit, 0, sysctl_hw_jme_proc_limit, "I", "max number of Rx events to process"); /* Pull in device tunables. */ @@ -1084,13 +1084,13 @@ jme_sysctl_node(struct jme_softc *sc) if ((sc->jme_flags & JME_FLAG_HWMIB) == 0) return; - tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD, - NULL, "JME statistics"); + tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "JME statistics"); parent = SYSCTL_CHILDREN(tree); /* Rx statistics. */ - tree = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "rx", CTLFLAG_RD, - NULL, "Rx MAC statistics"); + tree = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "rx", + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Rx MAC statistics"); child = SYSCTL_CHILDREN(tree); JME_SYSCTL_STAT_ADD32(ctx, child, "good_frames", &stats->rx_good_frames, "Good frames"); @@ -1106,8 +1106,8 @@ jme_sysctl_node(struct jme_softc *sc) &stats->rx_bad_frames, "Bad frames"); /* Tx statistics. */ - tree = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "tx", CTLFLAG_RD, - NULL, "Tx MAC statistics"); + tree = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "tx", + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Tx MAC statistics"); child = SYSCTL_CHILDREN(tree); JME_SYSCTL_STAT_ADD32(ctx, child, "good_frames", &stats->tx_good_frames, "Good frames"); |