From 7029da5c36f2d3cf6bb6c81bf551229f416399e8 Mon Sep 17 00:00:00 2001 From: Pawel Biernacki Date: Wed, 26 Feb 2020 14:26:36 +0000 Subject: Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- sys/dev/vge/if_vge.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/dev/vge/if_vge.c') diff --git a/sys/dev/vge/if_vge.c b/sys/dev/vge/if_vge.c index 962dc73b3039..14d09e187b2e 100644 --- a/sys/dev/vge/if_vge.c +++ b/sys/dev/vge/if_vge.c @@ -2532,13 +2532,13 @@ vge_sysctl_node(struct vge_softc *sc) resource_int_value(device_get_name(sc->vge_dev), device_get_unit(sc->vge_dev), "tx_coal_pkt", &sc->vge_tx_coal_pkt); - tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD, - NULL, "VGE statistics"); + tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "VGE 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); VGE_SYSCTL_STAT_ADD32(ctx, child, "frames", &stats->rx_frames, "frames"); @@ -2582,8 +2582,8 @@ vge_sysctl_node(struct vge_softc *sc) &stats->rx_lenerrs, "Frames with length mismatched"); /* 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); VGE_SYSCTL_STAT_ADD32(ctx, child, "good_frames", &stats->tx_good_frames, "Good frames"); -- cgit v1.2.3