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: <CAM_iQpVmr3QBGCacYJaQdx7=ktHyXUNcGE=KpQwdkc+gs+j6Vg@mail.gmail.com>
Date:	Wed, 5 Nov 2014 18:50:55 -0800
From:	Cong Wang <xiyou.wangcong@...il.com>
To:	Herbert Xu <herbert@...dor.apana.org.au>
Cc:	Stephen Hemminger <stephen@...workplumber.org>,
	Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [PATCH 02/13] net_sched: introduce qdisc_peek() helper function

On Tue, Nov 4, 2014 at 7:49 PM, Herbert Xu <herbert@...dor.apana.org.au> wrote:
> Cong Wang <xiyou.wangcong@...il.com> wrote:
>> On Tue, Nov 4, 2014 at 10:45 AM, Stephen Hemminger
>> <stephen@...workplumber.org> wrote:
>>> On Tue,  4 Nov 2014 09:56:25 -0800
>>> Cong Wang <xiyou.wangcong@...il.com> wrote:
>>>
>>>> +static inline void qdisc_warn_nonwc(void *func, struct Qdisc *qdisc)
>>>> +{
>>>> +     if (!(qdisc->flags & TCQ_F_WARN_NONWC)) {
>>>> +             pr_warn("%pf: %s qdisc %X: is non-work-conserving?\n",
>>>> +                     func, qdisc->ops->id, qdisc->handle >> 16);
>>>> +             qdisc->flags |= TCQ_F_WARN_NONWC;
>>>> +     }
>>>> +}
>>>> +
>>>
>>> Inilining this and creating N copies of same message is not a step forward.
>>
>> Hmm, I think gcc merges same string literals when building Linux kernel?
>> But I never verify this.
>
> In general you should try to avoid inlining code that's not in
> the fast path as that leads to binary code size bloat.  As errors
> shouldn't be in the fast path this function should be inlined.

Makes sense.

Thanks!
--
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