netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: "Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@intel.com>
Cc: netdev@vger.kernel.org
Subject: Re: Question: how to detect if a qdisc is root or not?
Date: Thu, 19 Jul 2007 01:23:50 +0200	[thread overview]
Message-ID: <469EA106.5010106@trash.net> (raw)
In-Reply-To: <D5C1322C3E673F459512FB59E0DDC3290340F84A@orsmsx414.amr.corp.intel.com>

Waskiewicz Jr, Peter P wrote:
> I've been tracking down an issue with the recent multiqueue code,
> specifically with sch_prio and sch_rr loading as a root qdisc.  Right
> now, we do not want to allow child qdiscs of sch_rr and sch_prio to load
> with multiqueue enabled; we want to restrict multiqueue-enabled qdiscs
> to the root qdisc (since this is the only thing to push into the
> device).  The issue I have is I don't know how to detect if the qdisc
> I'm currently processing is the root qdisc, or if it's a child.  From
> sch_prio.c:
> 
>         q->mq = RTA_GET_FLAG(tb[TCA_PRIO_MQ - 1]);
>         if (q->mq) {
>                 if (sch->handle != TC_H_ROOT)
>                         return -EINVAL;
> 
>                 if (netif_is_multiqueue(sch->dev)) { 
> 
> Unfortunately, this code isn't working.  This sch->handle is the handle
> assigned to the qdisc upon creation, and it's not TC_H_ROOT.


You're right, thats a bug. TC_H_ROOT is the parent ID, which is
stored in sch->parent. IIRC its also passed to the ->init() function.


  reply	other threads:[~2007-07-18 23:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-18 23:16 Question: how to detect if a qdisc is root or not? Waskiewicz Jr, Peter P
2007-07-18 23:23 ` Patrick McHardy [this message]
2007-07-18 23:29   ` Waskiewicz Jr, Peter P
2007-07-18 23:39     ` Patrick McHardy
2007-07-18 23:42       ` Waskiewicz Jr, Peter P
2007-07-20 22:59       ` Waskiewicz Jr, Peter P
2007-07-21  4:01         ` Patrick McHardy
2007-07-21  5:33           ` David Miller
2007-07-21 18:31             ` Waskiewicz Jr, Peter P
2007-07-21 18:55           ` Waskiewicz Jr, Peter P
2007-07-22 16:24             ` Patrick McHardy

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=469EA106.5010106@trash.net \
    --to=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=peter.p.waskiewicz.jr@intel.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).