From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesper Dangaard Brouer Subject: [bpf-next PATCH 0/3] XDP micro optimizations for redirect Date: Fri, 31 Aug 2018 17:26:02 +0200 Message-ID: <153572913891.27338.14887146010547808356.stgit@firesoul> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Daniel Borkmann , Alexei Starovoitov , Jesper Dangaard Brouer To: netdev@vger.kernel.org Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55624 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727303AbeHaTeF (ORCPT ); Fri, 31 Aug 2018 15:34:05 -0400 Sender: netdev-owner@vger.kernel.org List-ID: This patchset contains XDP micro optimizations for the redirect core. These are not functional changes. The optimizations revolve around getting the compiler to layout the code in a way that reflect how XDP redirect is used. Today the compiler chooses to inline and uninline (static C functions) in a suboptimal way, compared to how XDP redirect can be used. Perf top clearly shows that almost everything gets inlined into the function call xdp_do_redirect. The way the compiler chooses to inlines, does not reflect how XDP redirect is used, as the compile cannot know this. --- Jesper Dangaard Brouer (3): xdp: unlikely instrumentation for xdp map redirect xdp: explicit inline __xdp_map_lookup_elem xdp: split code for map vs non-map redirect net/core/filter.c | 64 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 28 deletions(-)