diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c index 9e2eb63594..394ca7c3a7 100644 --- a/libnm-core/nm-utils.c +++ b/libnm-core/nm-utils.c @@ -2341,7 +2341,7 @@ static const NMVariantAttributeSpec *const tc_qdisc_fq_codel_spec[] = { /* kernel clamps the value at 2^31. Possibly such values should be rejected from configuration * as they cannot be configured. Leaving the attribute unspecified causes kernel to choose * a default (currently 32MB). */ - NM_VARIANT_ATTRIBUTE_SPEC_DEFINE ("memory", G_VARIANT_TYPE_UINT32, ), + NM_VARIANT_ATTRIBUTE_SPEC_DEFINE ("memory_limit", G_VARIANT_TYPE_UINT32, ), NM_VARIANT_ATTRIBUTE_SPEC_DEFINE ("ecn", G_VARIANT_TYPE_BOOLEAN, .no_value = TRUE, ), NULL, diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 22ccabb26e..e2a5fd4bf2 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -6539,7 +6539,7 @@ tc_commit (NMDevice *self) GET_ATTR("interval", qdisc->fq_codel.interval, UINT32, uint32, 0); GET_ATTR("quantum", qdisc->fq_codel.quantum, UINT32, uint32, 0); GET_ATTR("ce_threshold", qdisc->fq_codel.ce_threshold, UINT32, uint32, NM_PLATFORM_FQ_CODEL_CE_THRESHOLD_DISABLED); - GET_ATTR("memory", qdisc->fq_codel.memory, UINT32, uint32, NM_PLATFORM_FQ_CODEL_MEMORY_LIMIT_UNSET); + GET_ATTR("memory_limit", qdisc->fq_codel.memory_limit, UINT32, uint32, NM_PLATFORM_FQ_CODEL_MEMORY_LIMIT_UNSET); GET_ATTR("ecn", qdisc->fq_codel.ecn, BOOLEAN, boolean, FALSE); } diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 2e11052e1a..9721ff9403 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -3516,7 +3516,7 @@ _new_from_nl_qdisc (struct nlmsghdr *nlh, gboolean id_only) obj->qdisc.info = tcm->tcm_info; if (nm_streq0 (obj->qdisc.kind, "fq_codel")) { - obj->qdisc.fq_codel.memory = NM_PLATFORM_FQ_CODEL_MEMORY_LIMIT_UNSET; + obj->qdisc.fq_codel.memory_limit = NM_PLATFORM_FQ_CODEL_MEMORY_LIMIT_UNSET; obj->qdisc.fq_codel.ce_threshold = NM_PLATFORM_FQ_CODEL_CE_THRESHOLD_DISABLED; } @@ -3549,7 +3549,7 @@ _new_from_nl_qdisc (struct nlmsghdr *nlh, gboolean id_only) obj->qdisc.fq_codel.ce_threshold = nla_get_u32 (options_attr); break; case TCA_FQ_CODEL_MEMORY_LIMIT: - obj->qdisc.fq_codel.memory = nla_get_u32 (options_attr); + obj->qdisc.fq_codel.memory_limit = nla_get_u32 (options_attr); break; case TCA_FQ_CODEL_ECN: obj->qdisc.fq_codel.ecn = !!nla_get_u32 (options_attr); @@ -4246,8 +4246,8 @@ _nl_msg_new_qdisc (int nlmsg_type, NLA_PUT_U32 (msg, TCA_FQ_CODEL_QUANTUM, qdisc->fq_codel.quantum); if (qdisc->fq_codel.ce_threshold != NM_PLATFORM_FQ_CODEL_CE_THRESHOLD_DISABLED) NLA_PUT_U32 (msg, TCA_FQ_CODEL_CE_THRESHOLD, qdisc->fq_codel.ce_threshold); - if (qdisc->fq_codel.memory != NM_PLATFORM_FQ_CODEL_MEMORY_LIMIT_UNSET) - NLA_PUT_U32 (msg, TCA_FQ_CODEL_MEMORY_LIMIT, qdisc->fq_codel.memory); + if (qdisc->fq_codel.memory_limit != NM_PLATFORM_FQ_CODEL_MEMORY_LIMIT_UNSET) + NLA_PUT_U32 (msg, TCA_FQ_CODEL_MEMORY_LIMIT, qdisc->fq_codel.memory_limit); if (qdisc->fq_codel.ecn) NLA_PUT_U32 (msg, TCA_FQ_CODEL_ECN, qdisc->fq_codel.ecn); } diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index cbf9eed5c1..ea73f21019 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -6455,8 +6455,8 @@ nm_platform_qdisc_to_string (const NMPlatformQdisc *qdisc, char *buf, gsize len) nm_utils_strbuf_append (&buf, &len, " quantum %u", qdisc->fq_codel.quantum); if (qdisc->fq_codel.ce_threshold != NM_PLATFORM_FQ_CODEL_CE_THRESHOLD_DISABLED) nm_utils_strbuf_append (&buf, &len, " ce_threshold %u", qdisc->fq_codel.ce_threshold); - if (qdisc->fq_codel.memory != NM_PLATFORM_FQ_CODEL_MEMORY_LIMIT_UNSET) - nm_utils_strbuf_append (&buf, &len, " memory %u", qdisc->fq_codel.memory); + if (qdisc->fq_codel.memory_limit != NM_PLATFORM_FQ_CODEL_MEMORY_LIMIT_UNSET) + nm_utils_strbuf_append (&buf, &len, " memory_limit %u", qdisc->fq_codel.memory_limit); if (qdisc->fq_codel.ecn) nm_utils_strbuf_append (&buf, &len, " ecn"); } @@ -6482,7 +6482,7 @@ nm_platform_qdisc_hash_update (const NMPlatformQdisc *obj, NMHashState *h) obj->fq_codel.interval, obj->fq_codel.quantum, obj->fq_codel.ce_threshold, - obj->fq_codel.memory, + obj->fq_codel.memory_limit, NM_HASH_COMBINE_BOOLS (guint8, obj->fq_codel.ecn)); } @@ -6506,7 +6506,7 @@ nm_platform_qdisc_cmp (const NMPlatformQdisc *a, const NMPlatformQdisc *b) NM_CMP_FIELD (a, b, fq_codel.interval); NM_CMP_FIELD (a, b, fq_codel.quantum); NM_CMP_FIELD (a, b, fq_codel.ce_threshold); - NM_CMP_FIELD (a, b, fq_codel.memory); + NM_CMP_FIELD (a, b, fq_codel.memory_limit); NM_CMP_FIELD_UNSAFE (a, b, fq_codel.ecn); } diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h index d7c388b1b8..5a0efceca7 100644 --- a/src/platform/nm-platform.h +++ b/src/platform/nm-platform.h @@ -615,7 +615,7 @@ typedef struct { * netlink attribute but also as the special value 0x83126E97u * (NM_PLATFORM_FQ_CODEL_CE_THRESHOLD_DISABLED). * Beware: zero is not the default you must always explicitly set this value. */ - guint32 memory; /* TCA_FQ_CODEL_MEMORY_LIMIT: note that only values <= 2^31 are accepted by kernel + guint32 memory_limit; /* TCA_FQ_CODEL_MEMORY_LIMIT: note that only values <= 2^31 are accepted by kernel * and kernel defaults to 32MB. * Note that we use the special value NM_PLATFORM_FQ_CODEL_MEMORY_LIMIT_UNSET * to indicate that no explicit limit is set (when we send a RTM_NEWQDISC request).