From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesper Dangaard Brouer Subject: Re: [bpf-next V4 PATCH 5/8] xdp: introduce xdp_return_frame_rx_napi Date: Fri, 18 May 2018 22:46:06 +0200 Message-ID: <20180518224606.1dd2edc7@redhat.com> References: <152665044141.21055.1276346542020340263.stgit@firesoul> <152665049699.21055.13036051815851476324.stgit@firesoul> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Christoph Hellwig , =?UTF-8?B?QmrDtnJuVMO2cGVs?= , Magnus Karlsson , makita.toshiaki@lab.ntt.co.jp To: netdev@vger.kernel.org, Daniel Borkmann , Alexei Starovoitov , Jesper Dangaard Brouer Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:51766 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751734AbeERUqN (ORCPT ); Fri, 18 May 2018 16:46:13 -0400 In-Reply-To: <152665049699.21055.13036051815851476324.stgit@firesoul> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, 18 May 2018 15:34:57 +0200 Jesper Dangaard Brouer wrote: > When sending an xdp_frame through xdp_do_redirect call, then error > cases can happen where the xdp_frame needs to be dropped, and > returning an -errno code isn't sufficient/possible any-longer > (e.g. for cpumap case). This is already fully supported, by simply > calling xdp_return_frame. > > This patch is an optimization, which provides xdp_return_frame_rx_napi, > which is a faster variant for these error cases. It take advantage of > the protection provided by XDP RX running under NAPI protection. > > This change is mostly relevant for drivers using the page_pool > allocator as it can take advantage of this. (Tested with mlx5). Signed-off-by: Jesper Dangaard Brouer Ups, forgot my SoB... hope it's sufficient to add it this way. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer