On Wed, Dec 13, 2023 at 4:09 PM Stephen Hemminger <step...@networkplumber.org> wrote: > > On Wed, 13 Dec 2023 09:00:48 +0100 > David Marchand <david.march...@redhat.com> wrote: > > > On Wed, Dec 13, 2023 at 5:19 AM Stephen Hemminger > > <step...@networkplumber.org> wrote: > > > > > > The generic RTE_LOGTYPE_PMD is a leftover and should be removed. > > > As a first step, fix many drivers to not use it, and add a > > > helper for the RTE_LOG_DP(). > > > > I don't see why we need a new rte_log_dp helper. > > The #define RTE_LOGTYPE_XXX trick should work fine with RTE_LOG_DP(). > > What else is missing? > > The problem is RTE_LOG_DP() usage today takes suffixes. So the param > log type can only be one of the pre-defined fixed values. > > Changing the macro in one patch would be a huge patch.
I am not asking for change in the RTE_LOG_DP() API. I sent a patch doing for what I had in mind: https://patchwork.dpdk.org/project/dpdk/patch/20231218135932.1497163-1-david.march...@redhat.com/ > > It seemed best to have RTE_LOG_DP() stay like RTE_LOG() > and introduce rte_log_dp() to match rte_log(). > rte_log() seems a low level API, I don't like the idea of adding another one with rte_log_dp(). And it will conflict with the cleanup I started on multiline / line with \n in logs. -- David Marchand