Re: [PATCHv5 bpf-next 01/28] bpf: Switch BPF_F_KPROBE_MULTI_RETURN macro to enum

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 30, 2023 at 9:42 PM Jiri Olsa <jolsa@xxxxxxxxxx> wrote:
>
> 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.
>
> Suggested-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
> Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>

Acked-by: Yafang Shao <laoar.shao@xxxxxxxxx>

> ---
>  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.
> --
> 2.41.0
>


-- 
Regards
Yafang





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux