NetworkManager/src/devices
Thomas Haller 46a904389b platform: fix handling of fq_codel's memory limit default value
The memory-limit is an unsigned integer. It is ugly (if not wrong) to compare unsigned
values with "-1". When comparing with the default value we must also use an u32 type.
Instead add a define NM_PLATFORM_FQ_CODEL_MEMORY_LIMIT_UNSET.

Note that like iproute2 we treat NM_PLATFORM_FQ_CODEL_MEMORY_LIMIT_UNSET
to indicate to not set TCA_FQ_CODEL_MEMORY_LIMIT in RTM_NEWQDISC. This
special value is entirely internal to NetworkManager (or iproute2) and
kernel will then choose a default memory limit (of 32MB). So setting
NM_PLATFORM_FQ_CODEL_MEMORY_LIMIT_UNSET means to leave it to kernel to
choose a value (which then chooses 32MB).

See kernel's net/sched/sch_fq_codel.c:

    static int fq_codel_init(struct Qdisc *sch, struct nlattr *opt,
                             struct netlink_ext_ack *extack)
    {
    ...
            q->memory_limit = 32 << 20; /* 32 MBytes */

    static int fq_codel_change(struct Qdisc *sch, struct nlattr *opt,
                               struct netlink_ext_ack *extack)
    ...
            if (tb[TCA_FQ_CODEL_MEMORY_LIMIT])
                    q->memory_limit = min(1U << 31, nla_get_u32(tb[TCA_FQ_CODEL_MEMORY_LIMIT]));

Note that not having zero as default value is problematic. In fields like
"NMPlatformIP4Route.table_coerced" and "NMPlatformRoutingRule.suppress_prefixlen_inverse"
we avoid this problem by storing a coerced value in the structure so that zero is still
the default. We don't do that here for memory-limit, so the caller must always explicitly
set the value.
2019-05-07 20:58:17 +02:00
..
adsl shared: move udev helper to separate directory "shared/nm-udev-aux" 2019-04-18 19:46:50 +02:00
bluetooth shared: move "nm-dbus-compat.h" header to "nm-std-aux/nm-dbus-compat.h" 2019-04-18 20:03:54 +02:00
ovs shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
team shared: move "nm-dbus-compat.h" header to "nm-std-aux/nm-dbus-compat.h" 2019-04-18 20:03:54 +02:00
tests acd/tests: assert that nm_acd_manager_announce_addresses() did not fail 2019-04-04 09:56:56 +02:00
wifi core: use NM_SETTINGS_GET for singlton instead of nm_settings_get() 2019-05-07 16:04:49 +02:00
wwan modem/broadband: set the gsm.device-id in complete_connection() 2019-05-07 18:19:44 +02:00
meson.build build: add initial support for meson build system 2017-12-13 15:48:50 +01:00
nm-acd-manager.c acd: return error code from nm_acd_manager_start_probe() 2019-04-04 09:56:19 +02:00
nm-acd-manager.h acd: return error code from nm_acd_manager_start_probe() 2019-04-04 09:56:19 +02:00
nm-device-6lowpan.c platform: merge NMPlatformError with nm-error 2018-12-27 21:33:59 +01:00
nm-device-6lowpan.h devices: add NMDevice6Lowpan 2018-06-26 16:21:55 +02:00
nm-device-bond.c all: replace g_strsplit_set() by nm_utils_strsplit_set*() 2019-04-10 15:05:57 +02:00
nm-device-bond.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-bridge.c device: avoid multiple allocations in setting_vlans_to_platform() 2019-04-18 09:53:20 +02:00
nm-device-bridge.h bridge: move the Bluetooth NAP logic to bridge device 2017-06-01 11:57:42 +02:00
nm-device-dummy.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-device-dummy.h core: add support for dummy devices 2017-02-22 21:05:04 +01:00
nm-device-ethernet-utils.c device: fix a wrong comparison 2018-10-06 10:03:48 +02:00
nm-device-ethernet-utils.h settings: use delegation instead of inheritance for NMSettingsConnection and NMConnection 2018-08-28 22:27:55 +02:00
nm-device-ethernet.c libnm: refactor implementation of "ethernet.s390-options" property 2019-04-25 09:22:51 +02:00
nm-device-ethernet.h all: replace non-leading tabs with spaces 2018-02-07 13:32:04 +01:00
nm-device-factory.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-device-factory.h core: device-factory: implement match_connection() 2017-08-05 08:03:16 +02:00
nm-device-generic.c core: give better error reason why device is incompatible with profile 2018-07-24 09:39:09 +02:00
nm-device-generic.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-infiniband.c platform: merge NMPlatformError with nm-error 2018-12-27 21:33:59 +01:00
nm-device-infiniband.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-ip-tunnel.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-device-ip-tunnel.h core/dbus: rework D-Bus implementation to use lower layer GDBusConnection API 2018-03-12 18:37:08 +01:00
nm-device-logging.h Revert "device: log device type too" 2017-10-31 18:48:41 +01:00
nm-device-macsec.c platform: merge NMPlatformError with nm-error 2018-12-27 21:33:59 +01:00
nm-device-macsec.h core/dbus: rework D-Bus implementation to use lower layer GDBusConnection API 2018-03-12 18:37:08 +01:00
nm-device-macvlan.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-device-macvlan.h core/dbus: rework D-Bus implementation to use lower layer GDBusConnection API 2018-03-12 18:37:08 +01:00
nm-device-ppp.c device: merge stage3 and stage4 ip-config function for IPv4 and IPv6 2019-03-05 09:53:21 +01:00
nm-device-ppp.h device: add NMDevicePPP 2017-08-05 08:03:15 +02:00
nm-device-private.h device: limit maximum MTU for connection default of "infiniband.mtu" 2019-04-05 16:27:17 +02:00
nm-device-tun.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-device-tun.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-veth.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-device-veth.h all: cleanup includes in header files 2016-08-17 19:51:17 +02:00
nm-device-vlan.c platform: merge NMPlatformError with nm-error 2018-12-27 21:33:59 +01:00
nm-device-vlan.h core/dbus: rework D-Bus implementation to use lower layer GDBusConnection API 2018-03-12 18:37:08 +01:00
nm-device-vxlan.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-device-vxlan.h core/dbus: rework D-Bus implementation to use lower layer GDBusConnection API 2018-03-12 18:37:08 +01:00
nm-device-wireguard.c device/wireguard: fix memleak for NMDeviceWireGuard 2019-05-03 11:03:08 +02:00
nm-device-wireguard.h core: introduce NMDeviceWireGuard 2018-08-06 08:34:27 +02:00
nm-device-wpan.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-device-wpan.h devices: add NMDeviceWpan 2018-06-26 16:21:54 +02:00
nm-device.c platform: fix handling of fq_codel's memory limit default value 2019-05-07 20:58:17 +02:00
nm-device.h core: don't realize unmanaged software devices 2019-04-12 10:34:20 +02:00
nm-lldp-listener.c shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 19:57:27 +02:00
nm-lldp-listener.h core: refactor private data for NMExportedObject and others 2016-10-03 12:04:14 +02:00