HomeFreeBSD

if_clone: Allow maxunit to be zero

Description

if_clone: Allow maxunit to be zero

Some drivers, e.g. if_enc(4), only allow one instance to be created, but
the KPI ifc_attach_cloner() treat zero value of maxunit as not limited,
aka IF_MAXUNIT.

Introduce a new flag IFC_F_LIMITUNIT to indicate that the requested
maxunit is limited and should be respected.

Consumers should use the new flag if there is an intended limit.

Reviewed by: glebius
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D45757

Details

Provenance
zleiAuthored on Wed, Jul 3, 1:14 PM
Reviewer
glebius
Differential Revision
D45757: if_clone: Allow maxunit to be zero
Parents
rGa1cfe4c7646b: style(9): Delete __FBSDID straggler
Branches
Unknown
Tags
Unknown