File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch)
9797
9898 ret = qdisc_enqueue (skb , child );
9999 if (likely (ret == NET_XMIT_SUCCESS )) {
100+ qdisc_qstats_backlog_inc (sch , skb );
100101 sch -> q .qlen ++ ;
101102 } else if (net_xmit_drop_count (ret )) {
102103 q -> stats .pdrop ++ ;
@@ -118,6 +119,7 @@ static struct sk_buff *red_dequeue(struct Qdisc *sch)
118119 skb = child -> dequeue (child );
119120 if (skb ) {
120121 qdisc_bstats_update (sch , skb );
122+ qdisc_qstats_backlog_dec (sch , skb );
121123 sch -> q .qlen -- ;
122124 } else {
123125 if (!red_is_idling (& q -> vars ))
@@ -143,6 +145,7 @@ static unsigned int red_drop(struct Qdisc *sch)
143145 if (child -> ops -> drop && (len = child -> ops -> drop (child )) > 0 ) {
144146 q -> stats .other ++ ;
145147 qdisc_qstats_drop (sch );
148+ sch -> qstats .backlog -= len ;
146149 sch -> q .qlen -- ;
147150 return len ;
148151 }
@@ -158,6 +161,7 @@ static void red_reset(struct Qdisc *sch)
158161 struct red_sched_data * q = qdisc_priv (sch );
159162
160163 qdisc_reset (q -> qdisc );
164+ sch -> qstats .backlog = 0 ;
161165 sch -> q .qlen = 0 ;
162166 red_restart (& q -> vars );
163167}
You can’t perform that action at this time.
0 commit comments