]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
netlink: refactor control data generation for recvmsg(2)
authorGleb Smirnoff <glebius@FreeBSD.org>
Tue, 2 Jan 2024 21:05:46 +0000 (13:05 -0800)
committerGleb Smirnoff <glebius@FreeBSD.org>
Tue, 2 Jan 2024 21:05:46 +0000 (13:05 -0800)
commitff5ad900d2a0793659241eee96be53e6053b5081
treeaeca726a4e07344679772ae53f5b1904b6900080
parent7e19c0186f001902efdc265139a9233b7a37eef1
netlink: refactor control data generation for recvmsg(2)

Netlink should return a very simple control data on every recvmsg(2)
syscall.  This data is associated with a syscall, not with an nlmsg,
neither with internal our internal representation (nl_bufs).  There is
no need to pre-allocate it in non-sleepable context and attach to
nl_buf.  Allocate right in the syscall with M_WAITOK.  This also
shaves lots of code and simplifies things.

Reviewed by: melifaro
Differential Revision: https://reviews.freebsd.org/D42989
sys/netlink/netlink_domain.c
sys/netlink/netlink_io.c
sys/netlink/netlink_var.h