mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Kosina <jikos@kernel.org>
To: David Miller <davem@davemloft.net>
Cc: stephen@networkplumber.org, eric.dumazet@gmail.com,
	jhs@mojatatu.com, phil@nwl.cc, xiyou.wangcong@gmail.com,
	daniel@iogearbox.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] net: sched: make default fifo qdiscs appear in the dump
Date: Mon, 6 Mar 2017 12:03:38 +0100 (CET)	[thread overview]
Message-ID: <alpine.LSU.2.20.1703061158500.31814@cbobk.fhfr.pm> (raw)
In-Reply-To: <20170301.132144.1380602514921591101.davem@davemloft.net>

On Wed, 1 Mar 2017, David Miller wrote:

> > @@ -1066,6 +1066,7 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
> >  				      &pfifo_qdisc_ops, classid);
> >  	if (cl->qdisc == NULL)
> >  		cl->qdisc = &noop_qdisc;
> > +	qdisc_hash_add(cl->qdisc, true);
> >  	INIT_LIST_HEAD(&cl->children);
> >  	cl->vt_tree = RB_ROOT;
> >  	cl->cf_tree = RB_ROOT;
> > @@ -1425,6 +1426,7 @@ hfsc_init_qdisc(struct Qdisc *sch, struct nlattr *opt)
> >  					  sch->handle);
> >  	if (q->root.qdisc == NULL)
> >  		q->root.qdisc = &noop_qdisc;
> > +	qdisc_hash_add(q->root.qdisc, true);
> >  	INIT_LIST_HEAD(&q->root.children);
> >  	q->root.vt_tree = RB_ROOT;
> >  	q->root.cf_tree = RB_ROOT;
> 
> I'm not so sure it is legal is potentially pass &noop_qdisc into qdisc_hash_add().

Ah, right you are, thanks. The complete fix is not super trivial, as it 
needs some more surgery to tc_dump_qdisc_root(), tc_dump_tclass_root() and 
qdisc_match_from_root() (see 69012ae42 for some details).

There are two options:

- this gets fixed in two phases, in first everything *but* noop qdisc gets 
  dumped (in the "give me everything" dump) and later we finalize it by
  teaching the above functions about noop_qdisc as well

- I extend this patchset to handle noop qdisc from the very beginning; 
  I am unlikely to find time for this during coming weeks though. But OTOH
  this whole thing is very low priority anyway

What do you think?

Thanks,

-- 
Jiri Kosina
SUSE Labs

  reply	other threads:[~2017-03-06 11:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-25 21:29 Jiri Kosina
2017-03-01 18:21 ` David Miller
2017-03-06 11:03   ` Jiri Kosina [this message]
2017-03-06 18:35     ` David Miller
2017-03-07  9:59       ` Jiri Kosina

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=alpine.LSU.2.20.1703061158500.31814@cbobk.fhfr.pm \
    --to=jikos@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=jhs@mojatatu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=phil@nwl.cc \
    --cc=stephen@networkplumber.org \
    --cc=xiyou.wangcong@gmail.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

all inboxes | Powered by JetHome®