Page MenuHomeFreeBSD

ifnet: use ck_pr(3) store & load setting ifnet pointer in ifindex
ClosedPublic

Authored by glebius on Dec 4 2021, 9:15 PM.
Tags
None
Referenced Files
F131283582: D33260.id99448.diff
Mon, Oct 6, 1:21 PM
Unknown Object (File)
Thu, Oct 2, 5:27 AM
Unknown Object (File)
Sun, Sep 21, 12:53 PM
Unknown Object (File)
Sat, Sep 13, 6:12 AM
Unknown Object (File)
Sep 4 2025, 2:19 PM
Unknown Object (File)
Sep 3 2025, 7:24 PM
Unknown Object (File)
Sep 2 2025, 3:47 AM
Unknown Object (File)
Aug 15 2025, 12:03 AM
Subscribers

Details

Summary

The lockless access to the array is protected by the network epoch.

Diff Detail

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

Event Timeline

I think there should only be one function for "store" pointer which is ifnet_setbyindex(); that'll be possible if you consider my comment from D33259; though in the longer term it probably won't matter to have the other one for ifindex_free() as we'd still guarantee that all accesses go through wrapper functions so we can keep changing the internals.

If you can explain the added WASSERT I am fine with this.

sys/net/if.c
416

Contrary to your description, why do you need to add this suddenly here?

sys/net/if.c
416

Can be removed, but it still removed when all index allocation bits are merged into one in D33262

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