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]
Date:   Sat, 15 Apr 2023 09:14:45 +0200
From:   Heiner Kallweit <hkallweit1@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     David Miller <davem@...emloft.net>,
        Paolo Abeni <pabeni@...hat.com>,
        Eric Dumazet <edumazet@...gle.com>,
        Realtek linux nic maintainers <nic_swsd@...ltek.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 2/3] r8169: use new macro
 netif_subqueue_maybe_stop in rtl8169_start_xmit

On 15.04.2023 03:53, Jakub Kicinski wrote:
> On Thu, 13 Apr 2023 21:15:37 +0200 Heiner Kallweit wrote:
>> +	stop_queue = netif_subqueue_maybe_stop(dev, 0, rtl_tx_slots_avail(tp),
>> +					       R8169_TX_STOP_THRS,
>> +					       R8169_TX_START_THRS);
>> +	if (door_bell || stop_queue < 0)
> 
> Macro returns 0 if it did the action. So I'd have expected <= or !
> Maybe better to invert the return value at the call site..
> 
I didn't encounter a problem in my tests, but you're right, this should
be changed. Currently we ring the door bell if the queue was stopped or
re-started. Should be sufficient to do it if queue is stopped.

> 	stopped = !netif_subqueue_maybe_stop(...
> 	if (door_bell || stopped)
> 		..

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ