HomeFreeBSD

iflib: Make if_shared_ctx_t a pointer to const

Description

iflib: Make if_shared_ctx_t a pointer to const

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.

DEVICE_REGISTER() still returns a void * and so the per-driver sctx
structures are not yet defined with the const qualifier.

Reviewed by: gallatin, erj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29102

(cherry picked from commit ffe3def903a5f239c319e5fe12450659658974a5)

Details

Provenance
markjAuthored on Mar 8 2021, 5:39 PM
Reviewer
gallatin
Differential Revision
D29102: iflib: Make if_shared_ctx_t a pointer to const
Parents
rG3aa6cc000f74: ofwfb: fix boot on LE
Branches
Unknown
Tags
Unknown