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]
Message-ID: <486CCFFE.7060009@trash.net>
Date:	Thu, 03 Jul 2008 15:11:26 +0200
From:	Patrick McHardy <kaber@...sh.net>
To:	David Miller <davem@...emloft.net>
CC:	netdev@...r.kernel.org, vinay@...ux.vnet.ibm.com,
	krkumar2@...ibm.com, mchan@...adcom.com, Matheos.Worku@....COM,
	linux-wireless@...r.kernel.org
Subject: Re: [PATCH 13/39]: pkt_sched: Add qdisc_all_tx_empty()

David Miller wrote:
> As per comments, this isn't a foolproof implementation.  This is being
> added so that we can contain and isolate all the explicit ->tx_queue
> references in the tree.
> 
> +/* Are all TX queues of the device empty?  */
> +static inline bool qdisc_all_tx_empty(const struct net_device *dev)
> +{
> +	struct netdev_queue *txq = &dev->tx_queue;
> +
> +	/* XXX This is not correct but it is good enough for the
> +	 * XXX one place that wants this, IRDA.  If we wanted to
> +	 * XXX do this right, we'd need to add a qdisc op to
> +	 * XXX probe for the queue state.
> +	 */
> +	return skb_queue_empty(&txq->qdisc->q);
> +}


It this comment referring to the fact that its looking at
qdisc->q itself, while the qdisc might be using internal
queues? If so, just using txq->qdisc->q.qlen should be
fine since qdiscs are required to always update this value,
even if they're not using the queue itself.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ