From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH net-next 1/4] indirect call wrappers: helpers to speed-up indirect calls of builtin Date: Mon, 3 Dec 2018 10:04:50 -0800 Message-ID: <92281874-51f1-c79c-dbfe-021600a36c9d@gmail.com> References: <4b3d364077091ad23415894e74a212d1168425cc.1543836966.git.pabeni@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "David S. Miller" , Eric Dumazet To: Paolo Abeni , netdev@vger.kernel.org Return-path: Received: from mail-pl1-f195.google.com ([209.85.214.195]:41915 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726014AbeLCSEy (ORCPT ); Mon, 3 Dec 2018 13:04:54 -0500 Received: by mail-pl1-f195.google.com with SMTP id u6so6848335plm.8 for ; Mon, 03 Dec 2018 10:04:52 -0800 (PST) In-Reply-To: <4b3d364077091ad23415894e74a212d1168425cc.1543836966.git.pabeni@redhat.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 12/03/2018 03:40 AM, Paolo Abeni wrote: > This header define a bunch of helpers that allow avoiding the > retpoline overhead when calling builtin functions via function pointers. > It boils down to explicitly comparing the function pointers to > known builtin functions and eventually invoke directly the latter. > > The macros defined here implement the boilerplate for the above schema > and will be used by the next patches. > > rfc -> v1: > - use branch prediction hint, as suggested by Eric > > Suggested-by: Eric Dumazet > Signed-off-by: Paolo Abeni > --- > include/linux/indirect_call_wrapper.h | 77 +++++++++++++++++++++++++++ > 1 file changed, 77 insertions(+) > create mode 100644 include/linux/indirect_call_wrapper.h This needs to be discussed more broadly, please include lkml Also please include Paul Turner in the discussion, since he was the inventor of this idea.