From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: [PATCH bpf-next 0/5] nfp: bpf: adjust head support Date: Thu, 14 Dec 2017 21:29:14 -0800 Message-ID: <20171215052919.18343-1-jakub.kicinski@netronome.com> Cc: oss-drivers@netronome.com, daniel@iogearbox.net, alexei.starovoitov@gmail.com, Jakub Kicinski To: netdev@vger.kernel.org Return-path: Received: from mail-pg0-f67.google.com ([74.125.83.67]:37056 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751136AbdLOF34 (ORCPT ); Fri, 15 Dec 2017 00:29:56 -0500 Received: by mail-pg0-f67.google.com with SMTP id y6so5095291pgp.4 for ; Thu, 14 Dec 2017 21:29:56 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: Hi! This small set adds support for bpf_xdp_adjust_head() to the offload. Since we have access to unmodified BPF bytecode translating calls is pretty trivial. First part of the series adds handling of BPF capabilities included in the FW in TLV format. The last two patches add adjust head support in the nfp verifier and jit, and a small optimization in case we can guarantee the constant adjustment will always meet adjustment constaints. Jakub Kicinski (5): nfp: add nfp_cpp_area_size() accessor nfp: bpf: prepare for parsing BPF FW capabilities nfp: bpf: prepare for call support nfp: bpf: add basic support for adjust head call nfp: bpf: optimize the adjust_head calls in trivial cases drivers/net/ethernet/netronome/nfp/bpf/fw.h | 54 ++++++++++ drivers/net/ethernet/netronome/nfp/bpf/jit.c | 107 +++++++++++++++++++ drivers/net/ethernet/netronome/nfp/bpf/main.c | 115 +++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/bpf/main.h | 30 ++++++ drivers/net/ethernet/netronome/nfp/bpf/offload.c | 2 + drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 70 +++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_asm.h | 2 + .../net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h | 1 + .../ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 11 ++ 9 files changed, 392 insertions(+) create mode 100644 drivers/net/ethernet/netronome/nfp/bpf/fw.h -- 2.15.1