From: Jarek Poplawski <jarkao2@gmail.com>
To: Patrick McHardy <kaber@trash.net>
Cc: netdev@vger.kernel.org
Subject: Re: net_sched 05/07: reintroduce dev->qdisc for use by sch_api
Date: Sun, 6 Sep 2009 20:57:58 +0200 [thread overview]
Message-ID: <20090906185757.GA8833@ami.dom.local> (raw)
In-Reply-To: <20090904164117.27300.78712.sendpatchset@x2.localnet>
Patrick McHardy wrote, On 09/04/2009 06:41 PM:
> commit 57a016350a3d85dc351ab90ce91e4dc49ce2183a
> Author: Patrick McHardy <kaber@trash.net>
> Date: Fri Sep 4 16:12:45 2009 +0200
>
> net_sched: reintroduce dev->qdisc for use by sch_api
>
> Currently the multiqueue integration with the qdisc API suffers from
> a few problems:
>
> - with multiple queues, all root qdiscs use the same handle. This means
> they can't be exposed to userspace in a backwards compatible fashion.
>
> - all API operations always refer to queue number 0. Newly created
> qdiscs are automatically shared between all queues, its not possible
> to address individual queues or restore multiqueue behaviour once a
> shared qdisc has been attached.
>
> - Dumps only contain the root qdisc of queue 0, in case of non-shared
> qdiscs this means the statistics are incomplete.
>
> This patch reintroduces dev->qdisc, which points to the (single) root qdisc
> from userspace's point of view. Currently it either points to the first
> (non-shared) default qdisc, or a qdisc shared between all queues. The
> following patches will introduce a classful dummy qdisc, which will be used
> as root qdisc and contain the per-queue qdiscs as children.
...
> @@ -1323,7 +1317,6 @@ done:
> static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
> {
> struct net *net = sock_net(skb->sk);
> - struct netdev_queue *dev_queue;
> struct tcmsg *tcm = NLMSG_DATA(n);
> struct nlattr *tca[TCA_MAX + 1];
> struct net_device *dev;
> @@ -1361,7 +1354,6 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
>
> /* Step 1. Determine qdisc handle X:0 */
>
> - dev_queue = netdev_get_tx_queue(dev, 0);
> if (pid != TC_H_ROOT) {
> u32 qid1 = TC_H_MAJ(pid);
>
> @@ -1372,7 +1364,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
> } else if (qid1) {
> qid = qid1;
> } else if (qid == 0)
> - qid = dev_queue->qdisc_sleeping->handle;
> + qid = dev->qdisc->handle;
>
> /* Now qid is genuine qdisc handle consistent
> both with parent and child.
> @@ -1383,7 +1375,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
> pid = TC_H_MAKE(qid, pid);
> } else {
> if (qid == 0)
> - qid = dev_queue->qdisc_sleeping->handle;
> + qid = dev->qdisc->handle;
Probably I miss something, but in mq root case it seems to never do
anything we need. If so, it could be the example of possible issues
elsewhere.
I thought this mq virtual root qdisc could be done more transparently
and invisible for the current code, but it seems, in your
implementation some pointers like this, or parent ids (especially
TC_H_ROOT) might be different, and even if it works OK, needs a lot of
verification. So, my question is, if it's really necessary.
Jarek P.
> }
>
> /* OK. Locate qdisc */
next prev parent reply other threads:[~2009-09-06 18:58 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-04 16:41 net_sched 00/07: classful multiqueue dummy scheduler Patrick McHardy
2009-09-04 16:41 ` net_sched 01/07: fix class grafting errno codes Patrick McHardy
2009-09-04 16:41 ` net_sched 02/07: make cls_ops->tcf_chain() optional Patrick McHardy
2009-09-05 8:13 ` Jarek Poplawski
2009-09-05 11:57 ` Jarek Poplawski
2009-09-05 12:32 ` Jarek Poplawski
2009-09-05 17:03 ` Patrick McHardy
2009-09-06 9:06 ` David Miller
2009-09-04 16:41 ` net_sched 03/07: make cls_ops->change and cls_ops->delete optional Patrick McHardy
2009-09-04 16:41 ` net_sched 04/07: remove some unnecessary checks in classful schedulers Patrick McHardy
2009-09-04 16:41 ` net_sched 05/07: reintroduce dev->qdisc for use by sch_api Patrick McHardy
2009-09-06 18:57 ` Jarek Poplawski [this message]
2009-09-07 13:16 ` Patrick McHardy
2009-09-07 16:49 ` Jarek Poplawski
2009-09-04 16:41 ` net_sched 06/07: move dev_graft_qdisc() to sch_generic.c Patrick McHardy
2009-09-04 16:41 ` net_sched 07/07: add classful multiqueue dummy scheduler Patrick McHardy
2009-09-06 20:04 ` Jarek Poplawski
2009-09-07 13:27 ` Patrick McHardy
2009-09-07 18:22 ` Jarek Poplawski
2009-09-07 19:24 ` Jarek Poplawski
2009-09-07 19:49 ` Eric Dumazet
2009-09-09 16:02 ` Patrick McHardy
2009-09-09 19:52 ` Jarek Poplawski
2009-09-10 11:28 ` Patrick McHardy
2009-09-11 21:38 ` Jarek Poplawski
2009-09-11 22:10 ` David Miller
2009-09-11 22:21 ` Jarek Poplawski
2009-09-11 22:27 ` David Miller
2009-09-09 16:01 ` Patrick McHardy
2009-09-04 16:42 ` net_sched 00/07: " Patrick McHardy
2009-09-07 8:50 ` David Miller
2009-09-07 9:46 ` Jarek Poplawski
2009-09-07 13:00 ` Eric Dumazet
2009-09-07 13:29 ` Patrick McHardy
2009-09-07 14:23 ` Patrick McHardy
2009-09-07 17:21 ` Eric Dumazet
2009-09-07 17:28 ` Patrick McHardy
2009-09-07 17:30 ` Eric Dumazet
2009-09-07 17:33 ` Patrick McHardy
2009-09-07 17:38 ` Eric Dumazet
2009-09-07 17:46 ` Patrick McHardy
2009-09-08 9:31 ` David Miller
2009-09-08 15:53 ` Patrick McHardy
2009-09-05 7:27 ` David Miller
2009-09-05 17:02 ` Patrick McHardy
2009-09-06 9:01 ` David 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=20090906185757.GA8833@ami.dom.local \
--to=jarkao2@gmail.com \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
/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).