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] [day] [month] [year] [list]
Message-ID: <CA+mtBx9hR7LYkBOa+84_btQ+yRx6N7LVUuZA+i8jWXvpNJxOmw@mail.gmail.com>
Date:	Mon, 25 Aug 2014 12:34:30 -0700
From:	Tom Herbert <therbert@...gle.com>
To:	Cong Wang <cwang@...pensource.com>
Cc:	David Miller <davem@...emloft.net>,
	Linux Netdev List <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: Functions to report space available in
 device TX queues

On Mon, Aug 25, 2014 at 12:24 PM, Cong Wang <cwang@...pensource.com> wrote:
> On Mon, Aug 25, 2014 at 8:18 AM, Tom Herbert <therbert@...gle.com> wrote:
>> On Sun, Aug 24, 2014 at 10:35 PM, David Miller <davem@...emloft.net> wrote:
>>> From: Tom Herbert <therbert@...gle.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.
>>>
>> It's consistent with the other BQL functions. netdev_*_queue is used
>> for single queue devices, netdev_tx_*_queue is used for specific
>> queues in MQ.
>>
>
> I was also confused by these names when I read the code, it doesn't
> make sense to me either. We need some cleanup no matter of your
> patch. I will try to do it after your patch is in.

That would be great if you can clean this up in a sane way, but beware
that some of these functions following the naming convention are
already in widespread use. For instance, both netif_stop_queue and
netif_tx_stop_queue are called a lot from drivers.
--
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