mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-18 05:48:11 +02:00
Introduce some basic infrastructure to perform ethtool operations via netlink. As a proof of concept, implement the pause settings. Netlink has some advantages over ioctl(): - it can be easily extended with new attributes; - it can return descriptive error messages via the extended ack mechanism. For example, when setting the ring parameters to a value outside the allowed range, userspace receives error code -EINVAL and message "requested ring size exceeds maximum". ioctl() gets only -EINVAL, which is shared among many error reasons; - since it's possible to specify an ifindex in the request, there are no race conditions when the interface name changes; New ethtool API is available only via netlink; however it makes sense to start using netlink also for the old API that NM is already using (pause, eee, rings, etc.) over ioctl() because of the advantages described above.
30 lines
648 B
Meson
30 lines
648 B
Meson
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
libnm_platform = static_library(
|
|
'nm-platform',
|
|
sources: [
|
|
'nm-linux-platform.c',
|
|
'nm-netlink.c',
|
|
'nm-platform-utils.c',
|
|
'nm-platform.c',
|
|
'nmp-base.c',
|
|
'nmp-global-tracker.c',
|
|
'nmp-netns.c',
|
|
'nmp-object.c',
|
|
'nmp-plobj.c',
|
|
'nmp-ethtool.c',
|
|
'nmp-ethtool-ioctl.c',
|
|
'devlink/nm-devlink.c',
|
|
'wifi/nm-wifi-utils-nl80211.c',
|
|
'wifi/nm-wifi-utils.c',
|
|
'wpan/nm-wpan-utils.c',
|
|
] + (enable_wext ? [ 'wifi/nm-wifi-utils-wext.c' ] : []),
|
|
include_directories: [
|
|
src_inc,
|
|
top_inc,
|
|
],
|
|
dependencies: [
|
|
glib_dep,
|
|
libudev_dep,
|
|
],
|
|
)
|