lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 7 Sep 2009 21:24:29 +0200
From:	Jarek Poplawski <jarkao2@...il.com>
To:	Patrick McHardy <kaber@...sh.net>
Cc:	netdev@...r.kernel.org
Subject: Re: net_sched 07/07: add classful multiqueue dummy scheduler

On Mon, Sep 07, 2009 at 03:27:37PM +0200, Patrick McHardy wrote:
> Jarek Poplawski wrote:
...
> >> +static int mq_dump(struct Qdisc *sch, struct sk_buff *skb)
> >> +{
> >> +	struct net_device *dev = qdisc_dev(sch);
> >> +	struct Qdisc *qdisc;
> >> +	unsigned int ntx;
> >> +
> >> +	sch->q.qlen = 0;
> >> +	memset(&sch->bstats, 0, sizeof(sch->bstats));
> >> +	memset(&sch->qstats, 0, sizeof(sch->qstats));
> >> +
> >> +	for (ntx = 0; ntx < dev->num_tx_queues; ntx++) {
> >> +		qdisc = netdev_get_tx_queue(dev, ntx)->qdisc_sleeping;
> >> +		spin_lock_bh(qdisc_lock(qdisc));
> >> +		sch->q.qlen		+= qdisc->q.qlen;
> >> +		sch->bstats.bytes	+= qdisc->bstats.bytes;
> >> +		sch->bstats.packets	+= qdisc->bstats.packets;
> >> +		sch->qstats.qlen	+= qdisc->qstats.qlen;
> > 
> > Like in Christoph's case, we should probably use q.qlen instead.
> 
> Its done a few lines above. This simply sums up all members of qstats.

AFAICS these members are updated only in tc_fill_qdisc, starting from
the root, so they might be not up-to-date at the moment, unless I miss
something.

Jarek P.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists