netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: therbert@google.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: Functions to report space available in device TX queues
Date: Sun, 24 Aug 2014 22:35:29 -0700 (PDT)	[thread overview]
Message-ID: <20140824.223529.704627469513160252.davem@davemloft.net> (raw)
In-Reply-To: <alpine.DEB.2.02.1408241312500.30395@tomh.mtv.corp.google.com>

From: Tom Herbert <therbert@google.com>
Date: Sun, 24 Aug 2014 13:19:47 -0700 (PDT)

> +/**
> + *	netdev_avail_queue - report how much space is availble for xmit
> + *	@dev: network device
> + *
> + *	Report the amount of space available in the TX queue in terms of
> + *	number of bytes. This returns the number of bytes avaiable per
> + *	DQL. This function may be called without taking the txlock on
> + *	the device, however in that case the result should be taken as
> + *	a (strong) hint.
> + */
> +static inline int netdev_avail_queue(struct net_device *dev_queue)
> +{
> +	return netdev_tx_avail_queue(netdev_get_tx_queue(dev_queue, 0));
> +}
> +

This doesn't make any sense, you're only providing queue zero's
information.

You're passing in a net_device, calling it a "dev_queue" in the
variable name, the exlicitly using queue zero of that device in the
netdev_get_tx_queue() call.

Pretty confusing if you ask me :)

  reply	other threads:[~2014-08-25  5:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-24 20:19 [PATCH net-next] net: Functions to report space available in device TX queues Tom Herbert
2014-08-25  5:35 ` David Miller [this message]
2014-08-25 15:18   ` Tom Herbert
2014-08-25 19:24     ` Cong Wang
2014-08-25 19:34       ` Tom Herbert

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=20140824.223529.704627469513160252.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=therbert@google.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 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).