net: sched: implement qstat helper routines
This adds helpers to manipulate qstats logic and replaces locations that touch the counters directly. This simplifies future patches to push qstats onto per cpu counters. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
22e0f8b932
commit
25331d6ce4
@@ -42,7 +42,7 @@ static int pfifo_tail_enqueue(struct sk_buff *skb, struct Qdisc *sch)
|
||||
|
||||
/* queue full, remove one skb to fulfill the limit */
|
||||
__qdisc_queue_drop_head(sch, &sch->q);
|
||||
sch->qstats.drops++;
|
||||
qdisc_qstats_drop(sch);
|
||||
qdisc_enqueue_tail(skb, sch);
|
||||
|
||||
return NET_XMIT_CN;
|
||||
|
Reference in New Issue
Block a user