netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: hadi@cyberus.ca
Cc: "David S. Miller" <davem@redhat.com>, netdev@oss.sgi.com
Subject: Re: [PATCH]: Adjust qlen when grafting in multiple qdiscs
Date: Mon, 17 Nov 2003 17:13:51 +0100	[thread overview]
Message-ID: <3FB8F3BF.6050509@trash.net> (raw)
In-Reply-To: <1069081153.1022.20.camel@jzny.localdomain>

Hi Jamal,

the patch was meant to fix the problem that when replacing (or deleting)
a leaf queue that still holds packets the packets are not subtracted
from the upper queue's q.qlen. dsmark_reset does set the length to 0 but
it is not called when grafting. I've now verified experimentally the
problem also exists in dsmark:

# tc qdisc add dev eth0 root handle 1: dsmark indices 64
# tc qdisc add dev eth0 parent 1: pfifo limit 100
# netperf -H 192.168.0.1
< queue is holding 38 packets at this moment >
# tc qdisc del dev eth0 parent 1: pfifo
# tc qdisc add dev eth0 parent 1: pfifo limit 100
# tc -s -d qdisc show dev eth0

qdisc pfifo 800d: limit 100p
 Sent 296729221 bytes 854680 pkts (dropped 0, overlimits 0)
 backlog 33p
                                                                                
qdisc dsmark 1: indices 0x0040
 Sent 510414473 bytes 1489414 pkts (dropped 40, overlimits 0)
 backlog 71p

While it may not be a common operation or not even make sense, it is a
valid one and IMHO should be handled correctly. It actually did happen
to me while playing with TBF. I missed dsmark only has a single queue
so sch->q.qlen = 0 would be ok in dsmark_graft. If you're ok with that,
I'm going to change the patch.

Best regards,
Patrick


jamal wrote:

>Patrick,
>
>It doesnt make sense to have more than one queue in Dsmark (used as a
>place holder/work queue while DSCP remarking). 
>If reset() is already setting the length to 0 then it is not useful
>to set it to anything else (it may actually become a -ve number).
>I would suggest you use some of the examples in
>iproute2/examples/diffserv to test things out (for all your changes -
>the dsmark change was staring at me in the face - i didnt pay attention
>to the rest).
>
>cheers,
>jamal
>  
>

  reply	other threads:[~2003-11-17 16:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-13 14:47 [PATCH]: Adjust qlen when grafting in multiple qdiscs Patrick McHardy
2003-11-17 14:22 ` jamal
2003-11-17 14:40   ` Patrick McHardy
2003-11-17 14:59     ` jamal
2003-11-17 16:13       ` Patrick McHardy [this message]
2003-11-17 17:30         ` jamal
2003-11-17 18:15           ` Patrick McHardy
2003-11-17 19:25             ` jamal
2003-11-17 19:38           ` Werner Almesberger
2003-11-17 21:10             ` Patrick McHardy
2003-11-18  0:34             ` [UPDATED PATCH]: " Patrick McHardy
2003-11-19  1:19               ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FB8F3BF.6050509@trash.net \
    --to=kaber@trash.net \
    --cc=davem@redhat.com \
    --cc=hadi@cyberus.ca \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).