Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4229560ybf; Tue, 3 Mar 2020 23:24:53 -0800 (PST) X-Google-Smtp-Source: ADFU+vur3+nROVdzXg8/aZk0SvEwrGfzyus73W2nDuv9otGfsE0IkPZLWacSqEa8cT5I8StTy6Oi X-Received: by 2002:aca:2814:: with SMTP id 20mr862419oix.61.1583306693657; Tue, 03 Mar 2020 23:24:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583306693; cv=none; d=google.com; s=arc-20160816; b=fGIrvPW9aKArJXQOOVREmcdNTaT+FnZsI5dVcStfXFMMf1OBAfI3xd5bOr+1ZjVZkJ ZeWPBoLYD+2dMM25QlEzGvshQ+iYoRVxQ4ya6zhtfdBfKIE9il02eBFVTa7hG4dIZpwa fgsQEITYLsVyLxUu8YYwxpHRaf3AdKkV9IzYPE1/5iVpZLbG3RVC+XaX33BSTY4AOSTD C+gRVemcoRjSzwIZUg89g2M5VN9SOK5tOW6ghCusjLlQHdghjbQ7+yKAtbouWkK01c/H TJDFpbXZHsWlJJf6CUK6c2pVuv4wWNqbEHpS4EGI/+XJo/+ObKRH5MQ+BYIkMQZV9Z9+ phZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+0StPfC8X5r/f0uwQzYAuENN0Fy4oQ3SfFfmaNBTQnc=; b=vrL44rLe6pj+NupuYRCRNAwyHAoGWOz1/G6kC9BzMrlIAnVHT0/Ts9uTE9wNveFMBA WNBV56VkvbAIvke3uf3E8OGTguRolC+1fNHC5OpYEkr9hhmKIKe3NLVltOcTjJvhOR1i CHhKrLK6pJcfN8E79zYGQXB5CFMm40WpVVMwu2YoCvMBhmdOkFeq9qsp9WA8n58RZOll EBELzaMatTPq+gyveWg8VeX9qm4AgGRHyY5M8Fl+4D0NcnSDZoghCFm/We24IIu1BP4p EmazdeoCDk8iYv6WsQRV3kqvjgG8F0qy+ISU1xOWMtc9k5xozdImV0YoS0OuI5eeQk1b fvsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cs.washington.edu header.s=goo201206 header.b=X5H4VtDy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cs.washington.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p26si559855oto.240.2020.03.03.23.24.41; Tue, 03 Mar 2020 23:24:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cs.washington.edu header.s=goo201206 header.b=X5H4VtDy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cs.washington.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727543AbgCDHY3 (ORCPT + 99 others); Wed, 4 Mar 2020 02:24:29 -0500 Received: from mail-io1-f66.google.com ([209.85.166.66]:42134 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727734AbgCDHY3 (ORCPT ); Wed, 4 Mar 2020 02:24:29 -0500 Received: by mail-io1-f66.google.com with SMTP id q128so1263532iof.9 for ; Tue, 03 Mar 2020 23:24:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.washington.edu; s=goo201206; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+0StPfC8X5r/f0uwQzYAuENN0Fy4oQ3SfFfmaNBTQnc=; b=X5H4VtDyPvqJAdUJVPRhTnJNzg0cr0lXQnBxXOFBn70TvIaxwS7X1BhYAA6rW6iMx/ 2KL8fW6WmM9hvIfkxJ9HJLlSveCUGVutVFlbs/Dn3AB07u+7H4rIDUAkprO6clAYF+fk Yp/tkE8C0hW1UN84pzTDY8f0QLod+qUSCGqHc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+0StPfC8X5r/f0uwQzYAuENN0Fy4oQ3SfFfmaNBTQnc=; b=moKi/NMQ4rmrT9gQBkedRlHQ5M+2eq4UyifDj/N62cP/mDSCMYQD0eWiJ7e2UeLGPO ye1aWxNYtQdVmeZW4HsTVJGGJigXoAedlrN5mgGiq1Qb0avxysm5TECBm2GKMiir9+0B PuSzKDLkR2O4njeOBQ57/4abUMeMPixj0GyUxC25FVWcX62yobc5EC83QMqTq6ZArsq/ Hg+yUrH/qhLjo/JvxxDkiQiY1UE2fYxHkE3scFZ2+P7GlrvkNwx4/CMp2FXNhUOLQ7nQ wqmeJLGiYjLGgf7BImkamb8RisOcov+V7INxDBX5fdCUI3oBw/cJuvDiEWxjhcDK37UP +PPA== X-Gm-Message-State: ANhLgQ13ubg1ujes07ZyJbqgoc8m9AM2kjjNyGuqkzfUs68/I1HMgGl8 urwnGTnmOfENYw8BVW8V+Xnptjqafy4VUcu92n34hg== X-Received: by 2002:a02:a1c9:: with SMTP id o9mr1543147jah.33.1583306668640; Tue, 03 Mar 2020 23:24:28 -0800 (PST) MIME-Version: 1.0 References: <20200303005035.13814-1-luke.r.nels@gmail.com> <20200303005035.13814-3-luke.r.nels@gmail.com> In-Reply-To: From: Luke Nelson Date: Tue, 3 Mar 2020 23:24:17 -0800 Message-ID: Subject: Re: [PATCH bpf-next v4 2/4] riscv, bpf: add RV32G eBPF JIT To: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Cc: bpf , Luke Nelson , Jonathan Corbet , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , "David S. Miller" , Jakub Kicinski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Xi Wang , Mauro Carvalho Chehab , Stephen Hemminger , Rob Herring , Greg Kroah-Hartman , Jonathan Cameron , Andy Shevchenko , linux-doc@vger.kernel.org, LKML , Netdev , linux-riscv@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I like that, but keep the first patch as a refactoring patch only, and > then in a *new* patch 2 you add the rv32 specific code (sltu and > pseudo instructions + the xlen preprocessor check + copyright-things > ;-)). Patch 3 will be the old patch 2. Wdyt? Thanks! I'll make sure that patch 1 is for renaming bpf_jit_comp.c and factoring code out. Do you think it's reasonable to add the RV32-specific code to the header in the same patch that adds the RV32 JIT implementation (patch 2)? It might make sense to commit them together. The full plan for v5 would be: Patch 1 - Refactor existing code to bpf_jit.h and bpf_jit_core.c + Including the minor modifications to build_body() and bpf_int_jit_compile() (These are unrelated to RV32 and we could forego these tweaks). + Also making emit_insn and build_{prologue,epilogue} non-static and renaming them to be prefixed with "bpf_jit_". - Rename bpf_jit_comp.c to bpf_jit_comp64.c Patch 2 - Add the RV32 BPF JIT implementation to bpf_jit_comp32.c and RV32-specific changes to bpf_jit.h. Patch 3 - Update documentation. Patch 4 - Update MAINTAINERS. Thanks again, Luke