diff options
author | Harout Hedeshian <harouth@codeaurora.org> | 2014-05-07 09:01:06 +0300 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:05:54 -0700 |
commit | 6ff0325a57b4a29c2f7d745e7cba68b51034a7e1 (patch) | |
tree | d6a9bb838af0b2283153c1c5c10e83644cdd435d /net/sched | |
parent | a4dc73226985d6226a3e7a04089f6ec5754a7c6d (diff) |
net: tc_qdisc_flow_control returning qdisc size
Changed the tc_qdisc_flow_control API to return the size of the
qdisc in order to be able to collect data on the size of the
qdisc before doing flow control operations. This is required to effectively
diagnose the state of the queues when debugging flow control.
CRs-Fixed: 657414
Change-Id: I4aff2157410e1170de2d0791757ed2e12830a2db
Acked-by: Sivan Reinstein <sivanr@qti.qualcomm.com>
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
[subashab@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_api.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index f7e6d13e270f..48bd969a1ff8 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -1173,10 +1173,11 @@ static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n) /* * enable/disable flow on qdisc. */ -void +int tc_qdisc_flow_control(struct net_device *dev, u32 tcm_handle, int enable_flow) { struct Qdisc *q; + int qdisc_len = 0; struct __qdisc_change_req { struct nlattr attr; struct tc_prio_qopt data; @@ -1193,9 +1194,11 @@ tc_qdisc_flow_control(struct net_device *dev, u32 tcm_handle, int enable_flow) /* call registered change function */ if (q) { + qdisc_len = q->q.qlen; if (q->ops->change(q, &(req.attr)) != 0) pr_err("tc_qdisc_flow_control: qdisc change failed"); } + return qdisc_len; } EXPORT_SYMBOL(tc_qdisc_flow_control); |