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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FB05ECAAD4 for ; Thu, 1 Sep 2022 01:31:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229781AbiIABbF (ORCPT ); Wed, 31 Aug 2022 21:31:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbiIABbE (ORCPT ); Wed, 31 Aug 2022 21:31:04 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 190B4AA4F8 for ; Wed, 31 Aug 2022 18:31:01 -0700 (PDT) Received: from [10.130.0.135] (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxvmtNCxBjvV4OAA--.51477S3; Thu, 01 Sep 2022 09:30:53 +0800 (CST) Subject: Re: [PATCH bpf-next v2 4/4] LoongArch: Enable BPF_JIT and TEST_BPF in default config To: Daniel Borkmann , Xi Ruoyao , Huacai Chen References: <1661857809-10828-1-git-send-email-yangtiezhu@loongson.cn> <1661857809-10828-5-git-send-email-yangtiezhu@loongson.cn> <6bc9bd64-1ba9-a35f-c0b7-480429b26b9f@loongson.cn> <75b27dacb8b4d779c6b2c0e46871baf404a32b6b.camel@xry111.site> Cc: Alexei Starovoitov , Andrii Nakryiko , bpf , loongarch@lists.linux.dev From: Tiezhu Yang Message-ID: Date: Thu, 1 Sep 2022 09:30:53 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-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I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf 9x07j0GQhUUUUU= X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On 09/01/2022 03:31 AM, Daniel Borkmann wrote: > On 8/31/22 11:02 AM, Xi Ruoyao wrote: >> On Wed, 2022-08-31 at 12:12 +0800, Xi Ruoyao wrote: >>> On Wed, 2022-08-31 at 09:23 +0800, Tiezhu Yang wrote: >>>> >>>> >>>> On 08/30/2022 10:46 PM, Huacai Chen wrote: >>>>> Hi, Tiezhu, >>>>> >>>>> On Tue, Aug 30, 2022 at 7:10 PM Tiezhu Yang >>>>> wrote: >>>>>> >>>>>> For now, BPF JIT for LoongArch is supported, update >>>>>> loongson3_defconfig to >>>>>> enable BPF_JIT to allow the kernel to generate native code when >>>>>> a program >>>>>> is loaded into the kernel, and also enable TEST_BPF to test BPF >>>>>> JIT. >>>>>> >>>>>> Signed-off-by: Tiezhu Yang >>>>>> --- >>>>>> arch/loongarch/configs/loongson3_defconfig | 2 ++ >>>>>> 1 file changed, 2 insertions(+) >>>>>> >>>>>> diff --git a/arch/loongarch/configs/loongson3_defconfig >>>>>> b/arch/loongarch/configs/loongson3_defconfig >>>>>> index 3712552..93dc072 100644 >>>>>> --- a/arch/loongarch/configs/loongson3_defconfig >>>>>> +++ b/arch/loongarch/configs/loongson3_defconfig >>>>>> @@ -4,6 +4,7 @@ CONFIG_POSIX_MQUEUE=y >>>>>> CONFIG_NO_HZ=y >>>>>> CONFIG_HIGH_RES_TIMERS=y >>>>>> CONFIG_BPF_SYSCALL=y >>>>>> +CONFIG_BPF_JIT=y >>>>>> CONFIG_PREEMPT=y >>>>>> CONFIG_BSD_PROCESS_ACCT=y >>>>>> CONFIG_BSD_PROCESS_ACCT_V3=y >>>>>> @@ -801,3 +802,4 @@ CONFIG_MAGIC_SYSRQ=y >>>>>> CONFIG_SCHEDSTATS=y >>>>>> # CONFIG_DEBUG_PREEMPT is not set >>>>>> # CONFIG_FTRACE is not set >>>>>> +CONFIG_TEST_BPF=m >>>>> I don't want the test module be built by default, but I don't >>>>> insist >>>>> if you have a strong requirement. >>>>> >>>> >>>> Hi Huacai, >>>> >>>> It is useful to enable TEST_BPF in default config, otherwise we >>>> need to use "make menuconfig" to select it manually if we want >>>> to test bpf jit, and build it as a module by default has no side >>>> effect, so I prefer to enable TEST_BPF in default config. >>> >>> IMO we shouldn't enable a test feature which is never used by 99% of >>> users in the default. >> >> P. S. this is not a strong option. CONFIG_TEST_BPF seems enabled by >> default for S390, and I'm not sure if defconfig is designed for "kernel >> developers" or "distro builders", or even "normal users". > > Right now BPF CI [0] tests x86_64 and s390x archs, would be nice to also > add others in future to increase test coverage and then include test_bpf > as part of the executed test suites. If noone beats me to it, the latter > still sits in my bucket list. But either way, that would make more sense > than adding CONFIG_TEST_BPF to defconfig. Looks like for odd reasons m68k > and s390x has it, it shouldn't be there, really. > > Thanks, > Daniel > > [0] https://github.com/kernel-patches/bpf/pulls OK, it is clear now, let me remove CONFIG_TEST_BPF in loongson3_defconfig, thank you all. Thanks, Tiezhu