Search Linux Wireless

Re: [PATCH 13/39]: pkt_sched: Add qdisc_all_tx_empty()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Patrick McHardy <kaber@xxxxxxxxx>
Date: Thu, 03 Jul 2008 15:11:26 +0200

> 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.

Indeed, and this is exactly what the sch_generic.c packet output path
uses as a test too.

Thanks Patrick, I'll fix this up.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux