Whamcloud - gitweb
LU-9680 utils: add netlink infrastructure 30/34230/36
authorJames Simmons <jsimmons@infradead.org>
Wed, 16 Jun 2021 19:28:13 +0000 (15:28 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 30 Jun 2021 15:25:43 +0000 (15:25 +0000)
commit3c39dac19aaf7f3f4fdee104ce6da92dd1962776
treefc8cbe985bc4685273a12c3a4c0c8cf9caa56665
parent1ce4d064801f30d3498d7e2c55ef3e699e4ef585
LU-9680 utils: add netlink infrastructure

Netlink was designed as a successor to ioctl as defined under
RFC 3549. There are several advantages to using netlink over
ioctls or virtual file system interfaces like proc. Collecting
proc doesn't scale well which was seen with power drain on Android
phones. A netlink implementation was developed to remove this
performance hit. Details can be read at:

https://lwn.net/Articles/406975

Besides the scaling gains the other benefit is the flexiblity
with API changes. Adding or removing information to be transmitted
doesn't require creating a new interface like ioctl do. Instead
you add new code to handle the stream of attributes read from the
socket. Lastly you can multiplex data to N listeners with groups
using one request.

This patch adds netlink handling in a generic way that can be
used by the libyaml library. This greatly lowers the barrier by
only requiring the implementor to understand the libyaml API.

Change-Id: Idcdac653a1f9cc9931238e869c3beadaefcf3410
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/34230
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Ben Evans <beevans@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
19 files changed:
debian/control
debian/control.main
libcfs/autoconf/lustre-libcfs.m4
libcfs/include/libcfs/linux/linux-net.h
libcfs/libcfs/linux/linux-prim.c
lnet/autoconf/lustre-lnet.m4
lnet/include/lnet/lib-types.h
lnet/include/uapi/linux/lnet/Makefile.am
lnet/include/uapi/linux/lnet/lnet-nl.h [new file with mode: 0644]
lnet/klnds/o2iblnd/o2iblnd.h
lnet/lnet/api-ni.c
lnet/utils/Makefile.am
lnet/utils/lnetconfig/Makefile.am
lnet/utils/lnetconfig/liblnetconfig.h
lnet/utils/lnetconfig/liblnetconfig_netlink.c [new file with mode: 0644]
lustre-dkms.spec.in
lustre.spec.in
lustre/tests/lutf/src/Makefile.am
lustre/utils/Makefile.am