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

(cherry picked from commit a2cac544a668d2834ed41986aca32b44b9819c89)

Details

Provenance
zleiAuthored on Jul 3 2024, 1:14 PM
Reviewer
glebius
Differential Revision
D45757: if_clone: Allow maxunit to be zero
Parents
rG4ecd329b73fa: sys: Retire the ISCSI_INITIATOR_DEBUG option
Branches
Unknown
Tags
Unknown