Subject: [PATCH] Re: Possible regression in HTB

From: Jarek Poplawski <[email-masked]>
Date: Wed, 8 Oct 2008 07:46:04 +0000

On Wed, Oct 08, 2008 at 10:06:38AM +0300, Denys Fedoryshchenko wrote:
> On Wednesday 08 October 2008, Jarek Poplawski wrote:
> > On Wed, Oct 08, 2008 at 02:31:26AM +0200, Patrick McHardy wrote:
> > ...
> >
> > > I'm pretty sure that the differences are caused by HTB not being
> > > in control of the queue since the device is the real bottleneck
> > > in this configuration.
> >
> > Yes, otherwise there would be no requeuing. And, btw. the golden rule
> > of scheduling/shaping is limiting below "hardware" limits.
> By the way, HTB counting ethernet headers (e.g. if you send 1500 byte ping, it 
> will be 1514 in tc counters) . So possible ethernet overhead counted.
> 

Right, that's why stats from the other host could differ and these
tc stats mentioned by Patrick could be useful.

BTW, current requeuing isn't true requeuing, but we should have some
info about this, so something like this patch is needed.

Jarek P.

-------------->

pkt_sched: Update qdisc requeue stats in dev_requeue_skb()

After the last change of requeuing there is no info about such
incidents in tc stats. This patch updates the counter, but we should
consider this should differ from previous stats because of additional
checks preventing to repeat this. On the other hand, previous stats
didn't include requeuing of gso_segmented skbs.

Signed-off-by: Jarek Poplawski <[email-masked]>

---

 net/sched/sch_generic.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 31f6b61..7b5572d 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -45,6 +45,7 @@ static inline int qdisc_qlen(struct Qdisc *q)
 static inline int dev_requeue_skb(struct sk_buff *skb, struct Qdisc *q)
 {
 	q->gso_skb = skb;
+	q->qstats.requeues++;
 	__netif_schedule(q);
 
 	return 0;