Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225229
b: refs/heads/master
c: ee09b3c
h: refs/heads/master
i:
  225227: e2c2be0
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Dec 22, 2010
1 parent 80bf547 commit 15addd6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 503b1a529a6b62b31904bab4699752c523cf76b2
refs/heads/master: ee09b3c1cff0335137dc1b146488e4352f640f13
16 changes: 11 additions & 5 deletions trunk/net/sched/sch_sfq.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ static inline struct sk_buff *slot_dequeue_tail(struct sfq_slot *slot)
struct sk_buff *skb = slot->skblist_prev;

slot->skblist_prev = skb->prev;
skb->prev->next = (struct sk_buff *)slot;
skb->next = skb->prev = NULL;
return skb;
}
Expand Down Expand Up @@ -608,14 +609,19 @@ static int sfq_dump_class_stats(struct Qdisc *sch, unsigned long cl,
struct gnet_dump *d)
{
struct sfq_sched_data *q = qdisc_priv(sch);
const struct sfq_slot *slot = &q->slots[q->ht[cl - 1]];
struct gnet_stats_queue qs = { .qlen = slot->qlen };
struct tc_sfq_xstats xstats = { .allot = slot->allot };
sfq_index idx = q->ht[cl - 1];
struct gnet_stats_queue qs = { 0 };
struct tc_sfq_xstats xstats = { 0 };
struct sk_buff *skb;

slot_queue_walk(slot, skb)
qs.backlog += qdisc_pkt_len(skb);
if (idx != SFQ_EMPTY_SLOT) {
const struct sfq_slot *slot = &q->slots[idx];

xstats.allot = slot->allot;
qs.qlen = slot->qlen;
slot_queue_walk(slot, skb)
qs.backlog += qdisc_pkt_len(skb);
}
if (gnet_stats_copy_queue(d, &qs) < 0)
return -1;
return gnet_stats_copy_app(d, &xstats, sizeof(xstats));
Expand Down

0 comments on commit 15addd6

Please sign in to comment.