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] [thread-next>] [day] [month] [year] [list]
Message-ID: <7a97a5c7-d81d-9dfe-9997-d27799705c99@gmail.com>
Date:   Wed, 15 Nov 2017 07:00:26 -0800
From:   John Fastabend <john.fastabend@...il.com>
To:     Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc:     Daniel Borkmann <daniel@...earbox.net>,
        Eric Dumazet <eric.dumazet@...il.com>, make0818@...il.com,
        Network Development <netdev@...r.kernel.org>,
        Jiří Pírko <jiri@...nulli.us>,
        Cong Wang <xiyou.wangcong@...il.com>
Subject: Re: [RFC PATCH 03/17] net: sched: remove remaining uses for
 qdisc_qlen in xmit path

On 11/14/2017 05:56 PM, Willem de Bruijn wrote:
> On Tue, Nov 14, 2017 at 7:11 PM, Willem de Bruijn
> <willemdebruijn.kernel@...il.com> wrote:
>> On Mon, Nov 13, 2017 at 3:08 PM, John Fastabend
>> <john.fastabend@...il.com> wrote:
>>> sch_direct_xmit() uses qdisc_qlen as a return value but all call sites
>>> of the routine only check if it is zero or not. Simplify the logic so
>>> that we don't need to return an actual queue length value.
>>>
>>> This introduces a case now where sch_direct_xmit would have returned
>>> a qlen of zero but now it returns true.
>>
>> You mean the first case, when the likely(skb) branch failed?
>> Can that return false, then?
> 
> I misunderstood. __qdisc_run will just take one extra loop, since it
> will no longer break out of the loop on reading the last packet on
> the queue with qdisc_restart.
> 
> That does have a subtle (but benign if rare) side effect of possibly
> calling __netif_schedule while there is nothing queued, if either
> the quota is exactly exhausted or need_resched is true.
> 

Right. Seems OK to me.

Will also make code cleanup comment from intial email.

.John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ