[PATCH 11/11] drivers: use per line logging in helpers
Andrew Rybchenko
andrew.rybchenko at oktetlabs.ru
Sun Sep 8 10:55:01 CEST 2024
On 9/7/24 17:54, David Marchand wrote:
> Use RTE_LOG_LINE in existing macros that append a \n.
>
> Signed-off-by: David Marchand <david.marchand at redhat.com>
[snip]
> diff --git a/drivers/common/sfc_efx/sfc_efx_log.h b/drivers/common/sfc_efx/sfc_efx_log.h
> index 1519ebdc17..b41ef3490b 100644
> --- a/drivers/common/sfc_efx/sfc_efx_log.h
> +++ b/drivers/common/sfc_efx/sfc_efx_log.h
> @@ -12,11 +12,10 @@
>
> /** Generic driver log type */
> extern int sfc_efx_logtype;
> +#define RTE_LOGTYPE_SFC_EFX sfc_efx_logtype
>
> /** Log message, add a prefix and a line break */
> #define SFC_EFX_LOG(level, ...) \
> - rte_log(RTE_LOG_ ## level, sfc_efx_logtype, \
> - RTE_FMT("sfc_efx: " RTE_FMT_HEAD(__VA_ARGS__ ,) "\n", \
Is "sfc_efx: " prefix dropped intentionally? Or should
RTE_LOG_LINE_PREFIX be used?
> - RTE_FMT_TAIL(__VA_ARGS__ ,)))
> + RTE_LOG_LINE(level, SFC_EFX, ## __VA_ARGS__)
>
> #endif /* _SFC_EFX_LOG_H_ */
More information about the dev
mailing list