diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2020-06-18 13:28:53 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2020-07-08 09:43:06 +0200 |
commit | d0d35aa278da490408f33ee90e30d556e22bc647 (patch) | |
tree | a05ddc826ce26b2ec6a50c5176562bace805496a | |
parent | a5133e708e85e02b9cbf199c0840e00f118b59c7 (diff) | |
download | NetworkManager-d0d35aa278da490408f33ee90e30d556e22bc647.tar.gz |
platform: support creation of prio qdisc
Support the creation of parameterless 'prio' qdiscs. The kernel needs
a TCA_OPTIONS attribute initialized with default values. We currently
don't support modifying the qdisc parameters.
-rw-r--r-- | src/platform/nm-linux-platform.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index a0edd13c9e..40451df820 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -4757,6 +4757,10 @@ _nl_msg_new_qdisc (int nlmsg_type, NLA_PUT_U32 (msg, TCA_TBF_BURST, qdisc->tbf.burst); nla_nest_end (msg, tc_options); + } else if (nm_streq (qdisc->kind, "prio")) { + struct tc_prio_qopt opt = {3, { 1, 2, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 } }; + + NLA_PUT (msg, TCA_OPTIONS, sizeof (opt), &opt); } else { if (!(tc_options = nla_nest_start (msg, TCA_OPTIONS))) goto nla_put_failure; |