HomeFreeBSD

if_clone: rework cloning KPI

Description

if_clone: rework cloning KPI

The current cloning KPI does not provide a way of creating interfaces
with parameres from within kernel. The reason is that those parameters
are passed as an opaque pointer and it is not possible to specify whether
this pointer references kernel-space or user-space.
Instead of just adding a flag, generalise the KPI to simplify the
extension process. Unify current notion of SIMPLE and ADVANCED users
by leveraging newly-added IFC_C_AUTOUNIT flag to automatically pick
unit number, which is a primary feature of the "SIMPLE" KPI.
Use extendable structures everywhere instead of passing function
pointers or parameters.
Isolate all parts of the oldKPI under CLONE_COMPAT_13 so it can be safely
merged back to 13. Old KPI will be removed after the merge.

Differential Revision: https://reviews.freebsd.org/D36632
MFC after: 2 weeks

Details

Provenance
melifaroAuthored on Sep 22 2022, 9:37 AM
Differential Revision
D36632: if_clone: rework cloning KPI
Parents
rG5ae83e0d871b: tcp: send ACKs when requested
Branches
Unknown
Tags
Unknown