[RFC v2 13/14] lib: replace logging helpers

Stephen Hemminger stephen at networkplumber.org
Fri Dec 8 18:18:28 CET 2023


On Fri,  8 Dec 2023 15:59:47 +0100
David Marchand <david.marchand at redhat.com> wrote:

> diff --git a/lib/bpf/bpf_impl.h b/lib/bpf/bpf_impl.h
> index b483569071..30d83d2b40 100644
> --- a/lib/bpf/bpf_impl.h
> +++ b/lib/bpf/bpf_impl.h
> @@ -27,9 +27,10 @@ int __rte_bpf_jit_x86(struct rte_bpf *bpf);
>  int __rte_bpf_jit_arm64(struct rte_bpf *bpf);
>  
>  extern int rte_bpf_logtype;
> +#define RTE_LOGTYPE_BPF rte_bpf_logtype
>  
> -#define	RTE_BPF_LOG(lvl, fmt, args...) \
> -	rte_log(RTE_LOG_## lvl, rte_bpf_logtype, fmt, ##args)
> +#define	BPF_LOG(lvl, fmt, args...) \
> +	RTE_LOG(lvl, BPF, fmt "\n", ##args)

Not sure about this. There were some cases where bpf_XXX function
names clashed with those in libpcap. That is probably why the
RTE_BPF_LOG was chosen.


More information about the dev mailing list