From patchwork Thu Aug 3 07:33:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Olsa X-Patchwork-Id: 13339393 X-Patchwork-Delegate: bpf@iogearbox.net Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7315C9457 for ; Thu, 3 Aug 2023 07:34:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31714C433C7; Thu, 3 Aug 2023 07:34:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691048074; bh=DgurW+ClGnIuFEoVNq0gV58iilNtKPN0Du1/CpMy5sk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dES09JXRTdXdfIUszCzt2uzBZNU6snEwSuJ88wnsvVYSYPKbR52CBwDLW7elsBha6 qi86zR+5DUDGFQlU07A3qvHJJO++ue23Jaw1H8btq7O+TdEOn8YmhhESw7sSHj00Rq ZOMYXgVzaCYtGUXUbDYq4Tj9Pu4R2h7qPFFadR5ADNwgNvIMtV/kvBAOM91hQACqqA bKAEfkVfYlreyJw2i/rZ+qiaqRY/rM6ctjoxn6xLgYmy5SlWrThP6e/obIuCE+qOX7 HSCOSNh3Oztz/CKO41e9FpT7U6njNcVQio3aQ0eyOBS0okinC34UM9VKNHSclwW0dZ D6DW7Pom64POw== From: Jiri Olsa To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Yafang Shao , bpf@vger.kernel.org, Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo Subject: [PATCHv6 bpf-next 01/28] bpf: Switch BPF_F_KPROBE_MULTI_RETURN macro to enum Date: Thu, 3 Aug 2023 09:33:53 +0200 Message-ID: <20230803073420.1558613-2-jolsa@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230803073420.1558613-1-jolsa@kernel.org> References: <20230803073420.1558613-1-jolsa@kernel.org> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: bpf@iogearbox.net Switching BPF_F_KPROBE_MULTI_RETURN macro to anonymous enum, so it'd show up in vmlinux.h. There's not functional change compared to having this as macro. Acked-by: Yafang Shao Suggested-by: Andrii Nakryiko Signed-off-by: Jiri Olsa --- include/uapi/linux/bpf.h | 4 +++- tools/include/uapi/linux/bpf.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 70da85200695..7abb382dc6c1 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -1186,7 +1186,9 @@ enum bpf_perf_event_type { /* link_create.kprobe_multi.flags used in LINK_CREATE command for * BPF_TRACE_KPROBE_MULTI attach type to create return probe. */ -#define BPF_F_KPROBE_MULTI_RETURN (1U << 0) +enum { + BPF_F_KPROBE_MULTI_RETURN = (1U << 0) +}; /* link_create.netfilter.flags used in LINK_CREATE command for * BPF_PROG_TYPE_NETFILTER to enable IP packet defragmentation. diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 70da85200695..7abb382dc6c1 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h @@ -1186,7 +1186,9 @@ enum bpf_perf_event_type { /* link_create.kprobe_multi.flags used in LINK_CREATE command for * BPF_TRACE_KPROBE_MULTI attach type to create return probe. */ -#define BPF_F_KPROBE_MULTI_RETURN (1U << 0) +enum { + BPF_F_KPROBE_MULTI_RETURN = (1U << 0) +}; /* link_create.netfilter.flags used in LINK_CREATE command for * BPF_PROG_TYPE_NETFILTER to enable IP packet defragmentation.