From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Dennis Dalessandro
<dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"Michael J. Ruhl"
<michael.j.ruhl-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Sebastian Sanchez
<sebastian.sanchez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH for-next 3/7] IB/hfi1: Validate PKEY for incoming GSI MAD packets
Date: Mon, 23 Oct 2017 22:31:02 +0300 [thread overview]
Message-ID: <20171023193102.GE16127@mtr-leonro.local> (raw)
In-Reply-To: <d09970ea-2531-4d8e-0b4f-85533ff8487a-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1703 bytes --]
On Mon, Oct 23, 2017 at 02:55:38PM -0400, Dennis Dalessandro wrote:
> On 10/23/2017 2:38 PM, Leon Romanovsky wrote:
> > > diff --git a/drivers/infiniband/hw/hfi1/mad.c
> b/drivers/infiniband/hw/hfi1/mad.c
> > > index 07b80fa..dfe6224 100644
> > > --- a/drivers/infiniband/hw/hfi1/mad.c
> > > +++ b/drivers/infiniband/hw/hfi1/mad.c
> > > @@ -98,6 +98,16 @@ static inline void clear_opa_smp_data(struct opa_smp *smp)
> > > memset(data, 0, size);
> > > }
> > >
> > > +static inline u16 hfi1_lookup_pkey_value(struct hfi1_ibport *ibp, int pkey_idx)
> >
> > Please, no "inline-function" in *.c files as it is written in CodingStyle.
>
> Sure about that?
I'm not style-nazi, so won't insist, but this is in CodingStyle.
Documentation/process/coding-style.rst
841 15) The inline disease
842 ----------------------
843
844 There appears to be a common misperception that gcc has a magic "make me
845 faster" speedup option called ``inline``. While the use of inlines can be
846 appropriate (for example as a means of replacing macros, see Chapter 12), it
847 very often is not. Abundant use of the inline keyword leads to a much bigger
848 kernel, which in turn slows the system as a whole down, due to a bigger
849 icache footprint for the CPU and simply because there is less memory
850 available for the pagecache. Just think about it; a pagecache miss causes a
851 disk seek, which easily takes 5 milliseconds. There are a LOT of cpu cycles
852 that can go into these 5 milliseconds.
>
> As a rule of thumb I agree we should not put inlines in C files though.
> However as you can see from the context, this file already has static
> inlines so I wasn't too bothered by it.
>
> -Denny
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-10-23 19:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-23 13:05 [PATCH for-next 0/7] IB/hfi1: Driver fixes for 10/23/2017 Dennis Dalessandro
[not found] ` <20171023125327.21191.31462.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2017-10-23 13:05 ` [PATCH for-next 1/7] IB/hfi1: Race condition between user notification and driver state Dennis Dalessandro
2017-10-23 13:05 ` [PATCH for-next 2/7] Ib/hfi1: Return actual operational VLs in port info query Dennis Dalessandro
2017-10-23 13:06 ` [PATCH for-next 3/7] IB/hfi1: Validate PKEY for incoming GSI MAD packets Dennis Dalessandro
[not found] ` <20171023130558.21191.30808.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2017-10-23 18:38 ` Leon Romanovsky
[not found] ` <20171023183848.GC16127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-23 18:55 ` Dennis Dalessandro
[not found] ` <d09970ea-2531-4d8e-0b4f-85533ff8487a-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-10-23 19:31 ` Leon Romanovsky [this message]
[not found] ` <20171023193102.GE16127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-24 14:02 ` Dennis Dalessandro
[not found] ` <b1ec461a-9c04-ff16-2a2a-4f21dfbfbcb1-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-10-24 14:56 ` Jason Gunthorpe
[not found] ` <20171024145628.GA28224-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-10-24 19:49 ` Dennis Dalessandro
2017-10-25 15:15 ` [PATCH v2 " Dennis Dalessandro
2017-10-23 13:06 ` [PATCH for-next 4/7] IB/hfi1: Add tx_opcode_stats like the opcode_stats Dennis Dalessandro
2017-10-23 13:06 ` [PATCH for-next 5/7] IB/hfi1: Insure int mask for in-kernel receive contexts is clear Dennis Dalessandro
2017-10-23 13:06 ` [PATCH for-next 6/7] IB/hfi1: Don't modify num_user_contexts module parameter Dennis Dalessandro
2017-10-23 13:06 ` [PATCH for-next 7/7] IB/hfi1: Take advantage of kvzalloc_node in sdma initialization Dennis Dalessandro
[not found] ` <20171023130629.21191.43615.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2017-10-23 18:47 ` Leon Romanovsky
2017-10-30 18:56 ` [PATCH for-next 0/7] IB/hfi1: Driver fixes for 10/23/2017 Doug Ledford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171023193102.GE16127@mtr-leonro.local \
--to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=michael.j.ruhl-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=sebastian.sanchez-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox