diff options
| author | Gleb Smirnoff <glebius@FreeBSD.org> | 2024-12-03 20:04:18 +0000 |
|---|---|---|
| committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2024-12-03 20:04:18 +0000 |
| commit | a034c0aeccd899a5872333625771df278e0a8ba7 (patch) | |
| tree | 2aebd441a771430f95e127f1f2fc2586927f7e42 /sys/modules | |
| parent | edf5608bfef3840718bf31b453efb714ef290f31 (diff) | |
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
Diffstat (limited to 'sys/modules')
| -rw-r--r-- | sys/modules/netlink/Makefile | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/modules/netlink/Makefile b/sys/modules/netlink/Makefile index 6835be6e7bd7..4abef5106899 100644 --- a/sys/modules/netlink/Makefile +++ b/sys/modules/netlink/Makefile @@ -10,7 +10,6 @@ SRCS+= opt_inet.h opt_inet6.h opt_route.h CFLAGS+= -DNETLINK_MODULE EXPORT_SYMS= -EXPORT_SYMS+= nlmsg_get_chain_writer EXPORT_SYMS+= nlmsg_refill_buffer EXPORT_SYMS+= nlmsg_end EXPORT_SYMS+= nlmsg_flush |
