From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesper Dangaard Brouer Subject: Re: [bpf-next V1 PATCH 8/8] bpf/xdp: devmap can avoid calling ndo_xdp_flush Date: Thu, 31 May 2018 09:49:02 +0200 Message-ID: <20180531094902.34956b98@redhat.com> References: <152770312703.20510.5854417568847239931.stgit@firesoul> <152770327343.20510.17045843025201198801.stgit@firesoul> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Networking , Daniel Borkmann , Alexei Starovoitov , John Fastabend , makita.toshiaki@lab.ntt.co.jp, brouer@redhat.com To: Song Liu Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:36404 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753957AbeEaHtI (ORCPT ); Thu, 31 May 2018 03:49:08 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Wed, 30 May 2018 15:06:27 -0700 Song Liu wrote: > > diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c > > index 04fbd75a5274..9c846a7a8cff 100644 > > --- a/kernel/bpf/devmap.c > > +++ b/kernel/bpf/devmap.c > > @@ -217,7 +217,7 @@ void __dev_map_insert_ctx(struct bpf_map *map, u32 bit) > > } > > > > static int bq_xmit_all(struct bpf_dtab_netdev *obj, > > - struct xdp_bulk_queue *bq) > > + struct xdp_bulk_queue *bq, bool flush) > > How about we use "int flags" instead of "bool flush" for easier extension? This is an internal function in devmap.c, so we can change it completely as we like. But I do see your point, and will change this to match the flags type of ndo_xdp_xmit, because that allows us to pass this directly to that function without any conditional statements (although I was expecting to compiler to optimized this out anyway). -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer