HomeFreeBSD

netlink: refactor writer initialization KPI

Description

netlink: refactor writer initialization KPI

o Allow callers to initialize a writer that will malloc(9) with M_WAITOK.
o Use size_t for expected malloc size.
o Use correct types to initialize a group writer.
o Rename functions into nl_writer_ namespace instead of nlmsg_, cause

they are working on nl_writer, not on nlmsg.

o Make the KPI responsible to sparsely initialize the writer structure.
o Garbage collect chain writer. Fixes 17083b94a915.

All current consumers are left as is, however some may benefit from
M_WAITOK allocation as well as supplying a correct expected size.

Reviewed by: melifaro
Differential Revision: https://reviews.freebsd.org/D47549

Details

Provenance
glebiusAuthored on Dec 3 2024, 8:04 PM
Reviewer
melifaro
Differential Revision
D47549: netlink: refactor writer initialization KPI
Parents
rGedf5608bfef3: netlink: use bitset(9)
Branches
Unknown
Tags
Unknown