Page MenuHomeFreeBSD

ifnet: make V_if_index static to if.c
ClosedPublic

Authored by glebius on Dec 4 2021, 9:16 PM.
Tags
None
Referenced Files
F81624599: D33264.diff
Fri, Apr 19, 4:12 AM
Unknown Object (File)
Jan 6 2024, 10:41 PM
Unknown Object (File)
Dec 25 2023, 8:26 AM
Unknown Object (File)
Dec 20 2023, 8:00 AM
Unknown Object (File)
Dec 11 2023, 11:38 PM
Unknown Object (File)
Nov 18 2023, 6:18 PM
Unknown Object (File)
Nov 15 2023, 10:48 PM
Unknown Object (File)
Aug 31 2023, 12:57 PM
Subscribers

Details

Reviewers
bz
kp
glebius
Group Reviewers
network
Summary

This requires moving net.link.generic sysctl declaration from if_mib.c
to if.c. Ideally if_mib.c needs just to be merged to if.c, but they
have different license texts.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43143
Build 40031: arc lint + arc unit

Event Timeline

sys/net/if.c
321

I'd rather try keep the separation between it and if_mib. (Also, if.c Is huge and worth splitting by itself).

Speaking of static -
Maybe having a SYSCTL_PROC with an V_ifindex accessor function will do?

One might also consider to simply remove the variable declaration from public space and into the implementation(s) -- possibly along with a comment?

Maybe having a SYSCTL_PROC with an V_ifindex accessor function will do?

No, that won't work.

One might also consider to simply remove the variable declaration from public space and into the implementation(s) -- possibly along with a comment?

So don't make it static, remove declaration from if_var.h put the declaration into if_mib.c itself? Will work, but it will leave tempting possibility for other modules in kernel to put declaration, too. And I want to make it private to if.c.

This revision is now accepted and ready to land.Dec 7 2021, 6:04 AM