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 0F494ECAAD3 for ; Wed, 31 Aug 2022 09:02:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231226AbiHaJCg (ORCPT ); Wed, 31 Aug 2022 05:02:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230458AbiHaJCf (ORCPT ); Wed, 31 Aug 2022 05:02:35 -0400 Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C69E5BD747 for ; Wed, 31 Aug 2022 02:02:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1661936552; bh=ECqsVjBTRWNtq87Rj1rE7CyanoR0fzh8v6Jx+yreDLE=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=M4WDTBDs0+mXFJZpVCOe67+s1EQwPozaVwWJJBQGwmxtPWVoQSrhPveMxhBuASrCj cFHwXTjrxUKuYghhs0A7OVOnsXn2+VlLpi4IEl3NpdhJshuwmB4SLqir7JtuTjZqWw Npm8lmwjjUBOfuyBafuGSWydjVRGV+Hie2puUGKc= Received: from [IPv6:240e:358:118a:f800:dc73:854d:832e:4] (unknown [IPv6:240e:358:118a:f800:dc73:854d:832e:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 760C566819; Wed, 31 Aug 2022 05:02:28 -0400 (EDT) Message-ID: Subject: Re: [PATCH bpf-next v2 4/4] LoongArch: Enable BPF_JIT and TEST_BPF in default config From: Xi Ruoyao To: Tiezhu Yang , Huacai Chen Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , bpf , loongarch@lists.linux.dev Date: Wed, 31 Aug 2022 17:02:18 +0800 In-Reply-To: <75b27dacb8b4d779c6b2c0e46871baf404a32b6b.camel@xry111.site> 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> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.45.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Wed, 2022-08-31 at 12:12 +0800, Xi Ruoyao wrote: > On Wed, 2022-08-31 at 09:23 +0800, Tiezhu Yang wrote: > >=20 > >=20 > > On 08/30/2022 10:46 PM, Huacai Chen wrote: > > > Hi, Tiezhu, > > >=20 > > > On Tue, Aug 30, 2022 at 7:10 PM Tiezhu Yang > > > wrote: > > > >=20 > > > > 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. > > > >=20 > > > > Signed-off-by: Tiezhu Yang > > > > --- > > > > =C2=A0arch/loongarch/configs/loongson3_defconfig | 2 ++ > > > > =C2=A01 file changed, 2 insertions(+) > > > >=20 > > > > 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=3Dy > > > > =C2=A0CONFIG_NO_HZ=3Dy > > > > =C2=A0CONFIG_HIGH_RES_TIMERS=3Dy > > > > =C2=A0CONFIG_BPF_SYSCALL=3Dy > > > > +CONFIG_BPF_JIT=3Dy > > > > =C2=A0CONFIG_PREEMPT=3Dy > > > > =C2=A0CONFIG_BSD_PROCESS_ACCT=3Dy > > > > =C2=A0CONFIG_BSD_PROCESS_ACCT_V3=3Dy > > > > @@ -801,3 +802,4 @@ CONFIG_MAGIC_SYSRQ=3Dy > > > > =C2=A0CONFIG_SCHEDSTATS=3Dy > > > > =C2=A0# CONFIG_DEBUG_PREEMPT is not set > > > > =C2=A0# CONFIG_FTRACE is not set > > > > +CONFIG_TEST_BPF=3Dm > > > I don't want the test module be built by default, but I don't > > > insist > > > if you have a strong requirement. > > >=20 > >=20 > > Hi Huacai, > >=20 > > 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. >=20 > 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". --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University