Page MenuHomeFreeBSD

sysctl+kern_sysctl: Honor SKIP for descendant nodes
ClosedPublic

Authored by freqlabs on Oct 17 2020, 5:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 21, 11:38 PM
Unknown Object (File)
Sat, Dec 21, 11:36 PM
Unknown Object (File)
Fri, Dec 6, 5:23 PM
Unknown Object (File)
Nov 17 2024, 10:12 AM
Unknown Object (File)
Oct 29 2024, 12:53 PM
Unknown Object (File)
Oct 25 2024, 5:24 AM
Unknown Object (File)
Oct 25 2024, 5:23 AM
Unknown Object (File)
Oct 25 2024, 5:23 AM
Subscribers

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 - subversion
Lint
Lint Not Applicable
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