]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
iflib: Make if_shared_ctx_t a pointer to const
authorMark Johnston <markj@FreeBSD.org>
Mon, 8 Mar 2021 17:39:06 +0000 (12:39 -0500)
committerMark Johnston <markj@FreeBSD.org>
Mon, 8 Mar 2021 17:39:06 +0000 (12:39 -0500)
commitffe3def903a5f239c319e5fe12450659658974a5
tree0f7d343c3b09e55d4c59e25e5d25e4230d9f5c4c
parent435c7cfb2418fdac48fa53e29e38ef03646b817d
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
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29102
sys/dev/bnxt/if_bnxt.c
sys/dev/e1000/if_em.c
sys/dev/e1000/igb_txrx.c
sys/dev/ixgbe/if_ix.c
sys/dev/ixgbe/if_ixv.c
sys/dev/ixgbe/ix_txrx.c
sys/dev/ixl/if_iavf.c
sys/dev/ixl/if_ixl.c
sys/net/iflib.h