From: David Miller <davem@davemloft.net>
To: alexander.h.duyck@intel.com
Cc: marco.chiappero@intel.com, netdev@vger.kernel.org,
jeffrey.t.kirsher@intel.com, sainath.grandhi@intel.com,
maheshb@google.com
Subject: Re: [PATCH net-next 8/9] ipvlan: improve compiler hints
Date: Thu, 27 Apr 2017 12:05:26 -0400 (EDT) [thread overview]
Message-ID: <20170427.120526.172017262253091302.davem@davemloft.net> (raw)
In-Reply-To: <B1C1DF2ACD01FD4881736AA51731BAB2B2EFB2@ORSMSX107.amr.corp.intel.com>
From: "Duyck, Alexander H" <alexander.h.duyck@intel.com>
Date: Thu, 27 Apr 2017 15:21:16 +0000
>> -----Original Message-----
>> From: Chiappero, Marco
>> Sent: Thursday, April 27, 2017 7:52 AM
>> To: netdev@vger.kernel.org
>> Cc: David S . Miller <davem@davemloft.net>; Kirsher, Jeffrey T
>> <jeffrey.t.kirsher@intel.com>; Duyck, Alexander H
>> <alexander.h.duyck@intel.com>; Grandhi, Sainath
>> <sainath.grandhi@intel.com>; Mahesh Bandewar <maheshb@google.com>;
>> Chiappero, Marco <marco.chiappero@intel.com>
>> Subject: [PATCH net-next 8/9] ipvlan: improve compiler hints
>>
>> Extend inlining and branch prediction hints.
>>
>> Signed-off-by: Marco Chiappero <marco.chiappero@intel.com>
>> ---
>> drivers/net/ipvlan/ipvlan_core.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c
>> index a9fc1b5..67e342d 100644
>> --- a/drivers/net/ipvlan/ipvlan_core.c
>> +++ b/drivers/net/ipvlan/ipvlan_core.c
>> @@ -88,7 +88,7 @@ void ipvlan_ht_addr_del(struct ipvl_addr *addr)
>> hlist_del_init_rcu(&addr->hlnode);
>> }
>>
>> -unsigned int ipvlan_mac_hash(const unsigned char *addr)
>> +inline unsigned int ipvlan_mac_hash(const unsigned char *addr)
>> {
>> u32 hash = jhash_1word(__get_unaligned_cpu32(addr + 2),
>> ipvlan_jhash_secret);
>
> I'm kind of surprised this isn't causing a problem with differing
> declarations between the declaration here and the declaration in
> ipvlan.h. Normally for inlining something like this you would change
> it to a "static inline" and move the entire declaration into the
> header file.
No inlines in foo.c files please, seriously let the compiler decide
it knows better than you.
next prev parent reply other threads:[~2017-04-27 16:05 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-27 14:51 [PATCH net-next 0/9] support unique MAC addresses for slave devices Marco Chiappero
2017-04-27 14:51 ` [PATCH net-next 1/9] ipvlan: fix coding style for the ipvlan tree Marco Chiappero
2017-04-27 14:51 ` [PATCH net-next 2/9] ipvlan: refactor ipvlan_process_multicast for readability Marco Chiappero
2017-04-27 14:51 ` [PATCH net-next 3/9] ipvlan: replace ipvlan_rcv_frame Marco Chiappero
2017-04-27 14:51 ` [PATCH net-next 4/9] ipvlan: rework the IP lookup function Marco Chiappero
2017-04-27 14:51 ` [PATCH net-next 5/9] ipvlan: improve and uniform naming Marco Chiappero
2017-04-27 14:51 ` [PATCH net-next 6/9] ipvlan: reposition three functions Marco Chiappero
2017-04-27 14:51 ` [PATCH net-next 7/9] ipvlan: relocate ipvlan_skb_crossing_ns calls Marco Chiappero
2017-04-27 14:51 ` [PATCH net-next 8/9] ipvlan: improve compiler hints Marco Chiappero
2017-04-27 15:21 ` Duyck, Alexander H
2017-04-27 15:27 ` David Laight
2017-04-27 16:05 ` David Miller [this message]
2017-04-27 14:51 ` [PATCH net-next 9/9] ipvlan: introduce individual MAC addresses Marco Chiappero
2017-04-27 16:20 ` Dan Williams
2017-04-27 16:23 ` Dan Williams
2017-05-02 15:08 ` Chiappero, Marco
2017-05-02 16:09 ` Dan Williams
2017-05-04 9:37 ` Chiappero, Marco
2017-05-04 16:43 ` Jiri Benc
2017-05-04 22:15 ` Mahesh Bandewar (महेश बंडेवार)
2017-05-08 15:29 ` Chiappero, Marco
2017-05-08 18:13 ` Dan Williams
2017-05-09 18:41 ` Chiappero, Marco
2017-05-04 22:09 ` Mahesh Bandewar (महेश बंडेवार)
2017-04-27 20:30 ` kbuild test robot
2017-04-27 19:21 ` [PATCH net-next 0/9] support unique MAC addresses for slave devices Mahesh Bandewar (महेश बंडेवार)
2017-05-02 15:12 ` Chiappero, Marco
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=20170427.120526.172017262253091302.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alexander.h.duyck@intel.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=maheshb@google.com \
--cc=marco.chiappero@intel.com \
--cc=netdev@vger.kernel.org \
--cc=sainath.grandhi@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).