Re: [RFC PATCH] sched: only dequeue if packet can be queued to hardware queue.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Miller <davem@...>
Cc: <alexander.h.duyck@...>, <netdev@...>, <jarkao2@...>, <herbert@...>, <kaber@...>
Date: Thursday, September 18, 2008 - 10:51 am

On Thu, Sep 18, 2008 at 2:46 AM, David Miller <davem@davemloft.net> wrote:

I redefined qdisc->dequeue to be set to smart_dequeue in sch_generic.c:
@@ -475,7 +491,7 @@ struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue,
       skb_queue_head_init(&sch->q);
       sch->ops = ops;
       sch->enqueue = ops->enqueue;
-       sch->dequeue = ops->dequeue;
+       sch->dequeue = ops->smart_dequeue;
       sch->dev_queue = dev_queue;
       dev_hold(qdisc_dev(sch));
       atomic_set(&sch->refcnt, 1);

Most of the changes from qdisc->dequeue to qdisc->ops->dequeue are to have the
standard dequeue call use nothing but standard dequeue calls in it's
path.  I needed
to maintain qdisc->ops->dequeue because there are several functions throughout
the qdisc code that require the ability to dequeue a packet regardless
of hw queue
state.

Thanks,

Alex
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RE: [RFC PATCH] sched: only dequeue if packet can be queued ..., Duyck, Alexander H, (Fri Sep 19, 12:26 pm)
RE: [RFC PATCH] sched: only dequeue if packet can be queued ..., Duyck, Alexander H, (Fri Sep 19, 2:01 pm)
RE: [RFC PATCH] sched: only dequeue if packet can be queued ..., Duyck, Alexander H, (Fri Sep 19, 5:43 pm)
[PATCH take2] pkt_sched: Fix TX state checking in qdisc_run(), Jarek Poplawski, (Fri Sep 19, 10:44 am)
[PATCH] pkt_sched: Fix TX state checking in qdisc_run(), Jarek Poplawski, (Fri Sep 19, 9:07 am)
Re: [RFC PATCH] sched: only dequeue if packet can be queued ..., Alexander Duyck, (Thu Sep 18, 10:51 am)