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: <e13547b5-ced5-a606-05a8-4a19294afa4e@gmail.com>
Date:   Wed, 15 Nov 2017 07:18:43 -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 10/17] net: sched: qdisc_qlen for per cpu logic

On 11/14/2017 05:16 PM, Willem de Bruijn wrote:
> On Mon, Nov 13, 2017 at 3:10 PM, John Fastabend
> <john.fastabend@...il.com> wrote:
>> Add qdisc qlen helper routines for lockless qdiscs to use.
>>
>> The qdisc qlen is no longer used in the hotpath but it is reported
>> via stats query on the qdisc so it still needs to be tracked. This
>> adds the per cpu operations needed.
>>
>> Signed-off-by: John Fastabend <john.fastabend@...il.com>
>> ---
>>  0 files changed
>>
>> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
>> index 4717c4b..bad24a9 100644
>> --- a/include/net/sch_generic.h
>> +++ b/include/net/sch_generic.h
>> @@ -291,8 +291,16 @@ static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz)
>>         BUILD_BUG_ON(sizeof(qcb->data) < sz);
>>  }
>>
>> +static inline int qdisc_qlen_cpu(const struct Qdisc *q)
>> +{
>> +       return this_cpu_ptr(q->cpu_qstats)->qlen;
>> +}
>> +
>>  static inline int qdisc_qlen(const struct Qdisc *q)
>>  {
>> +       if (q->flags & TCQ_F_NOLOCK)
>> +               return qdisc_qlen_cpu(q);
> 
> Shouldn't this return qdisc_qlen_sum from the follow-on patch?
> The two patches can also be squashed.
>
Actually I think this change can just be dropped. Looks like
I removed all cases of calling it from NOLOCK paths.

Also squashing this patch with 11/17 seems reasonable will go ahead
and do that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ