From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9084C3F2CD for ; Wed, 4 Mar 2020 07:24:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A1D34214D8 for ; Wed, 4 Mar 2020 07:24:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cs.washington.edu header.i=@cs.washington.edu header.b="X5H4VtDy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728520AbgCDHY3 (ORCPT ); Wed, 4 Mar 2020 02:24:29 -0500 Received: from mail-io1-f68.google.com ([209.85.166.68]:44330 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728259AbgCDHY3 (ORCPT ); Wed, 4 Mar 2020 02:24:29 -0500 Received: by mail-io1-f68.google.com with SMTP id u17so1254056iog.11 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=iyK0zgtMjq5e1aRFAj7vftzuQec8PNd+l2FQ5iW5DWmWkrXKHUNm/lzsqwFiMYITbI 9Mqinq0yPR6lMW73Fos7vphcpqQBw1ZVJdt7uaZy7v2XmEII/I9TOZLJ8nqMdABOxfMc vEKH9UeV81V2ptjrpgAZTcrUD/EKXxvYRhEaJCccyYRYH+ZPDGmAtD/pkXOKhXwK7Y0m 3dSJbeEfTRQFYbGGY6D25hNuE3nEpWn2t8H8TSCtiUHzsRui72G7LIa9ruDd+QjiG1pf 3omWUbUqfzXkCIcB3gB1skpa/fTWFMtoqHHF31iqeUeFLZnt8ljaa8ZuSxpGtUGXqcfA fMNw== X-Gm-Message-State: ANhLgQ3zxr3SscH1eG0m0SHP2tr2E4RxUz50Sf0hewwEX0H7FpIvdOzN svtlEUznKR4y7dM3Tyb6mGXSF2pci2zafHWg52nfOg== X-Google-Smtp-Source: ADFU+vtDP7J5I0uMr20ywNsGyuaqUtek9TyRHdnutO5YfvwGkuTKwFkRZeZRpw6nW1oXLNcQ+vXM+/g2FixK4+iaGBM= 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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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