Page MenuHomeFreeBSD

iflib: Make if_shared_ctx_t a pointer to const
ClosedPublic

Authored by markj on Mar 5 2021, 9:10 PM.
Tags
None
Referenced Files
F107086016: D29102.id85342.diff
Thu, Jan 9, 9:38 PM
Unknown Object (File)
Dec 10 2024, 5:07 AM
Unknown Object (File)
Nov 25 2024, 12:49 AM
Unknown Object (File)
Nov 19 2024, 3:29 AM
Unknown Object (File)
Nov 12 2024, 12:00 PM
Unknown Object (File)
Nov 10 2024, 1:23 AM
Unknown Object (File)
Nov 8 2024, 2:59 PM
Unknown Object (File)
Oct 29 2024, 11:01 AM
Subscribers

Details

Summary

This structure is shared among multiple instances of a driver, so we
should ensure that it doesn't somehow get treated as if there's a
separate instance per interface. This is especially important for
software-only drivers like wg.

We could perhaps make DEVICE_REGISTER return a pointer to const as well,
so the sctx structures themselves could be defined as const. I don't
quite understand what this method is supposed to do in the general case
though, so I didn't modify it.

Diff Detail

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

Event Timeline

markj requested review of this revision.Mar 5 2021, 9:10 PM
sys/net/iflib.h
52

This is the meat of the change, the rest is required to compile after.

This revision is now accepted and ready to land.Mar 5 2021, 10:15 PM
This revision was automatically updated to reflect the committed changes.