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/vte | |
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/vte')
-rw-r--r-- | sys/dev/vte/if_vte.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sys/dev/vte/if_vte.c b/sys/dev/vte/if_vte.c index 0d238eda06dd..b6bf909037e1 100644 --- a/sys/dev/vte/if_vte.c +++ b/sys/dev/vte/if_vte.c @@ -564,11 +564,13 @@ vte_sysctl_node(struct vte_softc *sc) child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->vte_dev)); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "int_rx_mod", - CTLTYPE_INT | CTLFLAG_RW, &sc->vte_int_rx_mod, 0, - sysctl_hw_vte_int_mod, "I", "vte RX interrupt moderation"); + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + &sc->vte_int_rx_mod, 0, sysctl_hw_vte_int_mod, "I", + "vte RX interrupt moderation"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "int_tx_mod", - CTLTYPE_INT | CTLFLAG_RW, &sc->vte_int_tx_mod, 0, - sysctl_hw_vte_int_mod, "I", "vte TX interrupt moderation"); + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + &sc->vte_int_tx_mod, 0, sysctl_hw_vte_int_mod, "I", + "vte TX interrupt moderation"); /* Pull in device tunables. */ sc->vte_int_rx_mod = VTE_IM_RX_BUNDLE_DEFAULT; error = resource_int_value(device_get_name(sc->vte_dev), @@ -596,13 +598,13 @@ vte_sysctl_node(struct vte_softc *sc) } } - tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD, - NULL, "VTE statistics"); + tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "VTE 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); VTE_SYSCTL_STAT_ADD32(ctx, child, "good_frames", &stats->rx_frames, "Good frames"); @@ -625,8 +627,8 @@ vte_sysctl_node(struct vte_softc *sc) &stats->rx_pause_frames, "Pause control 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); VTE_SYSCTL_STAT_ADD32(ctx, child, "good_frames", &stats->tx_frames, "Good frames"); |