mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-03 10:10:35 +01:00
Some drivers will reject an invalid MTU size with EINVAL. Quote from [1]: While investigating, I did notice that do_change_link in nm-linux-platform.c really ought to count -EINVAL as an MTU out-of-range error and not just -ERANGE. Even if the hardware supports a large MTU, if the transmit FIFO is set too small, stmmac_change_mtu [2] will return -EINVAL. For example, on my device, the maxmtu is 9000 but in practice I can't set an MTU larger than 4096 unless I first run ethtool --set-channels eno1 tx 3. [1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1198#note_1738311 [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c?h=v6.1#n5577 |
||
|---|---|---|
| .. | ||
| tests | ||
| wifi | ||
| wpan | ||
| meson.build | ||
| nm-linux-platform.c | ||
| nm-linux-platform.h | ||
| nm-netlink.c | ||
| nm-netlink.h | ||
| nm-platform-private.h | ||
| nm-platform-utils.c | ||
| nm-platform-utils.h | ||
| nm-platform.c | ||
| nm-platform.h | ||
| nmp-base.c | ||
| nmp-base.h | ||
| nmp-global-tracker.c | ||
| nmp-global-tracker.h | ||
| nmp-netns.c | ||
| nmp-netns.h | ||
| nmp-object.c | ||
| nmp-object.h | ||
| nmp-plobj.c | ||
| nmp-plobj.h | ||
| README.md | ||
libnm-platform
A static helper library that provides NMPlatform and other utils.
This is NetworkManager's internal netlink library, but also contains
helpers for sysfs, ethtool and other kernel APIs.
NMPlaform is also a cache of objects of the netlink API: NMPCache
and NMPObject. These objects are used throughout NetworkManager
also for generally tracking information about these types. For example,
NMPlatformIP4Address (the public part of a certain type of NMPObject)
is not only used to track platform addresses from netlink in the cache,
but to track information about IPv4 addresses in general.
This depends on the following helper libraries