Page MenuHomeFreeBSD

sysctl+kern_sysctl: Honor SKIP for descendant nodes
ClosedPublic

Authored by freqlabs on Oct 17 2020, 5:27 PM.

Details

Summary

Ensure we also skip descendants of SKIP nodes when iterating through children of an explicitly specified node.

Reported by: np
Sponsored by: iXsystems, Inc.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

np requested changes to this revision.Oct 18 2020, 7:34 AM

I don't see any change in behavior. My test setup has a T6 card and cxgbe(4) is loaded. Then I run

# sysctl dev.t6nex.0

I do not expect to see dev.t6nex.0.misc or anything underneath it because misc is marked SKIP. But it shows up, even after applying the patch in this review to /sbin/sysctl.

This revision now requires changes to proceed.Oct 18 2020, 7:34 AM

Ok I see the problem. We don't get nodes when iterating, so the skip node never gets seen for this to skip its descendants. Back to the drawing board, then.

The page fault in t4_get_lb_stats with my T580-LP-SO-CR was fun.
I have fixed CTL_SYSCTL_NEXTNOSKIP so it doesn't skip nodes, will update the diffs soon.

The page fault in t4_get_lb_stats with my T580-LP-SO-CR was fun.

Please file a bug for this, stack included, and assign it to me.

freqlabs retitled this revision from sysctl: Honor SKIP for descendant nodes to sysctl+kern_sysctl: Honor SKIP for descendant nodes.

Don't skip nodes when iterating with NEXTNOSKIP.

Fixed edge cases where first child is a skip node and where descendants of a skip node are also flagged with skip.

Actually works now after testing with fixed cxl driver.

This revision is now accepted and ready to land.Oct 21 2020, 10:07 PM