Page MenuHomeFreeBSD

iflib: Make if_shared_ctx_t a pointer to const

Authored by markj on Mar 5 2021, 9:10 PM.



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

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