All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, vinay@linux.vnet.ibm.com,
	krkumar2@in.ibm.com, mchan@broadcom.com, Matheos.Worku@Sun.COM,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH 13/39]: pkt_sched: Add qdisc_all_tx_empty()
Date: Thu, 03 Jul 2008 15:11:26 +0200	[thread overview]
Message-ID: <486CCFFE.7060009@trash.net> (raw)
In-Reply-To: <20080703.000343.16709755.davem@davemloft.net>

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.

WARNING: multiple messages have this Message-ID (diff)
From: Patrick McHardy <kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	vinay-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org,
	krkumar2-xthvdsQ13ZrQT0dZR+AlfA@public.gmane.org,
	mchan-dY08KVG/lbpWk0Htik3J/w@public.gmane.org,
	Matheos.Worku-UdXhSnd/wVw@public.gmane.org,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 13/39]: pkt_sched: Add qdisc_all_tx_empty()
Date: Thu, 03 Jul 2008 15:11:26 +0200	[thread overview]
Message-ID: <486CCFFE.7060009@trash.net> (raw)
In-Reply-To: <20080703.000343.16709755.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

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 linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-07-03 13:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-03  7:03 [PATCH 13/39]: pkt_sched: Add qdisc_all_tx_empty() David Miller
2008-07-03 13:11 ` Patrick McHardy [this message]
2008-07-03 13:11   ` Patrick McHardy
2008-07-03 20:46   ` David Miller
2008-07-03 20:46     ` 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=486CCFFE.7060009@trash.net \
    --to=kaber@trash.net \
    --cc=Matheos.Worku@Sun.COM \
    --cc=davem@davemloft.net \
    --cc=krkumar2@in.ibm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=vinay@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.