public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [net-next PATCH v2] net_sched: dsmark: use qdisc_dequeue_peeked()
@ 2016-03-03 10:25 Kyeong Yoo
  2016-03-07  3:49 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Kyeong Yoo @ 2016-03-03 10:25 UTC (permalink / raw)
  To: netdev@vger.kernel.org

This fix is for dsmark similar to commit 3557619f0f6f7496ed453d4825e249
("net_sched: prio: use qdisc_dequeue_peeked")
and makes use of qdisc_dequeue_peeked() instead of direct dequeue() call.

First time, wrr peeks dsmark, which will then peek into sfq.
sfq dequeues an skb and it's stored in sch->gso_skb.
Next time, wrr tries to dequeue from dsmark, which will call sfq dequeue
directly. This results skipping the previously peeked skb.

So changed dsmark dequeue to call qdisc_dequeue_peeked() instead to use
peeked skb if exists.

Signed-off-by: Kyeong Yoo <kyeong.yoo@alliedtelesis.co.nz>

diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index f357f34..b204472 100644
--- a/net/sched/sch_dsmark.c
+++ b/net/sched/sch_dsmark.c
@@ -281,7 +281,7 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch)
 
 	pr_debug("%s(sch %p,[qdisc %p])\n", __func__, sch, p);
 
-	skb = p->q->ops->dequeue(p->q);
+	skb = qdisc_dequeue_peeked(p->q);
 	if (skb == NULL)
 		return NULL;


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [net-next PATCH v2] net_sched: dsmark: use qdisc_dequeue_peeked()
  2016-03-03 10:25 [net-next PATCH v2] net_sched: dsmark: use qdisc_dequeue_peeked() Kyeong Yoo
@ 2016-03-07  3:49 ` David Miller
  2016-03-07  4:06   ` Kyeong Yoo
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2016-03-07  3:49 UTC (permalink / raw)
  To: Kyeong.Yoo; +Cc: netdev

From: Kyeong Yoo <Kyeong.Yoo@alliedtelesis.co.nz>
Date: Thu, 3 Mar 2016 10:25:19 +0000

> This fix is for dsmark similar to commit 3557619f0f6f7496ed453d4825e249
> ("net_sched: prio: use qdisc_dequeue_peeked")
> and makes use of qdisc_dequeue_peeked() instead of direct dequeue() call.
> 
> First time, wrr peeks dsmark, which will then peek into sfq.
> sfq dequeues an skb and it's stored in sch->gso_skb.
> Next time, wrr tries to dequeue from dsmark, which will call sfq dequeue
> directly. This results skipping the previously peeked skb.
> 
> So changed dsmark dequeue to call qdisc_dequeue_peeked() instead to use
> peeked skb if exists.
> 
> Signed-off-by: Kyeong Yoo <kyeong.yoo@alliedtelesis.co.nz>

Your patch is corrupted by your email client, it has MS-DOS style
newlines, etc.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [net-next PATCH v2] net_sched: dsmark: use qdisc_dequeue_peeked()
  2016-03-07  3:49 ` David Miller
@ 2016-03-07  4:06   ` Kyeong Yoo
  0 siblings, 0 replies; 3+ messages in thread
From: Kyeong Yoo @ 2016-03-07  4:06 UTC (permalink / raw)
  To: davem@davemloft.net; +Cc: netdev@vger.kernel.org

I will upload new patch soon.
Kyeong

On Sun, 2016-03-06 at 22:49 -0500, David Miller wrote:
> From: Kyeong Yoo <Kyeong.Yoo@alliedtelesis.co.nz>
> Date: Thu, 3 Mar 2016 10:25:19 +0000
...
> Your patch is corrupted by your email client, it has MS-DOS style
> newlines, etc.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-07  4:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-03 10:25 [net-next PATCH v2] net_sched: dsmark: use qdisc_dequeue_peeked() Kyeong Yoo
2016-03-07  3:49 ` David Miller
2016-03-07  4:06   ` Kyeong Yoo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox