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=-4.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 C0C75C282CE for ; Sat, 13 Apr 2019 07:01:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 909CB2084E for ; Sat, 13 Apr 2019 07:01:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="iR0x19fp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726897AbfDMHBI (ORCPT ); Sat, 13 Apr 2019 03:01:08 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:33898 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726278AbfDMHBI (ORCPT ); Sat, 13 Apr 2019 03:01:08 -0400 Received: by mail-wr1-f67.google.com with SMTP id p10so14751463wrq.1 for ; Sat, 13 Apr 2019 00:01:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=thjMR0EyiW9LFv1xwKYp6fxWicZp5zGMpl4OYWQWltM=; b=iR0x19fp0GC2L61GzBp8uhMeE7EyWxvHVuwoj7SiJA7gLzqLmEiDRuXXAYrpRqpR5c IQ4O8BnFEHNJ41ZMaL9nfnasa+bcugYe32zbDVMANyRxdCkUZ69vcpQOVKnlFjKHsiA9 wnv1JbQ8O2HibhTTmEJ5RoXz+3wCLuuErN32eXspWYGm8SoaPimjTjpk11ZWofU8Lj2p ATpy8binRpi4XfQcN59Gl8Gdj8evUPyFjNj4ZYfonwOf4xcb50ggqkjtySDIWflcWBeN Tx3IgQC0TCGcBFhUL1UeWh70oqxOZwza6jMu08nqFzrYngd1vdUTbkAZaTK9ZcWUrx9y DN5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=thjMR0EyiW9LFv1xwKYp6fxWicZp5zGMpl4OYWQWltM=; b=ZNbtjQ2+1xoIO2PsPHjxEsR6nQgxGu0RgdCYvg0BjolHQ7p0XCiXhQXgcEPcz5W4pt dDp8IH1KRhPgAq33Hsam8naxsjXQFVzE6GvJyf6BsaGm9kgEpjzYGQZ2IKAy9Hoe7vmE iGitxNmXR7bOzTJHkXw2HRuxIuwf3mWsj3nbIeomNaM/Mt9/i4Y7+wHQKbZvIZjoaLQr yYMPExCge8ldw4arvCba3WgCA9qqZNDCUoQjCqJdfxo2UPjUMhC1ZwrITJgJdT2VKje9 CwgQdSghM/S9vlLF4CysIOqdBbQg0jswWbEa8YON2zgjOxubePaQ/9EblbVAUQnykSmU lO8Q== X-Gm-Message-State: APjAAAWCIkco7BplqNlYsGPIcoICvjAOAI07yFxcViMqPi308743YgGH Je4Ztslsll52rHvBMC6jzoDLxg== X-Google-Smtp-Source: APXvYqyeWNcV56d48pH22mwVWTA743iDImd2viklUPIZyFthNwiHeTBqQg3Y2+VvpKxY3GLbdGAu6w== X-Received: by 2002:adf:f451:: with SMTP id f17mr40963993wrp.272.1555138866513; Sat, 13 Apr 2019 00:01:06 -0700 (PDT) Received: from LAPTOP-V3S7NLPL (cpc1-cmbg19-2-0-cust104.5-4.cable.virginm.net. [82.27.180.105]) by smtp.gmail.com with ESMTPSA id 204sm16633413wmc.1.2019.04.13.00.01.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 13 Apr 2019 00:01:05 -0700 (PDT) References: <1555106392-20117-1-git-send-email-jiong.wang@netronome.com> <1555106392-20117-5-git-send-email-jiong.wang@netronome.com> <20190413001241.fiuiyd64l7vuntz5@ast-mbp.dhcp.thefacebook.com> User-agent: mu4e 0.9.18; emacs 25.2.2 From: Jiong Wang To: Alexei Starovoitov Cc: Jiong Wang , daniel@iogearbox.net, bpf@vger.kernel.org, netdev@vger.kernel.org, oss-drivers@netronome.com Subject: Re: [PATCH v3 bpf-next 04/19] bpf: refactor "check_reg_arg" to eliminate code redundancy In-reply-to: <20190413001241.fiuiyd64l7vuntz5@ast-mbp.dhcp.thefacebook.com> Date: Sat, 13 Apr 2019 08:00:59 +0100 Message-ID: <87ftqmfkyc.fsf@netronome.com> MIME-Version: 1.0 Content-Type: text/plain Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Alexei Starovoitov writes: > On Fri, Apr 12, 2019 at 10:59:37PM +0100, Jiong Wang wrote: >> There are a few "regs[regno]" here are there across "check_reg_arg", this >> patch factor it out into a simple "reg" pointer. The intention is to >> simplify code indentation and make the later patches in this set look >> cleaner. >> >> Reviewed-by: Jakub Kicinski >> Signed-off-by: Jiong Wang > > The first 4 patches look great, so I've applied them to bpf-next. Thanks. > The rest needs more careful review that we'll do soon. No problem and agree they need very careful review. I understand once landed the optimization will be always on for a couple of targets like Arm, PowerPC and SPARC etc, so the correctness is critical. Patch 5 has two comments from Jakub not addressed, they are not about correctness so should not affect the review, I will fix them together with the other new comments. One good thing is high 32-bit randomization does catch a couple of corner case bugs so prove to be very powerful and efficient for exposing bugs. In v3, it is enabled on all possible tests under bpf selftests, and I haven't noticed regressions (my local machine configure may caused some tests skipped, but majority of the testsuite, especially all tests under test_progs/test_progs_32/test_verifier ran without failure), this is a good assurance of correctness. Thanks. Regards, Jiong