| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * net/sched/sch_mqprio.c |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2010 John Fastabend <john.r.fastabend@intel.com> |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or |
|---|
| 7 | | - * modify it under the terms of the GNU General Public License |
|---|
| 8 | | - * version 2 as published by the Free Software Foundation. |
|---|
| 9 | 6 | */ |
|---|
| 10 | 7 | |
|---|
| 11 | 8 | #include <linux/types.h> |
|---|
| .. | .. |
|---|
| 125 | 122 | int nested_len = nla_len(nla) - NLA_ALIGN(len); |
|---|
| 126 | 123 | |
|---|
| 127 | 124 | if (nested_len >= nla_attr_size(0)) |
|---|
| 128 | | - return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len), |
|---|
| 129 | | - nested_len, policy, NULL); |
|---|
| 125 | + return nla_parse_deprecated(tb, maxtype, |
|---|
| 126 | + nla_data(nla) + NLA_ALIGN(len), |
|---|
| 127 | + nested_len, policy, NULL); |
|---|
| 130 | 128 | |
|---|
| 131 | 129 | memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1)); |
|---|
| 132 | 130 | return 0; |
|---|
| .. | .. |
|---|
| 349 | 347 | int i; |
|---|
| 350 | 348 | |
|---|
| 351 | 349 | if (priv->flags & TC_MQPRIO_F_MIN_RATE) { |
|---|
| 352 | | - nest = nla_nest_start(skb, TCA_MQPRIO_MIN_RATE64); |
|---|
| 350 | + nest = nla_nest_start_noflag(skb, TCA_MQPRIO_MIN_RATE64); |
|---|
| 353 | 351 | if (!nest) |
|---|
| 354 | 352 | goto nla_put_failure; |
|---|
| 355 | 353 | |
|---|
| .. | .. |
|---|
| 363 | 361 | } |
|---|
| 364 | 362 | |
|---|
| 365 | 363 | if (priv->flags & TC_MQPRIO_F_MAX_RATE) { |
|---|
| 366 | | - nest = nla_nest_start(skb, TCA_MQPRIO_MAX_RATE64); |
|---|
| 364 | + nest = nla_nest_start_noflag(skb, TCA_MQPRIO_MAX_RATE64); |
|---|
| 367 | 365 | if (!nest) |
|---|
| 368 | 366 | goto nla_put_failure; |
|---|
| 369 | 367 | |
|---|
| .. | .. |
|---|
| 568 | 566 | sch = dev_queue->qdisc_sleeping; |
|---|
| 569 | 567 | if (gnet_stats_copy_basic(qdisc_root_sleeping_running(sch), d, |
|---|
| 570 | 568 | sch->cpu_bstats, &sch->bstats) < 0 || |
|---|
| 571 | | - gnet_stats_copy_queue(d, NULL, |
|---|
| 572 | | - &sch->qstats, sch->q.qlen) < 0) |
|---|
| 569 | + qdisc_qstats_copy(d, sch) < 0) |
|---|
| 573 | 570 | return -1; |
|---|
| 574 | 571 | } |
|---|
| 575 | 572 | return 0; |
|---|