Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp121547lqo; Tue, 7 May 2024 14:20:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVd7dYdfhQ4uMv1s9QKXgq3aJaMyt076+UBRGvd4+vDVfTeiTk0lYQRl1a12zbZuRwIG8EuFyg0ciFP7hl6xU+L7lE2/ezE9hC39mg3dA== X-Google-Smtp-Source: AGHT+IGzVVRFgYWC111i7grJ8i6BrAKCjSgfTxOnN2ADRL/f7K76XEuZAF7H4gGGzoG56H7dHJyD X-Received: by 2002:a05:6102:d7:b0:47b:7420:a2cd with SMTP id ada2fe7eead31-47f3c29087emr816582137.4.1715116859263; Tue, 07 May 2024 14:20:59 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id kk16-20020a056214509000b006a0824a6602si12355094qvb.401.2024.05.07.14.20.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 14:20:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172215-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=a119qRZz; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-172215-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172215-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E78921C238E9 for ; Tue, 7 May 2024 21:20:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 44B627603A; Tue, 7 May 2024 21:20:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="a119qRZz" Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0224E71B5C; Tue, 7 May 2024 21:20:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715116851; cv=none; b=MzwkaxJKx3hbE1LO47mqQkE76PLKOQkVyUB4q/wh2vZMNmhFqb9o3dLXd4Bn+p2f/TI9g3GbUBixXgCgZWGk6b7xO72ZzVgjSNrtjsQYiDQ8S8DTT0J8LAcY+VgJXcC2bFFIDHO3LSmqGd+ud28QcV4EMggEC/mvsRw6i3wIAz0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715116851; c=relaxed/simple; bh=Kwx9xza8wFQSSk9Mi6u/zxm4gN8TurT0J8NxtgGk5Xs=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=q4ouPtELg3XqM0MdmCnvYRKDYLMCLNdiVvtms/4cSjxWenWWrcBdKt+xABcsvIE5fyw8l3wyVHY/oBeGS1PhCwTIxQOBgBcPfrd+JJVBquoYWflp6m9wYA4dFzqKrC0CGHSWieVh1fPA4/sD4uvIXChgAoO+vK96vakZn1xyqrM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=a119qRZz; arc=none smtp.client-ip=209.85.218.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a59c5c9c6aeso720600666b.2; Tue, 07 May 2024 14:20:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715116848; x=1715721648; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Kwx9xza8wFQSSk9Mi6u/zxm4gN8TurT0J8NxtgGk5Xs=; b=a119qRZz+VppvV+gbh9KYGwws/E2UNXWJZcmcXVtqVCusr5AwLSm4yl5et4u6WJ7mG 7tg7JuxIRioEDbbxKEHpzfsp2DfgtD0EebfbEvzTYp+kq83b1E9Se4X4GimnZmE7Tb+M wbfbyNAjzL04n3Q6ZjHbAsi+mT1fwCPbSp+FDBrfdd5rUOsw9C85KbWzlTJO2Q5QTtTd HIq31xjG+yodnV63KlxdD4l9RGcupFoCGMy+Xt6L3ak0wPgMv+EkmzaGYsdmNqUrd0NO dt6JgAcgPRDdEpY5b4D7Zs5fKd4IWk9UDrZeARXWylPdRJjY3HTsBAPt1ynOBvwvflcH 3oIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715116848; x=1715721648; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Kwx9xza8wFQSSk9Mi6u/zxm4gN8TurT0J8NxtgGk5Xs=; b=M9+cMLPjhY3KsSpZVwAFXCeDCyUh9x/06M8uKhRWw2xJHQdrHBHTI71vMHQYeKx8Ia PZfrrhCgf8DS4gH0r1K13c/Gz12aRiu8bs4QcBRvw63H/BGlCx9n6et3Dv+3uE3nXq3w Alo5uZqeF/qLvtSZDUlVBjFwBqakPNgFw7rwVQ82nNoy2Yc/6uA638wxJIvJOg6GWD1r CVvux+KBMNVtI1tEEws2+KLtlUHoSs03bHb678j/3WfjJBna1fAihievciIngwQfzod2 1MYVOcbHPI+lP8I2oviBzB1xZEmPbb08Y45ppGufInmWjbeQnwJgdk7vW9/VY0RjCvyb LGWA== X-Forwarded-Encrypted: i=1; AJvYcCWbKOo6K5wH8XQ2b0recJrCyrtBFYZ7RjSu3A/L9Vvz3ZU8RE8AUWfKm8lwdIx5wJ9qj2gWTFMOPHgVlw1jYGMyNlefuAgsaS0AHTB8oEScXIk27syfCCltLITikH0FuY3T X-Gm-Message-State: AOJu0YxeVONTDo47LADUsjOBt9sGIXvqi5blMstm2U+tPHfq5x1xx7Vn 71wFaXHcG4l6TnQo7X+KgmjHdeWou/qwiqTWCl5++OLGHfQhZU6YKndjqIP7p+Aqo4uYKRiLQx1 PXSjhN1u/gLyJ8B5RQlLEgDF6iqo= X-Received: by 2002:a17:906:65c9:b0:a59:c8bf:1269 with SMTP id a640c23a62f3a-a59fb9690eamr35514166b.37.1715116848061; Tue, 07 May 2024 14:20:48 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240507024952.1590681-1-haiyue.wang@intel.com> In-Reply-To: From: Andrii Nakryiko Date: Tue, 7 May 2024 14:20:32 -0700 Message-ID: Subject: Re: [PATCH bpf-next v1] bpf,arena: Rename the kfunc set variable To: Alexei Starovoitov Cc: Haiyue Wang , bpf , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , open list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, May 7, 2024 at 1:42=E2=80=AFPM Alexei Starovoitov wrote: > > On Tue, May 7, 2024 at 9:43=E2=80=AFAM Andrii Nakryiko > wrote: > > > > On Tue, May 7, 2024 at 7:36=E2=80=AFAM Alexei Starovoitov > > wrote: > > > > > > On Mon, May 6, 2024 at 7:46=E2=80=AFPM Haiyue Wang wrote: > > > > > > > > Rename the kfunc set variable to specify the 'arena' function scope= , > > > > although the 'UNSPEC' type BPF program is mapped to 'COMMON' hook. > > > > > > > > And there is 'common_kfunc_set' defined for real 'common' function = in > > > > file 'kernel/bpf/helpers.c'. > > > > > > I think common_kfunc_set is a better name to describe that these > > > two kfuncs are in a common category. > > > BPF_PROG_TYPE_UNSPEC is a lot less obvious. > > > > > > There are two static common_kfunc_set in helpers.c and arena.c > > > and that's fine. > > > > it is actually confusing when reading/grepping code, though, so why > > What's the confusion? Same name static var in different files? Not in general, but in this case it's arena-specific kfuncs for all program types, and it's initialized with &arena_kfuncs, so it would be matching to have some "arena" mention in the name. But it's minor, let's keep it. > There are tons of such cases in the kernel src tree. > > > not have arena_common_kfunc_set and whatever the meaningful > > "qualifier" name for the other one? > > arena_common_kfunc_set is certainly better than arena_kfunc_set, > but I don't like to make the precedent to start renaming static vars > because they have the same name. > > > > > > > pw-bot: cr