forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/net/sched/sch_mqprio.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * net/sched/sch_mqprio.c
34 *
45 * 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.
96 */
107
118 #include <linux/types.h>
....@@ -125,8 +122,9 @@
125122 int nested_len = nla_len(nla) - NLA_ALIGN(len);
126123
127124 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);
130128
131129 memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1));
132130 return 0;
....@@ -349,7 +347,7 @@
349347 int i;
350348
351349 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);
353351 if (!nest)
354352 goto nla_put_failure;
355353
....@@ -363,7 +361,7 @@
363361 }
364362
365363 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);
367365 if (!nest)
368366 goto nla_put_failure;
369367
....@@ -568,8 +566,7 @@
568566 sch = dev_queue->qdisc_sleeping;
569567 if (gnet_stats_copy_basic(qdisc_root_sleeping_running(sch), d,
570568 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)
573570 return -1;
574571 }
575572 return 0;