Page MenuHomeFreeBSD

if_clone: rework cloning KPI
ClosedPublic

Authored by melifaro on Sep 20 2022, 11:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 27, 5:48 AM
Unknown Object (File)
Sat, Apr 27, 5:48 AM
Unknown Object (File)
Sat, Apr 27, 5:47 AM
Unknown Object (File)
Sat, Apr 27, 5:47 AM
Unknown Object (File)
Sat, Apr 27, 3:52 AM
Unknown Object (File)
Dec 23 2023, 7:39 AM
Unknown Object (File)
Dec 12 2023, 10:33 AM
Unknown Object (File)
Nov 30 2023, 7:41 PM
Subscribers

Details

Summary

The immediate problem is an inability to use the KPI from the kernel itself. Some of the cloned drivers require additional information provided via the opaque pointer and it is not possible to specify whether this pointer references kernel-space or user-space.
Instead of just adding a flag, try to generalise the KPI so the next changes can be performed without touching all of the users.
Unify current notion of SIMPLE and ADVANCED users.
Customers of the former rely on the framework to select the interface unit. Small amount of users also use 'minXXX' to auto-create (and preserve) a single interface such as 'pflog0'. Address the first part by requesting auto-unit selection via IFC_C_AUTOUNIT flag. Remove the ability to automatic interface creation as it won't allow to submit custom data to the interface, limiting its usage.
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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

melifaro edited the summary of this revision. (Show Details)

add ifc_copyout()

sys/net/if_clone.c
207–226

Should go to the beginning of the function per style.

I have no objection in the planned changes. The suggested KPI is definitely better than existing, which lacks possibility to specify more params to cloner. I don't want to put "reviewed by", since I didn't invest much time into the problem.

This revision was not accepted when it landed; it landed in state Needs Review.Sep 22 2022, 10:21 AM
This revision was automatically updated to reflect the committed changes.