[PATCH v3 02/16] bpf: stop using variadic argument pack extension
Konstantin Ananyev
konstantin.ananyev at huawei.com
Tue Feb 27 10:48:33 CET 2024
> Subject: [PATCH v3 02/16] bpf: stop using variadic argument pack extension
>
> Use RTE_LOG_LINE_PREFIX instead of RTE_LOG_LINE in macro expansions
> which allow a prefix and arguments to be inserted into the log line
> without the need to use the ## args variadic argument pack extension.
>
> Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
> ---
> lib/bpf/bpf_impl.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/bpf/bpf_impl.h b/lib/bpf/bpf_impl.h
> index 1a3d97d..680b1e5 100644
> --- a/lib/bpf/bpf_impl.h
> +++ b/lib/bpf/bpf_impl.h
> @@ -29,8 +29,8 @@ struct rte_bpf {
> extern int rte_bpf_logtype;
> #define RTE_LOGTYPE_BPF rte_bpf_logtype
>
> -#define RTE_BPF_LOG_LINE(lvl, fmt, args...) \
> - RTE_LOG_LINE(lvl, BPF, fmt, ##args)
> +#define RTE_BPF_LOG_LINE(level, ...) \
> + RTE_LOG_LINE_PREFIX(level, BPF, "%s(): ", __func__, __VA_ARGS__)
>
> static inline size_t
> bpf_size(uint32_t bpf_op_sz)
> --
Acked-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
> 1.8.3.1
More information about the dev
mailing list