diff options
author | Alexander Aring <aring@mojatatu.com> | 2017-12-20 12:35:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-21 12:32:50 -0500 |
commit | e9bc3fa28bae7612f41e3538f241a2f87f629c94 (patch) | |
tree | 5909d2930a9fe800a3da1af973eb465ee7fd28e4 /net/sched/sch_cbq.c | |
parent | 653d6fd68d8e5b43d496ca8a1d38331d515a226b (diff) | |
download | linux-e9bc3fa28bae7612f41e3538f241a2f87f629c94.tar.bz2 |
net: sch: api: add extack support in qdisc_get_rtab
This patch adds extack support for the function qdisc_get_rtab which is
a common used function in the tc subsystem. Callers which are interested
in the receiving error can assign extack to get a more detailed
information why qdisc_get_rtab failed.
Cc: David Ahern <dsahern@gmail.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Alexander Aring <aring@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_cbq.c')
-rw-r--r-- | net/sched/sch_cbq.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index bb7e4ccd7caf..79f081eb6bb0 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c @@ -1156,7 +1156,7 @@ static int cbq_init(struct Qdisc *sch, struct nlattr *opt, r = nla_data(tb[TCA_CBQ_RATE]); - q->link.R_tab = qdisc_get_rtab(r, tb[TCA_CBQ_RTAB]); + q->link.R_tab = qdisc_get_rtab(r, tb[TCA_CBQ_RTAB], extack); if (!q->link.R_tab) return -EINVAL; @@ -1484,7 +1484,7 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **t if (tb[TCA_CBQ_RATE]) { rtab = qdisc_get_rtab(nla_data(tb[TCA_CBQ_RATE]), - tb[TCA_CBQ_RTAB]); + tb[TCA_CBQ_RTAB], extack); if (rtab == NULL) return -EINVAL; } @@ -1537,7 +1537,8 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **t if (!tb[TCA_CBQ_WRROPT] || !tb[TCA_CBQ_RATE] || !tb[TCA_CBQ_LSSOPT]) return -EINVAL; - rtab = qdisc_get_rtab(nla_data(tb[TCA_CBQ_RATE]), tb[TCA_CBQ_RTAB]); + rtab = qdisc_get_rtab(nla_data(tb[TCA_CBQ_RATE]), tb[TCA_CBQ_RTAB], + extack); if (rtab == NULL) return -EINVAL; |