From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexei Starovoitov Subject: Re: [bpf-next V2 PATCH 0/8] bpf/xdp: add flags argument to ndo_xdp_xmit and flag flush operation Date: Sun, 3 Jun 2018 08:17:51 -0700 Message-ID: <20180603151749.a4pquv2hcouv4bln@ast-mbp> References: <152775714013.24817.5067576840614810786.stgit@firesoul> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, Daniel Borkmann , liu.song.a23@gmail.com, songliubraving@fb.com, John Fastabend To: Jesper Dangaard Brouer Return-path: Received: from mail-pf0-f196.google.com ([209.85.192.196]:43280 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751393AbeFCPRy (ORCPT ); Sun, 3 Jun 2018 11:17:54 -0400 Received: by mail-pf0-f196.google.com with SMTP id j20-v6so14682048pff.10 for ; Sun, 03 Jun 2018 08:17:54 -0700 (PDT) Content-Disposition: inline In-Reply-To: <152775714013.24817.5067576840614810786.stgit@firesoul> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, May 31, 2018 at 10:59:42AM +0200, Jesper Dangaard Brouer wrote: > As I mentioned in merge commit 10f678683e4 ("Merge branch 'xdp_xmit-bulking'") > I plan to change the API for ndo_xdp_xmit once more, by adding a flags > argument, which is done in this patchset. > > I know it is late in the cycle (currently at rc7), but it would be > nice to avoid changing NDOs over several kernel releases, as it is > annoying to vendors and distro backporters, but it is not strictly > UAPI so it is allowed (according to Alexei). > > The end-goal is getting rid of the ndo_xdp_flush operation, as it will > make it possible for drivers to implement a TXQ synchronization mechanism > that is not necessarily derived from the CPU id (smp_processor_id). > > This patchset removes all callers of the ndo_xdp_flush operation, but > it doesn't take the last step of removing it from all drivers. This > can be done later, or I can update the patchset on request. > > Micro-benchmarks only show a very small performance improvement, for > map-redirect around ~2 ns, and for non-map redirect ~7 ns. I've not > benchmarked this with CONFIG_RETPOLINE, but the performance benefit > should be more visible given we end-up removing an indirect call. > > --- > V2: Updated based on feedback from Song Liu Applied, but please send a follow up patch to remove ndo_xdp_flush(). Otherwise this patch set is just a code churn that doing the opposite of what you're trying to achieve and creating more backport pains.