Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp110022lqo; Tue, 7 May 2024 13:54:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWim7NTE6WbEekLwR9jfXEsQhcmkfSQ6JWaXzzf0lsd2d5BkZGawu2Oqa0IKhpKARQ0zvUC/45X+SizS+rkWIQ42pSl86BnyMEmiKT4og== X-Google-Smtp-Source: AGHT+IGEQfSn9sFamwklbcCdLo0wLAat087SN0SMydjNd0vI6Us/FzcOo/hxx8OfuGcyjMWkZyFT X-Received: by 2002:a17:902:e806:b0:1ea:9596:11df with SMTP id d9443c01a7336-1eeb01a60a1mr8724985ad.32.1715115267649; Tue, 07 May 2024 13:54:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715115267; cv=pass; d=google.com; s=arc-20160816; b=g5P8pOMCDXRDhpGAb0qnrS+03R1pE3DQTT0EzBeOlOibSMHZf8BgA1oS+IfH1WeJz1 XdxWVQX8B+vzWX8gJfzjTYZHxcqJcKTBSMEAknJLOuPoFD/g72fdX/xK/uwkUFvqFDEj y0dxEPduJKA/uTguMWyKhb9mFoPhcDjjlMQycvXjUjzcBadmHeAmPTZTdagqtTT3QI7e ZDsGzopB25MdFTRvyJoU8oQLgY2j6y0xx4m54oK/vZ/qb3WzdKqQ3ZoEWyYpHkusDSri aRdjebCLqHZ/UtIZd9/a1Ls+lrdUsj88N1jH/+fa9mthzJGTmIjTGZkUToCtkdoSzw3F TjTw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=kCPZuUN4t/5qb5/ns65qHqchFck1pP0QXE79yPvXklg=; fh=fEctgmKv1YT7dx2OGp0PDL7Gj/dm8tgyJ5jO2SfvgZY=; b=J8hqHt4tsElj4kerpWwAi6cLigC6oTa75phe6Q5dGc4P4Dc8WJ07K5yl18/mgWy9Si wkyhYEoPLpu4QotZoqdfthjJWCgx6QxW7sDFZK7sUJccrR7AUwcs+QTzencl9d9SRXmD zPys3y1usuaTUJjqwHnjw3wEwzweDpwjNWkNLt7806ke0gFMkOk3ux7HUCcd1Up4MM9T xv4cfnIu9A9A3EZ4/V5s3oFWrtTuNkT7uMgFGaqsVQGapxPY2MlCsKgCNwqDQLX2Sr0Z bf80h8AFOppUbYgZbGlUZsq5JatCb4H1TBo2Nuh2Rs1YL+4ODLaaAXdK7I7qXdAsn+XI dGiQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cEQzyG5M; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-172157-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172157-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id i9-20020a170902cf0900b001e2b56c8cc5si11138425plg.509.2024.05.07.13.54.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 13:54:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172157-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cEQzyG5M; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-172157-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172157-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 364EAB222E7 for ; Tue, 7 May 2024 20:42:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A3884205F; Tue, 7 May 2024 20:42:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cEQzyG5M" Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (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 238977E8; Tue, 7 May 2024 20:42:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715114534; cv=none; b=dVp4NfqwptJrCMvuQ0CIw2NhDwTpndkTHNZ/XLqh9TkYcrG4qtCzvGkigm4xfkFaBIieqXJj0SI7vgGfuYXtIJ6Bbts392EjXeR+IUz4Psm/xIvlUC5ztzm2MBJpK9Ua2EKy5l0aYi+i945QLPLobKKdkOCu0+19HCTw51NymGc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715114534; c=relaxed/simple; bh=kCPZuUN4t/5qb5/ns65qHqchFck1pP0QXE79yPvXklg=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=azyDvpCelzTt4gsn7szp+g3Z4ykWeKQUddEg4gClfEqx+DdlR0+2Zv7T7DKmEhVzBbmcJb+YJIY/cwE/NZBV/ZY+YsnUZsd6zgcOi1Wa9Rumw8Ei2n11vfB+Oddvh+9Ey/NT42bzvmz08b4nniknD70vPV/7U3hPaMw/lZ/FEjg= 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=cEQzyG5M; arc=none smtp.client-ip=209.85.208.170 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-lj1-f170.google.com with SMTP id 38308e7fff4ca-2e0a34b2899so50830071fa.3; Tue, 07 May 2024 13:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715114531; x=1715719331; 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=kCPZuUN4t/5qb5/ns65qHqchFck1pP0QXE79yPvXklg=; b=cEQzyG5MaefWFmhe44Egt57motKriaW5vYpD3mGF2qdJDKEa20JU08c7dNEx4spAvj d7+n8nQU7CrTi7E+ZYzat0vrNbXJokDpOqDhzU8Cfs64Ylyc7ks/lYKfvQXufAOcZi87 0UrsdsvV36ffUJm05LO7C3a+QLZN1FzG22cWajMqsSgAYmsus+iUqzOtKckO1wtcJfKk pIsJS0sPS0G6ODmj0Pf+Ojsqe6E2sd7ICi/9ku7NjLrGZ2PHEuxh7cxJSasYjrUTABvb b9JGnOFAGo0iyHimm1fA9vOxaEfTMBR/SKxBqBPm5z4W9joUnAYwE14GhjXCwVf60+G0 RY1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715114531; x=1715719331; 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=kCPZuUN4t/5qb5/ns65qHqchFck1pP0QXE79yPvXklg=; b=r1DK2n6ZdkbezpSo0/6SKuFGRHwlx51pZd64uUzsfvMG5WqNeDhazq7JNQrPnjPbqG 6lx21zt0uLHMHPwgypPisI5II4Fes6ykTHlvGWM/K5ijVZ6MvBeyVaQ/2lYN9/tm76kb W/N002qjP95FeuMCbx7KKHB2YrrL+PVyNkm6vlYHNozvoiAiincYtcd5tVCo48iW8cD2 vVQ2dLoYJC4E09vhT5egShLVp/WAiY3HZPzTiBYaCrzThY3L0taO5ZfSPEuFVK9PtzTc Ta752DyetUfbKaKuz9od0Rr3ttDH0+EJuT6K2qonm8FB7a+AWfRtAeg+uqE2v79OfjXu BZzw== X-Forwarded-Encrypted: i=1; AJvYcCUfaqzJ5ZWpWx89BEqXAOXZkjbRKBwXRbUEc4Y+0QhW6RLiiXsM8Lahm38E9S3u1afQ7H9BQjj9kLLB7cEGZOVE/6KsCAQCp6a+Qwn9+slNSlRu0dz2hXgseyUcGUbYd4yS X-Gm-Message-State: AOJu0YwxpgmTz37WPRMzImQ+EhR5P5162fmmrBONtBeCqUe33nGPm3rS B/OmMnaZ68If4KyKQUv+Wlr8cXIENyMvmV6UnAj12RD2zbNHRkksS+iOnSKiq4AGVHDS8Ac/3Yr mEFqrrmY8mMslefDppEPTHfaaaTM= X-Received: by 2002:a2e:97c9:0:b0:2e3:ba0e:de12 with SMTP id 38308e7fff4ca-2e446e82769mr4903291fa.22.1715114531024; Tue, 07 May 2024 13:42:11 -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: Alexei Starovoitov Date: Tue, 7 May 2024 13:41:59 -0700 Message-ID: Subject: Re: [PATCH bpf-next v1] bpf,arena: Rename the kfunc set variable To: Andrii Nakryiko 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 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? 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