| To: | "David S. Miller" <davem@xxxxxxxxxxxxx> |
|---|---|
| Subject: | [PATCH 13/16] HFSC: Use gnet_stats for class statistics |
| From: | Thomas Graf <tgraf@xxxxxxx> |
| Date: | Thu, 21 Oct 2004 14:48:24 +0200 |
| Cc: | netdev@xxxxxxxxxxx, hadi@xxxxxxxxxx |
| In-reply-to: | <20041021123209.GE21977@xxxxxxxxxxxxxx> |
| References: | <20041021123209.GE21977@xxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
Converts HTB class statistic counters to gnet_stats
structures.
Signed-off-by: Thomas Graf <tgraf@xxxxxxx>
--- linux-2.6.9-rc5.orig/net/sched/sch_hfsc.c 2004-10-21 11:07:46.000000000
+0200
+++ linux-2.6.9-rc5/net/sched/sch_hfsc.c 2004-10-21 13:11:06.000000000
+0200
@@ -122,7 +122,9 @@
u32 classid; /* class id */
unsigned int refcnt; /* usage count */
- struct tc_stats stats; /* generic statistics */
+ struct gnet_stats_basic bstats;
+ struct gnet_stats_queue qstats;
+ struct gnet_stats_rate_est rate_est;
spinlock_t *stats_lock;
unsigned int level; /* class level in hierarchy */
struct tcf_proto *filter_list; /* filter list */
@@ -1686,7 +1688,7 @@
err = cl->qdisc->enqueue(skb, cl->qdisc);
if (unlikely(err != NET_XMIT_SUCCESS)) {
- cl->stats.drops++;
+ cl->qstats.drops++;
sch->qstats.drops++;
return err;
}
@@ -1694,8 +1696,8 @@
if (cl->qdisc->q.qlen == 1)
set_active(cl, len);
- cl->stats.packets++;
- cl->stats.bytes += len;
+ cl->bstats.packets++;
+ cl->bstats.bytes += len;
sch->bstats.packets++;
sch->bstats.bytes += len;
sch->q.qlen++;
@@ -1799,7 +1801,7 @@
} else {
list_move_tail(&cl->dlist, &q->droplist);
}
- cl->stats.drops++;
+ cl->qstats.drops++;
sch->qstats.drops++;
sch->q.qlen--;
return len;
|
| Previous by Date: | [PATCH 12/16] HTB: Remove unneeded rate estimator bits, Thomas Graf |
|---|---|
| Next by Date: | [PATCH 14/16] HFSC: Use generic rate estimator, Thomas Graf |
| Previous by Thread: | [PATCH 12/16] HTB: Remove unneeded rate estimator bits, Thomas Graf |
| Next by Thread: | [PATCH 14/16] HFSC: Use generic rate estimator, Thomas Graf |
| Indexes: | [Date] [Thread] [Top] [All Lists] |